Find Command Manual Section and View Command Manual Section using man Command on Linux Fedora



Computer Configuration GNU Linux Fedora using Linux Command

 

   The command manual sometimes comes in different manual section. to view command manual in different section you need to specify the man command on what section that you want to use or view.  The example below show the step by step to view command manuals on different section.

 

1.  Step to find location of the command manual section. The example below use whatis command to get manual section for the info command, you can use other command to get the manual section for specific command.

Find command manual section command:   whatis info

Find command manual section

[root@fedora ~]# whatis info

info []              (1)  - read Info documents

info []              (5)  - readable online documentation

info []              (n)  - Return information about the state of the Tcl interpreter

info                (rpm) - A stand-alone TTY-based reader for GNU texinfo documentation

[root@fedora ~]#

 

2.  The output from whatis command above, we know that the info command have manual section on section 1, section 5 and section n.  The man command below show the example to view the manual for info command on section 1, view the manual for info command on section 5 and view the manual for info command on section n.

View manual on section 1 command:   man 1 info

View manual on section 1 command:   man 1 info

[root@fedora ~]# man 1 info

 

INFO(1)                          User Commands                         INFO(1)

 

NAME

       info - read Info documents

 

SYNOPSIS

       info [OPTION]... [MENU-ITEM...]

 

DESCRIPTION

       Read documentation in Info format.

 

:

Hit q key to exit the man command

 

View manual on section 5 command:   man 5 info

View manual on section 5 command:   man 5 info

[root@fedora ~]# man 5 info

 

INFO(5)                                                                INFO(5)

 

NAME

       info - readable online documentation

 

DESCRIPTION

       The  Info  file  format  is an easily-parsable

       representation for online documents.   It  can

       be  read  by  emacs(1) and info(1) among other

       programs.

 

:

Hit q key to exit the man command

 

View manual on section n command:   man n info

View manual on section n command:   man n info

[root@fedora ~]# man n info

 

info(n)                      Tcl Built-In Commands                     info(n)

 

_____________________________________________________

 

NAME

       info  -  Return information about the state of

       the Tcl interpreter

 

SYNOPSIS

       info option ?arg arg ...?

_____________________________________________________

:

Hit q key to exit the man command

 




Show Linux Command Description using whatis Command on Linux Fedora



Computer Configuration GNU Linux Fedora using Linux Command

 

   The step by step command example below, using whatis command to show command description on Linux Fedora operating system.  The whatis command search database file containing short descriptions of system commands and display them to screen.  the whatis command very useful if you want to know Linux command function in Linux system and what can this Linux command do.  If you wan more than simple description, you can always use man command or info command to know details about each Linux command on the system.

Using whatis command to show ls command description and the ls command manual section:

Using whatis command to show ls command description and the ls command manual section:

[root@fedora ~]# whatis ls

ls []                (1)  - list directory contents

ls []                (1p)  - list directory contents

[root@fedora ~]#

 

Using whatis command to show whatis command description and the whatis command manual section:

Using whatis command to show whatis command description and the whatis command manual section:

[root@fedora ~]# whatis whatis

whatis []            (1)  - search the whatis database for complete words

[root@fedora ~]#

 

Using whatis command to show makewhatis command description and the makewhatis command manual section:

Using whatis command to show makewhatis command description and the makewhatis command manual section:

[root@fedora ~]# whatis makewhatis

makewhatis []        (8)  - Create the whatis database

[root@fedora ~]#

 

Using whatis command to show man command description and the man command manual section:

Using whatis command to show man command description and the man command manual section:

[root@fedora ~]# whatis man

man []               (1)  - format and display the on-line manual pages

man []               (1p)  - display system documentation

man []               (7)  - macros to format man pages

man []               (7)  - pages - conventions for writing Linux man pages

man.config []        (5)  - configuration data for man

man-pages           (rpm) - Man (manual) pages from the Linux Documentation Project

man                 (rpm) - A set of documentation tools: man, apropos and whatis

[root@fedora ~]#

 




Show IPC Message Queues using ipcs Command



Computer Configuration GNU Linux Fedora using Linux Command

 

   The ipcs command example below is execute to display and show the IPC message queues information.  The ipcs command with -q option below is execute to display the IPC message queues information on Linux Fedora 9 machine.

