Some of the most commonly used Linux terminal commands

By analogy with Windows, Linux has a certain set of commands for the most convenient and fast work in the operating system. But if in the first case we call the utility or perform an action from the “Command Line” (cmd), then in the second system the actions are performed in the terminal emulator. Essentially, “Terminal” and “Command Line” are the same thing.

conclusions

In this article we will cover almost all the linux terminal commands that you may encounter in various distributions. Naturally, this list may not be complete, since it is difficult to cover all the utilities in one article. Also, there are no answers to all questions regarding these utilities, but the article provides direction for searching for information and discovering new features of Linux. If you know of other Linux console commands that come by default and were missed in the article, please write in the comments!

Related posts:

No similar posts

Help/Documentation

  1. man

    (Manual). Shows instructions for Linux programs and commands. To get the program manual, type:

    man program_name

    For command instructions, enter:

    man command_name

  2. whatis

    Displays a brief description of the program. Example:

    whatis program_name

  3. whereis

    Shows the full path to the executable file and other program files. Example:

    whereis program_name

    Also provides information about program-related help information.

  4. file

    Shows what type the file is . The peculiarity of Linux is that working files may not have an extension. Therefore, the user may have problems identifying the files that this command removes.

  5. --help

    All necessary information about the team will be available if you type:

    program_name --help

  6. whoami

    The command displays the actual user ID (UID).

  7. TAB

    Shows command auto-completion . Pressing the tab key after a certain command or sequence of commands displays a tooltip with options for possible continuation of the command.

  8. Ctrl+R

    This keyboard shortcut helps you run a reverse search for all parameters associated with the specified command. You just need to specify a keyword to search. There is a serious disadvantage - you can only see 1 result at a time. The Ctrl + C combination will help you exit the reverse search mode.

Package Operations

To work with packages in Ubuntu, there is a special tool - Advanced Packaging Tool. It is also called Package Manager. The instructions for this program are used to install, update, or erase software packages. If necessary, the application can work automatically.

Installing and updating packages:

apt-get install name

Get current lists of packages:

apt-get update

Get updates for packages that are already installed:

apt-get upgrade

And you can also add the following important parameters to the apt-get command, separated by a space:

  • check to check if dependencies are met;
  • clean to remove archived package files that were previously downloaded;
  • autoclean to automatically clean up all archived copies of packages.

Abnormal termination of programs (processes)

TeamWhat is he doing
xkillselect the window with the program you want to end
kill [parameter] PIDforce termination of a frozen program. PID - process ID. Example - kill 2484.
psdetermining the process ID. ps -a and ps -U root - these commands allow you to get to the necessary processes if they are running in other terminals. The first command displays a list of processes running by you, and the second - on your behalf (if you are running as root).
ps -ax | grep Calculate the PID of a process with a known name. Example # ps -ax | grep firefox
killallthe most convenient way to terminate a process without knowing its ID. Kills all running processes in all consoles with the given name
Ctrl+C or Ctrl+|stop the script from running on the command line
Rating
( 1 rating, average 5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]