Understanding the Linux Command Line

Custom Server

Custom server

Create your own custom dedicated server

See configurator

Command line, shell, console - these terms are used to refer to human interaction with the operating system using standard input-output devices that provide command input and receive the results of their execution. In operating systems of the Linux family, such interaction is provided by a special software product - the shell.

The most common of these is the shell of the GNU bash project.

Before we move on to bash further, we need to understand that a shell (or shell) is a program that accepts and executes programs. The shell also supports programming constructs, allowing you to build complex commands from simpler ones. These complex commands, or scripts, can be saved as files, which can become new standalone commands. Many commands on a typical Linux system are scripts.

The interpreters contain several built-in commands such as cd, break, and exec. Other commands are external.

If you're not using a graphical interface when working on Linux, or if you open a terminal window on a graphical desktop, in both cases you'll get a prompt that might look like this:

For the user

code>username@localhost:~$</code

For superuser or root

code>root@localhost:~#</code

The root user has unlimited rights, so you should use his account carefully. If you have root user privileges, you will typically see a pound sign (#) at the end of the prompt. If you are running with normal user privileges, the prompt will display a different sign, usually a dollar sign ($). The prompt on your computer may differ from the prompts shown in previous examples in this article. It may contain the username, computer name, current directory, date, time, and so on.

Commands

Basic Linux commands 1. ls - A utility for viewing the contents of directories 2. cat - Displaying the contents of a file 3. cd - Allows you to change from the current directory to the specified one. 4. pwd - Show the current directory. 5. mkdir - Create a new directory. 6. cp - Copy files and directories. 8. mv - Move or rename files and directories. 9. rm - Deletes files and folders. 10. chmod - Changes file permissions. 11. chown - Changes the owner of a file. 12. kill / xkill / pkill / killall - Terminate processes. 13. ps - displays information about running processes 14. top - display processes in real time 15. useradd / userdel / usermod - add, remove and modify a user account 16. passwd - change user account password 17. IP - network management utility 18. ping - network diagnostic utility

And in the final, “for dessert”, some more very useful information:

This cheat sheet is very helpful when working with tar archiver syntax (https://files.fosswire.com/2007/08/fwunixref.pdf)

This document contains the main commands: https://csg.sph.umich.edu/docs/Unix_Commands.pdf

Have a nice and easy job!

Did you like the article?

Cookie consent

By clicking «I agree», you consent to our website's use of cookies to give you the most relevant experience by remembering your preferences and repeat visits. However, you may visit «Manage сookies» to provide controlled consent. Learn more

Cookies settings

functional

Necessary cookies are crucial for the basic functions of the website and the website will not work in its intended way without them.

Analytics

Analytical cookies are used to understand how visitors interact with the website.

Advertisement

Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns.