Getting help on Linux is very easy. Linux has a set of manuals that can be used by users and administrators to consult information about the commands for help.
Linux has some user help channels, such as:
Most of the commands have a little help through the “–help” option, which includes a short manual:
$ free --help
Usage:
free [options]
Options:
-b, --bytes show output in bytes
-k, --kilo show output in kilobytes
-m, --mega show output in megabytes
-g, --giga show output in gigabytes
--tera show output in terabytes
--peta show output in petabytes
-h, --human show human-readable output
--if you use powers of 1000 not 1024
-l, --lohi show detailed low and high memory statistics
-t, --total show total for RAM + swap
-s N, -- seconds N repeat printing every N seconds
-c N, --count N repeat printing N times, then exit
-w, --wide wide output
--help display this help and exit
-V, --version output version Information and Exit
An interesting source of consultation are the info pages. This documentation was developed by the GNU project and covers most of the project’s tools.
To access this documentation, you must use the info command followed by the name of the desired command. Here’s an example, typing the command in the shell:
# test info
The info makes it possible to navigate between related topics. To browse the info, simply find a “link” consisting of the symbol “*” and a word and press the enter key.
To move to the next page of content, type “N” (Next) and, to return, type “P” (Previous). The “q” key exits the info.
The info command without any arguments lists all existing pages.
# info
The /usr/share/doc directory contains much of the documentation for a Linux distribution and various applications in the form of HOWTOS, FAQs, README files, installation guides, and user manuals.
The /usr/share/doc/howto subdirectory has almost 2000 pages of documentation detailing various tasks step by step.
Here’s an example:
3Dfx-HOWTO.html AI-Alife-HOWTO.html Acer-Laptop-HOWTO.html Alpha-HOWTO.html Bash-Prog-Intro-HOWTO.html Benchmarking-HOWTO.html
This type of documentation is useful when you don’t know how to start a particular task or what tools should be used.
Information about almost all software packages installed on the system can be found in the /usr/share/doc/packages subdirectory. This information may include files with different contents such as README, INSTALL, CHANGES, INFO, FAQ, etc.
How-tos may not always be installed in the distribution, and their path may be different.
$ man [session] command
The man command provides a manual for various GNU Linux commands, as well as a manual for other third-party programs. man offers a simplified interface for programmers to provide a manual for their programs.
The manual pages accompany almost all GNU/Linux programs and can be installed according to the language chosen, if available in the distribution.
The man’s information is called “Man Pages” and it contains a basic description of commands and details about how their options work.
A manual page is viewed as a single text with vertical scrolling. It also documents parameters used in some configuration files.
The documents in the manual are divided into sessions according to the subject discussed. The sessions are numbered from 1 to 9, as follows:
It is possible that the same word may refer to a programming function, command, or configuration file. Therefore, it is important to know in which session we will find the desired documentation.
Each page of the manual is divided into parts:
To access the manual, the command is the man followed by the item searched for. Optionally, the session number can be passed as a parameter.
$ man passwd
In this example, man views the manual for the passwd command, belonging to session 1.
$ man 5 passwd
In this example, man will display the manual for the /etc/passwd file.
Navigation within the manual pages is done using the keys:
If you want to get help with a command on Linux, the easiest way is to use the “man” command to read the manual for the desired command.
Learn much more about Linux in our online course. You can register here. If you already have an account, or want to create one, just log in or create your user here.
Share
The sudo command on Linux executes a given command as if it were another user.…
The ss command on Linux is extremely useful for investigating sockets, providing various information about…
Free Linux command shows the amount of total memory in use and available, as well…
The shell has structures for testing conditions and executing certain program sequences several times (loop),…
The /etc/fstab file stores the configuration of which devices should be mounted and what is…
The Netcat Command in Linux or nc is a utility used to do “almost anything”…
This website uses cookies.