Tutorials

Help with linux commands from terminal

Table of contents:

Anonim

Do you need help with linux commands from the terminal? If you are an inexperienced user, many times you may not know what to write in the Linux terminal. There are very few tools built into the terminal to help you find help.

Help linux commands from terminal (Guide)

These tricks will help you find the command to use, to find out how to install, learn how to use it, and see detailed information about Linux. None of these tricks require an internet connection.

help

The help command saves and displays information about the bash commands .

If we do not know and have doubts about how to use a command, typing in the terminal –help will show us a list including the options of a certain command.

man

The function of the man command is to display the detailed manuals for each command. These are known as "man-pages". Man pages generally contain much more detailed information than you will get with the -ho –help option.

Syntax: man command

Options:

  • -a: shows all pages of the manual.-h: help message.-w: shows the location of the manual pages to appear.

Section:

  1. bin: essential binaries for system operation.sys: system calls.lib: library functions.dev: device files (ex: HD, pendrive, video card, printer, etc.).etc: configuration files.games.misc: miscellaneous.sbin: essential binaries for system administration and maintenance (root).boot: kernel.

Examples:

Information about the ls command:

man ls

Show information about the configuration file of the “rpc-portmap”:

man 5 rpc

info

Some programs do not have "man-pages" or are very incomplete. In view of this, you will have to use the info command instead of the man command. This function displays information from a system command.

Syntax: info command

Options:

  • -d nome_dir: add a directory to the list of directories to be searched for files.-f arqinfo: specify the file to be used by the info command.-h: help message.

Example:

info ls

Note: to exit info , press Q.

pinfo

Information display browser for a system command.

Syntax: pinfo command

Options:

-f arqinfo: Specify the file to be used by the pinfo command.

Examples:

pinfo ls

Remark: To exit pinfo, press Q.

whatis

The whatis command displays a one-line summary of a command, taken from its man-pages. It is a quick way to see what a command contains. With these tricks it is possible to start using a Linux shell and learn new commands without Googling anything at all.

Whatis consults system manuals from a database. This database must be periodically updated with the makewhatis command (only with the root user). For help on this command, type: makewhatis -?

Syntax: whatis keyword

Example:

whatis find

apropos

The linux apropos command looks for "man-pages" that contain a phrase, so it's a quick way to find a command that can do something. It is the same as executing the man-k command. Apropos displays information on a topic from a database. It is the same as the whatis command.

Syntax: apropos keyword

Example:

apropos directory

Note: the difference between these two commands is that whatis needs the exact name of the command and apropos can put the name of the command or what it does.

Example: all the information about the commands that use emails will be listed:

apropos mail

stat

Another linux command is stat, which shows the status of the files or the file system.

Show file status:

stat file

comm

Compare two files sorted line by line.

Example: compare the two files and show the difference line by line:

comm letters1 letters2

We recommend reading the 5 keys to use in the linux grub.

file

Shows the type of file, in case it is an image, a binary file, a text file, etc.

WE RECOMMEND YOUHow to update BIOS on motherboard for AMD Ryzen 3000

Example:

file SPCBrasil.jpg # Image file file file.txt # Text file file: / usr / bin / passwd # Binary file (executable program)

-ho –help

If you are not sure how to use a specific command, run the command with the -ho –help switches. You will see usage information and a list of options that can be used with the command. For example, if you want to know how to use the wget command, type "wget ​​–help" or "wget ​​-h".

But printing a large amount of information to the terminal can be an inconvenience to move. To read the output easier, it can be piped through the less command, allowing you to scroll through the terminal using the arrows on your keyboard. For example, use the following command:

wget –help | less

Press "q" to close the less utility when you're done.

To find a specific option, you can pipe the output through the grep command. For example, use the following command to find options that contain the word "proxy":

wget –help | grep proxy

Command not found

If you know the command you want to use, but don't know the package that contains it, you can type the command in the terminal anyway. Ubuntu will indicate the package that contains the command and will show you the commands that can be used to install it.

Suppose you want to use the rotate command to rotate an image. We could type the command in the Ubuntu terminal and it will tell you that you have to install the jigl package to get this command.

Experienced users working with different Linux distributions find that it is easier to learn the commands that can be used in all varieties of Ubuntu and, in fact, in other Linux distributions as well.

What did you think of our tutorial on linux help commands? Have you been interested? Did you already know him? As always we recommend reading our tutorials and if you have any questions, you can contact us.

Tutorials

Editor's choice

Back to top button