When you're navigating through the Linux terminal, there's a good chance you'll
need help figuring out how to use certain commands. While many external commands
and programs offer a
--help option for quick insights into their
functionalities, what about the shell built-in commands? That's where the
command comes into play. Unlike the
--help option, the
exclusively serves shell built-ins, providing details about their usage,
options, and more. Let's dive in.
The basic syntax for the
help command is:
help [option] [command]
[options]is optional flags you can provide to tailor the output,
[command]represents the shell built-in command for which you're seeking help.
Exclusivity for Shell Built-ins
help command is exclusive in nature. It is strictly designed to provide
information about shell built-in commands. These are commands integrated within
the shell itself, such as
read, and so forth. If you try to
help for external commands or programs, it simply won't work.
|Show a short description for each built-in|
|Display built-in help in a manpage-style|
help for the
The simplest way to use
help is to type it followed by the name of the
built-in command you want information on.
This will produce a detailed description of what the
cd command does, along
with the options you can use with it.
-d for Multiple Commands
If you want a brief description of several commands, you can use a wildcard
combined with the
help -d "c*"
This will output a list of all built-in commands that start with the letter "c", along with a short description of each.
help -m for Manpage-style Output
Sometimes, you might prefer viewing the information in a manpage-style format.
This can be accomplished using the
help -m cd
This will display the help content for the
cd command in a manner similar to a
manpage, making it easier to read and understand.
help command is essential for mastering the Linux terminal,
especially when you're dealing with shell built-in commands. This specialized
tool is your go-to for getting insights into how built-in commands work, how
they are to be used, and what options they offer. Its exclusivity for shell
built-ins means you won't find details about external programs or commands, but
when it comes to built-ins, it's the most informative guide you'll find right at
your command line.
What Can You DO Next 🙏😊
If you liked the article, consider subscribing to Cloudaffle, my YouTube Channel, where I keep posting in-depth tutorials and all edutainment stuff for software developers.