EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 600+ Courses All in One Bundle
  • Login

Help Command in Linux

By Balaji SBalaji S

Home » Software Development » Software Development Tutorials » Linux Tutorial » Help Command in Linux

Help Command in Linux

Introduction to Linux Help Command

Any computer operating system or application or software we use has a help tab that contains an inbuilt guide regarding the particular application which is helpful to the users. Likewise, Linux which is based on command-line utilities also comes up with some helpful options. If someone is using Linux for the first time or having some confusion during their session, one can always use the help option to solve their queries.

What is Help Command?

Before using the help command, we should know what is help command. To be precise help command displays the information about the built-in commands present in the Linux shell.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

Syntax:

$ help [-dms] [pattern...]

Here the pattern specifies the command for which we need help. If the input provided by us matches with any of the built-in shell commands then the help command displays details about that and if the input is not matched then it displays a synopsis of help topics that the user can choose from. Here d, m, and s are options used with the help command.

To get a clear picture of help command, use the following command.

$ help help

This command displays the page which contains the information about the help command itself.

Output:

Help Command in Linux-1.1

Options Used in Help Command

d, m, and s are the options used with the help command.

Popular Course in this category
Linux Training Program (16 Courses, 3+ Projects)16 Online Courses | 3 Hands-on Projects | 160+ Hours | Verifiable Certificate of Completion | Lifetime Access
4.5 (6,013 ratings)
Course Price

View Course

Related Courses
Kali Linux Training (3 Courses, 3+ Projects)Red Hat Linux Training Program (4 Courses, 1+ Projects)

1. -d Option

This option is used in cases when we just need to get an overview of any command built in the shell which means this option just gives a brief description of a command like what it does without providing any details of the options.

Syntax:

$ help -d

2. -m Option

This option displays the output in pseudo-manpage format.

Syntax:

$ help -m

3. -s Option

This option displays only the syntax of a particular command.

Syntax:

$ help –s

Example:

$ help echo

This command will print a short description of the echo command.

Using Help Command with Options

let us consider the command cd. To display the entire information about the cd command passes the string cd as a parameter to the help command.

Syntax:

$ help cd

Output:

Help Command in Linux-1.2

To display all the available information about the cd command -m option is used. This is similar to the man command.

$ help –m cd

Output:

Help Command in Linux-1.3

When you compare the above output with the previous output you can note the difference between both the command outputs. when -m option is not used the output is displayed in an ordinary text format. when the -m option is used with the help command the output is displayed in sections. The man command aligns the information in sections.

suppose you don’t want a full description of the cd command, but you want to know only what the command cd does, then use the option -d.

Syntax:

$ help -d cd

The following output is produced in the system.

Output:

Help Command in Linux-1.4

It can be seen that when -d option is used with the help command, the output displayed contains a short description of what the particular command does.

If you want to know about using the cd command or the syntax of the command you can use the –s option.

Syntax:

$ help –s cd

Getting Help About Internal and External Commands

There are two types of commands in a Linux shell: External commands and internal commands. Internal commands are those built-in the shell. They will be automatically installed while installing the shell. so most of the internal commands doesn’t install any distinct documentation.

The help command can be used only to get help about the internal command. It cannot be used for external commands. If you provide an external command as a parameter to the help command then the output will display the error message as shown below.

Output:

Help Command in Linux-1.5

For instance, if we provide password command as the parameter for the help command then you will see the error message as shown below.

Output:

Help Command in Linux-1.6

To find out whether a given command is internal or external we have to use which command. The command displays the information about the location of the command which is specified. We know that internal commands are a part of the Linux shell and they will be directly executed from the shell. Hence, if the input command is internal then the which command won’t produce any output. If the command specified is an external one, then the installation path of the specified command will be displayed by the which command.

To view, all the internal commands use the following command line.

Syntax:

$ compgen -b | column

Output:

Output-1.7

The external command comes with the packages. They will be installed along with their respective packages. Normally when a Linux package instates an external command, it will also install documentation about that command.

Other Ways to Get Help on The Linux Shell

Using Tab Completion: If we are not sure about the accurate name of a certain command then we can use the tab completion. Start the terminal by using Ctrl + Alt + T or by clicking the terminal icon present in the taskbar. Now enter the command that you want to know and then hit tab twice and the output is produced as shown below.

Output:

Output-1.8

Using Unknown Command: If you wanna use a particular command but you are not sure whether the command is installed in the Linux shell or even if it exists you don’t know which package contains it, you can still use the command. Start the terminal by using Ctrl + Alt + T or by clicking the terminal icon present in the taskbar. Now enter the command that you want to check and then press enter. The output will be displayed which will tell whether the command is installed in the shell or not. If the command is displayed then the output will tell the package in which the command exists.

Output:

Output-1.9

The Info Command: This command is used to get help for commands which don’t contain manuals or contains incomplete manuals.

Example: info bash

Whatis Command: This command provides the one-line description of the specified command without providing the entire manual.

Syntax:

$ whatis [command name]

Recommended Articles

This is a guide to Help Command in Linux. Here we discuss the Introduction and what is Help Command in Linux along with options used in help command. You may also have a look at the following articles to learn more –

  1. du Command in Linux
  2. SCP Command in Linux
  3. Linux Filter Commands
  4. Tail Command in Linux