Show IPC facilities information on Message Queues:   ipcs -q

Show IPC Message Queues using ipcs Command

[root@fedora ~]# ipcs -q

 

------ Message Queues --------

key        msqid      owner      perms      used-bytes   messages

 

[root@fedora ~]#

 




Show IPC Semaphore Arrays using ipcs Command



Computer Configuration GNU Linux Fedora using Linux Command

 

   The command example  below show the IPC Semaphore Arrays information using ipcs command. The step by step command example below show the ipcs command with -s option is execute, on Linux Fedora 9 machine to show IPC Semaphore Arrays information.

Show IPC facilities information on Semaphore Arrays ipcs -s

Show IPC Semaphore Arrays using ipcs Command

[root@fedora ~]# ipcs -s

 

------ Semaphore Arrays --------

key        semid      owner      perms      nsems

0x000000a7 0          root      600        1

0x4d003d23 131073     root      600        8

 

[root@fedora ~]#

 




Show IPC Shared Memory Segments using ipcs Command



Computer Configuration GNU Linux Fedora using Linux Command

 

   The command example below use the ipcs command to show the shared memory segments for ipc facilities information.  The example of ipcs command with - m option as show on the command example below, is execute to show IPC shared memory segments on Linux Fedora 9 machine.

Show  IPC facilities information on Shared Memory Segments:   ipcs -m

Show IPC Shared Memory Segments using ipcs Command

[root@fedora ~]# ipcs -m

 

------ Shared Memory Segments --------

key        shmid      owner      perms      bytes      nattch     status

0x00000000 262144     root      600        393216     2          dest

0x00000000 32769      root      644        40         2

0x00000000 65538      root      644        16384      2

0x00000000 98307      root      644        268        2

0x00000000 294916     root      600        393216     2          dest

0x00000000 327685     root      600        393216     2          dest

0x00000000 360454     root      600        393216     2          dest

0x00000000 393223     root      600        393216     2          dest

0x00000000 425992     root      600        393216     2          dest

0x00000000 458761     root      600        393216     2          dest

0x00000000 491530     root      600        393216     2          dest

0x00000000 524299     root      600        393216     2          dest

0x00000000 557068     root      600        393216     2          dest

0x00000000 589837     root      600        393216     2          dest

0x00000000 622606     root      600        393216     2          dest

0x00000000 655375     root      600        393216     2          dest

 

[root@fedora ~]#

 




Show IPC Interprocess Communication Facilities using ipcs Command



Computer Configuration GNU Linux Fedora using Linux Command

 

   The ipcs command can be use to provide the information on interprocess communication facilities (IPC).  The command example below show how to use the ipcs command to get the information about interprocess communication facilities, including the information on Shared Memory Segments, information on Semaphore Arrays, information on Message Queues.  The ipcs command below is execute to show the ipc facilities information on Linux Fedora 9.

Show all ipc facilities information using the ipcs command :  ipcs  or  ipcs -a

Show IPC Interprocess Communication Facilities using ipcs Command

[root@fedora ~]# ipcs -a

 

------ Shared Memory Segments --------

key        shmid      owner      perms      bytes      nattch     status

0x00000000 262144     root      600        393216     2          dest

0x00000000 32769      root      644        40         2

0x00000000 65538      root      644        16384      2

0x00000000 98307      root      644        268        2

0x00000000 294916     root      600        393216     2          dest

0x00000000 327685     root      600        393216     2          dest

0x00000000 360454     root      600        393216     2          dest

0x00000000 393223     root      600        393216     2          dest

0x00000000 425992     root      600        393216     2          dest

0x00000000 458761     root      600        393216     2          dest

0x00000000 491530     root      600        393216     2          dest

0x00000000 524299     root      600        393216     2          dest

0x00000000 557068     root      600        393216     2          dest

0x00000000 589837     root      600        393216     2          dest

0x00000000 622606     root      600        393216     2          dest

0x00000000 655375     root      600        393216     2          dest

 

------ Semaphore Arrays --------

key        semid      owner      perms      nsems

0x000000a7 0          root      600        1

0x4d003d23 131073     root      600        8

 

