How to use Man Command in Linux ?

Linux

The man command, short for manual, is a built-in command in Linux distributions. It is used to display the manual pages for a specified command, system call, library function, or file format. The manual pages, often referred to as man pages, provide concise documentation for various Linux commands and functions.

Here at Fixwebnode, we shall look into how to use the Man command in Linux.

 

How to Use the Man Command ?

The syntax for the man command is as follows:

$ man [options] command

The command argument is required, and is the name of the command whose manual page you wish to view.

 

Man Command Options

The man command has several options for displaying manual pages.

  • -f: Displays the manual page for the command name specified.
  • -k: Searches the manual page database for the command name specified.
  • -t: Formats the manual page and outputs it in PostScript format.
  • -w: Writes the path of the manual page to the standard output.

 

Examples of using Man Command 

1. To view the manual page for the ls command:

$ man ls

 

2. To search the database for a command related to file permissions:

$ man -k file perms

 

3. To format the manual page for the grep command in PostScript format:

$ man -t grep

 

4. To display the manual page for the passwd command:

$ man passwd

 

5. To write the path of the manual page for the chown command to the standard output:

$ man -w chown

 

6. To view the manual page for the awk command:

$ man awk

 

7. To search the database for a command related to creating a file:

$ man -k file create

 

8. To format the manual page for the cp command in PostScript format:

$ man -t cp

 

9. To display the manual page for the cut command:

$ man cut

 

10. To write the path of the manual page for the chmod command to the standard output:

$ man -w chmod

 

11. To view the manual page for the sed command:

$ man sed

 

[Need Linux Support ? We can help you. ]

 


Conclusion

Your Cart