man Command in Linux

Learn via video courses
Topics Covered

Overview

The man command in Linux is a utility that allows users to access the built-in manual pages of various commands and programs. These manual pages contain detailed information about the syntax, options, and usage of commands, helping users to better understand and utilize the tools available in their Linux environment.

Transform Your Career

Choose from our industry-leading programs designed for career success

NSDC Certified

Modern Software and AI Engineering Program

Master full-stack development with AI integration

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Modern Data Science and ML with specialisation in AI

Advanced data science techniques with AI specialization

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Advanced AIML with Specialisation in Agentic AI

Deep dive into AIML with focus on Agentic systems

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

DevOps, Cloud & AI Platform Engineering

Build and manage AI-powered cloud infrastructure

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

AI Engineering Advanced Certification by IIT-Roorkee

Premier AI engineering certification from IIT-Roorkee

3 MonthsDuration
AI-LedCurriculum
Career SupportSupport
Program highlights
Go to Program

Linux man Command Syntax

The syntax for the man command is as follows:

Where:

  • option: Optional flags that modify the behavior of the man command.
  • section: The section number of the manual to search in. If not provided, man searches in all sections.
  • command: The command or program whose manual page you want to view.

man Command Options:

  • -f: Displays a list of manual pages with a short description for the given command.
  • -k: Searches for manual pages containing the specified keyword in their description.
  • -a: Displays all available manual pages for the given command in all sections.
  • -w: Displays the file path of the manual page for the given command.

Example Usages

  • Display the manual page for the 'ls' command.:

    Output:

    Explanation: This command opens the manual page for the 'ls' command, showing its syntax, options, and usage.

  • Find the manual page containing the keyword 'copy'.:

    Output:

    Explanation: This command searches for manual pages containing the keyword 'copy' and returns a list of matches with short descriptions.

Turn Learning into Career Growth

1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary
1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary

Tips

  • If you don't know the exact command, try using 'man -k' with a keyword to find relevant manual pages.

  • To exit a manual page, press 'q'.

Scaler Placement Report and Statistics

₹23L
AVG CTC
SCALER PLACEMENT PROOF

Scaler learners achieved 2.5x salary growth with average post-Scaler CTC reaching ₹23L.

11,000+placements
650+companies
Verified data

Advanced Use Cases of man Command in Linux

  • Display all manual pages for the 'passwd' command.:

    Output:

    Explanation: This command shows all available manual pages for the 'passwd' command in all sections.

  • Display the file path of the 'df' command's manual page.:

    Output:

    Explanation: This command displays the file path of the 'df' command's manual page.

  • Display the manual page for the 'chown' command in section 2.:

    Output:

    Explanation: This command opens the manual page for the 'chown' command in section 2.

Conclusion

  • man command is a powerful tool to access built-in manual pages.

  • It offers various options for searching and viewing manual pages.

  • Manual pages provide detailed information about command syntax, options, and usage.

Hiring Partners:
GoogleGoogleAmazonAmazonMicrosoftMicrosoftFlipkartFlipkartAdobeAdobe1200+ more