------ Message Queues --------

key        msqid      owner      perms      used-bytes   messages

 

[root@fedora ~]#

 

Other example using ipcs command:

Show ipc Shared Memory Segments

Show ipc Semaphore Arrays

Show ipc Message Queues

 




View and Show Linux inittab Configuration File on Linux Fedora 8



Computer Configuration GNU Linux Fedora using Linux Command

 

   The inittab configuration file, is use on Linux system to describes init default, the process that need to start at bootup and the process on normal working operation.  The inittab configuration file in earlier Linux Fedora system, Fedora Core till Fedora 8 are quite different then the inittab configuration file on Fedora 9 and newer Fedora version.  The example below show the inittab configuration file on Linux Fedora 8 machine, the inittab on Linux Fedora 8 is located under /etc directory.

To view the inittab file under /etc directory, execute command:    cat /etc/inittab

Linux Fedora 8 inittab configuration file.

[root@localhost ~]# /bin/cat /etc/inittab

#

# inittab       This file describes how the INIT process should set up

#               the system in a certain run-level.

#

# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>

#               Modified for RHS Linux by Marc Ewing and Donnie Barnes

#

 

# Default runlevel. The runlevels used by RHS are:

#   0 - halt (Do NOT set initdefault to this)

#   1 - Single user mode

#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)

#   3 - Full multiuser mode

#   4 - unused

#   5 - X11

#   6 - reboot (Do NOT set initdefault to this)

#

id:5:initdefault:

 

# System initialization.

si::sysinit:/etc/rc.d/rc.sysinit

 

l0:0:wait:/etc/rc.d/rc 0

l1:1:wait:/etc/rc.d/rc 1

l2:2:wait:/etc/rc.d/rc 2

l3:3:wait:/etc/rc.d/rc 3

l4:4:wait:/etc/rc.d/rc 4

l5:5:wait:/etc/rc.d/rc 5

l6:6:wait:/etc/rc.d/rc 6

 

# Trap CTRL-ALT-DELETE

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

 

# When our UPS tells us power has failed, assume we have a few minutes

# of power left.  Schedule a shutdown for 2 minutes from now.

# This does, of course, assume you have powerd installed and your

# UPS connected and working correctly.

pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"

 

# If power was restored before the shutdown kicked in, cancel it.

pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"

 

 

# Run gettys in standard runlevels

1:2345:respawn:/sbin/mingetty tty1

2:2345:respawn:/sbin/mingetty tty2

3:2345:respawn:/sbin/mingetty tty3

4:2345:respawn:/sbin/mingetty tty4

5:2345:respawn:/sbin/mingetty tty5

6:2345:respawn:/sbin/mingetty tty6

 

# Run xdm in runlevel 5

x:5:respawn:/etc/X11/prefdm -nodaemon

[root@localhost ~]#

 

View inittab file permission, execute command:    ls -l /etc/inittab

View inittab configuration file on Linux Fedora 9

[root@localhost ~]# /bin/ls -l /etc/inittab

-rw-r--r-- 1 root root 1666 2008-01-25 09:07 /etc/inittab

[root@localhost ~]#

 

The example on how to change default runlevel on boot up, and Linux Fedora 9 inittab configuration file here.

 




Show List of Kernel Parameters on Linux Fedora using sysctl Command



Computer Configuration GNU Linux Fedora using Linux Command

 

   The step by step command example below use the sysctl command to list kernel parameters on Linux Fedora.  The sysctl command below is execute on Linux Fedora 9 to show the list of kernel parameters and then the sysctl command output is pipe to less command to make the kernel parameters list scrollable.

sysctl command example:   sysctl -a | less

Show kernel parameters list on Linux Fedora

[root@fedora ~]# sysctl -a | less

[root@fedora ~]#

 




Properly Shutdown Linux Fedora using shutdown Command



Computer Configuration GNU Linux Fedora using Linux Command

 

   To properly shutdown Linux Fedora machine we can use the shutdown command.  The command example below show how to shutdown Linux Fedora properly using shutdown command.  To execute shutdown command you may need root user privileges, use the su command as example below if you log in as normal user and want to shutdown Linux Fedora machine using shutdown command.

Shutdown command:  shutdown -h now 