Linux Training Program (16 Courses, 3+ Projects)

16 Online Courses

3 Hands-on Projects

160+ Hours

Verifiable Certificate of Completion

Lifetime Access

Learn More

0 Shares
Share
Tweet
Share
Primary Sidebar
Linux Tutorial
  • Linux Commands
    • CAT Command in Linux
    • PS command in Linux
    • Mkdir Command in Linux
    • rmdir command in Linux
    • mv command in Linux
    • Linux rm Command
    • CHMOD Command in Linux
    • Zip Command in Linux
    • Linux Route Command
    • SCP Command in Linux
    • du Command in Linux
    • Less Command in Linux
    • Copy Command in Linux
    • Head Command in Linux
    • Help Command in Linux
    • Linux History Command
    • hostname Command in Linux
    • GREP Command in Linux
    • Linux Curl Command
    • Linux List Users
    • Linux List Directories
    • Linux Directory Permissions
    • Find Directory Linux
    • Linux User Permission
    • Linux Add User
    • Linux Delete User
    • Linux uniq
    • Linux Filter Commands
    • Linux sort Command
    • Linux Sort by Size
    • Remove dir Linux
    • Linux tr Command
    • Linux Touch Command
    • Linux More Command
    • Linux Cal Command
    • Linux OD
    • Linux Zcat
    • Linux tracepath
    • Linux Sleep
    • Linux bg Command
    • Linux WC
    • Linux Read
    • Linux Write
    • Linux Rename Command
    • Linux Free Command
    • Linux tac
    • Linux Shred
    • Linux wget
    • Linux Date
    • Linux Untar
    • Linux JQ
    • Linux Xargs
    • Linux Mount Command
    • Linux mdadm
    • Linux comm
    • Linux tee Command
    • Tail Command in Linux
    • Linux gzip
    • Linux Directory Structure
    • Linux Alias Command
    • Linux Inode
    • Linux Ping
    • Linux Watch Command
    • Linux Split Command
    • Linux Size
    • Linux Network Stack
    • Linux Diff Command
    • Vim Command in Linux
    • Linux nslookup
  • Basic
    • Introduction to Linux
    • What is Linux
    • Careers in Linux
    • How to Install Linux
    • How to Install Ubuntu
    • How to Install Ubuntu Server
    • How To Install Debian
    • Advantage Of Linux
    • What is Raid in Linux
    • What is Raid 5?
    • Raid 5 vs Raid 6
    • Careers in Linux Administration
    • What is Shell in Linux?
    • Bash Shell in Linux
    • Linux Emulator
    • Linux Operators
    • Linux Apps
    • Linux Keyboard Shortcuts
    • Linux Crontab
    • What is Raid Storage
    • What is Vmware
    • What is RedHat
    • What is Debian
    • Uses of Ubuntu
    • Career In RedHat
    • Linux Distributions
    • Linux From Scratch
    • Linux Format
    • Cheat Sheet Linux
  • Advanced
    • Install VMware
    • Install GRUB
    • Chown Command in Linux
    • Linux Network Command
    • Configuring Linux Network Environment
    • DNS Configuration in Linux
    • Linux Users
    • Create User in Linux
    • DHCP Server in Linux
    • FTP Server in Linux
    • Linux Regular Expression
    • IP Command in Linux
    • Set IP Address in Linux
    • Tar Command in Linux
    • Dynamic Host Configuration Protocol
    • Linux Kill Signals
    • Linux File Permissions
    • Linux File System
    • Linux Create File
    • Linux Concatenate Files
    • Linux Join
    • Linux Process Management
    • Linux Proxy Server
    • Linux System Commands
    • Linux System Logging
    • NFS in Linux
    • Linux LVM
    • Linux Repository
    • Samba Server in Linux
    • Top Commands in Linux
    • Types of Shells in Linux
    • Shell Script Types For Linux
    • GCC Command in Linux
    • Monolithic Kernel
    • YARN Package Manager
    • Linux Sed Replace
    • Linux List Groups
    • Linux Container
    • Linux Find File by Name
    • Create Folder in Linux
    • Linux Move Folder
    • Linux Error Codes
    • Linux Automount
    • Linux HugePages
  • Kali Linux
    • Install Kali Linux
    • Kali Linux Uses
    • Kali Linux Commands
    • Kali Linux Repository
    • Kali Linux Packages
    • Kali Linux root password
    • Kali Linux Alternative
  • Interview Questions
    • Linux Interview Questions
    • Linux System Administration Interview
    • Red Hat Interview Questions

Related Courses

Kali Linux Training

Linux Training Course

Red Hat Training Course

Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Java Tutorials
  • Python Tutorials
  • All Tutorials
Certification Courses
  • All Courses
  • Software Development Course - All in One Bundle
  • Become a Python Developer
  • Java Course
  • Become a Selenium Automation Tester
  • Become an IoT Developer
  • ASP.NET Course
  • VB.NET Course
  • PHP Course

© 2020 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA Login

Forgot Password?

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you
Book Your One Instructor : One Learner Free Class

Let’s Get Started

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

Special Offer - Linux Training Program (16 Courses, 3+ Projects) Learn More