Properly Shutdown Linux Fedora using shutdown Command

login as: root

root@192.168.1.4's password:

Last login: Fri Nov 14 04:29:08 2008 from 192.168.1.3

[root@fedora ~]# shutdown -h now

 

Broadcast message from root@fedora.linux.com

        (/dev/pts/0) at 20:38 ...

 

The system is going down for halt NOW!

[root@fedora ~]#

 

if you log in as normal user you may get message below.... .

login as: fedora

fedora@192.168.1.4's password:

[fedora@fedora ~]$ shutdown -h now

-bash: shutdown: command not found

[fedora@fedora ~]$

 

Then you should use shutdown command: su -c "/sbin/shutdown -h now" as show on example below.

Shutdown Linux Fedora

[fedora@fedora ~]$ su -c "/sbin/shutdown -h now"

Password:    <---- key in root user password here and hit Enter key

[fedora@fedora ~]$

Broadcast message from fedora@fedora.linux.com

        (/dev/pts/1) at 1:33 ...

 

The system is going down for halt NOW!

 




Show and View Hard Disk Partition Table on Linux Fedora 9 using fdisk Command



Computer Configuration GNU Linux Fedora using Linux Command

 

   The step by step command below show the step to view hard disk partition table on Linux fedora 9.  The fdisk command or fdisk tool is use in the article below to show the list of Linux partition table on the hard disk drives.  On Linux Fedora 9, the first hard disk on the system usually detect as sda and the second hard disk on the system detect as sdb, and the fdisk command example below will show the partition table on both hard disk drive.

Show first hard disk partition table on the Linux Fedora system /dev/sda partition:

1st command, to invoke fdisk tool to show partition on device sda:        fdisk /dev/sda

2nd command, display partition table:            p

3rd command, exit fdisk tool:                        q

Show Linux partition table

[root@fedora ~]# fdisk /dev/sda

 

The number of cylinders for this disk is set to 1305.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

 

Command (m for help): p

 

Disk /dev/sda: 10.7 GB, 10737418240 bytes

255 heads, 63 sectors/track, 1305 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x00011e25

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          25      200781   83  Linux

/dev/sda2              26        1305    10281600   8e  Linux LVM

 

Command (m for help): q

 

[root@fedora ~]#

 

Show second hard disk partition table on the Linux Fedora system /dev/sdb partition:

1st command, to invoke fdisk tool to show partition on device sdb:        fdisk /dev/sdb

2nd command, display partition table:            p

3rd command, exit fdisk tool:                        q

List Linux partition table

[root@fedora ~]# fdisk /dev/sdb

 

The number of cylinders for this disk is set to 38154.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

 

Command (m for help): p

 

Disk /dev/sdb: 40.0 GB, 40007761920 bytes

64 heads, 32 sectors/track, 38154 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

Disk identifier: 0x836cebc0

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1       38154    39069680   83  Linux

 

Command (m for help): q

 

[root@fedora ~]#

 

Note: Other way to show all Linux partition table is using fdisk -l option

 




Linux Clear Screen Using clear Command on Linux Fedora 9



Computer Configuration GNU Linux Fedora using Linux Command

 

   On Linux, The most simple way to clear screen or to clear terminal screen is with clear command.  The command example below show step by step using the Linux clear command to clear current working terminal.  The Linux clear screen article, using clear command below is execute on Linux Fedora 9.

The example of Linux terminal screen before run the clear command.

Linux clear screen using clear command on Linux Fedora 9

|-- proc

|-- root

|-- sbin

|-- selinux

|-- srv

|-- sys

|-- tmp

|-- usr

`-- var

 

19 directories, 0 files

[root@fedora ~]#

 

The example of Linux terminal screen after run clear command to clear screen terminal.

Clear screen command to clear screen on Linux Fedora

[root@fedora ~]# clear

[root@fedora ~]#

 




Check File Size on Linux Fedora Using du Command



Computer Configuration GNU Linux Fedora using Linux Command

 

   On Linux, the du command usually use to estimate file space usage.  The step by step example below use the du command to check files size on Linux.  The step by step example on how to show file size below is executed on Linux Fedora 9 operating system.

The du command example below check and show all the file and directory size on current directory.

Check File Size on Linux Fedora Using du Command

[root@fedora ~]# du

 

4       ./Download

4       ./.gnome2_private

52      ./.tomboy/addin-db-001/addin-data/global

12      ./.tomboy/addin-db-001/addin-data/1

68      ./.tomboy/addin-db-001/addin-data

12      ./.tomboy/addin-db-001/addin-dir-data

8       ./.tomboy/addin-db-001/hosts

96      ./.tomboy/addin-db-001

8       ./.tomboy/addins

120     ./.tomboy

35576   .

[root@fedora ~]#

 

To view all the file size and directory size using the human readable format, the du command with -h option is use as show on example below.

Fedora Linux File size

[root@fedora ~]# du –h

 

4.0K    ./Download

4.0K    ./.gnome2_private

52K     ./.tomboy/addin-db-001/addin-data/global

12K     ./.tomboy/addin-db-001/addin-data/1

68K     ./.tomboy/addin-db-001/addin-data

12K     ./.tomboy/addin-db-001/addin-dir-data

8.0K    ./.tomboy/addin-db-001/hosts

96K     ./.tomboy/addin-db-001

8.0K    ./.tomboy/addins

120K    ./.tomboy

35M     .

[root@fedora ~]#

 

To view file size on Linux, just use the du command and then the filename that you want to view as shown on example below.

Linux Check File Size

[root@fedora ~]# du -h install.log

76K     install.log

[root@fedora ~]#

 




View and Check Directory Size on Linux Fedora Using du Command



Computer Configuration GNU Linux Fedora using Linux Command

 

   The step by step by step command example below show the use of du command to view and check the directory size on Linux.  The du command is use on the command example below to check the directory size on Linux Fedora 9. 

The command below use the du command to check the Desktop directory size and including all files and directories on inside the directory.

Check Directory Size on Linux Fedora Using du Command

[root@fedora ~]# du -h Desktop/

304K    Desktop/printer

220K    Desktop/fedora_9/dmidecode

56K     Desktop/fedora_9/free

128K    Desktop/fedora_9/sha1sum

140K    Desktop/fedora_9/fdisk

88K     Desktop/fedora_9/sysreport

1.6M    Desktop/fedora_9

2.1M    Desktop/

[root@fedora ~]#

 

The command example below show the du command with option -sh to view the directory size only.

View Directory Size on Linux Fedora Using du Command

[root@fedora ~]# du -sh Desktop/

2.1M    Desktop/

[root@fedora ~]#

 




Find and Display Kernel Information Installed on Linux Fedora Using rpm command



Computer Configuration GNU Linux Fedora using Linux Command

 

   The rpm command can be use to show the rpm package information. The example below show how to find more information about install kernel information, such as kernel name, kernel version, kernel vendor, kernel release, kernel built date, kernel install date, kernel build host, kernel group, kernel source RPM, kernel size, kernel license, kernel signature, kernel packager, kernel URL, kernel summary and kernel description using rpm command...  you can use rpm -qi as show on example below to get rpm package information.  The step by step how to get and show kernel information below, execute on Linux Fedora 9.

Kernel package information:

Find and Display Kernel Information Installed on Linux Fedora

[root@fedora /]# rpm -qi kernel

Name        : kernel                       Relocations: (not relocatable)

Version     : 2.6.25.10                         Vendor: Fedora Project

Release     : 86.fc9                        Build Date: Mon 07 Jul 2008 09:08:02 PM EDT

Install Date: Tue 02 Sep 2008 07:09:30 PM EDT      Build Host: x86-6

Group       : System Environment/Kernel     Source RPM: kernel-2.6.25.10-86.fc9.src.rpm

Size        : 52051447                         License: GPLv2

Signature   : DSA/SHA1, Mon 14 Jul 2008 01:08:06 PM EDT, Key ID b44269d04f2a6fd2

Packager    : Fedora Project

URL         : http://www.kernel.org/

Summary     : The Linux kernel

Description :

The kernel package contains the Linux kernel (vmlinuz), the core of any

Linux operating system.  The kernel handles the basic functions

of the operating system: memory allocation, process allocation, device

input and output, etc.

[root@fedora /]#