After Microsoft tricks related to their latest operating system at number 10, many users turned their attention to the Linux family of OS. These systems are stable, not at risk of virus infection and can work in any conditions. One has only to set it up. However, the latter just scares the unprepared user, since when setting up Linux and installing the vast majority of programs, you need to use the terminal. It requires the input of certain commands in order to be able to perform a particular action. In Windows, everything was much simpler - there is a graphical installer. However, Linux is much safer and more interesting for those who want to expand their knowledge of high technology. But first you need to learn the Linux commands. This will allow you to easily and easily communicate with the OS. But first, a few words about the system itself and the most famous distributions.
The most popular distributions and their features
There are currently two main branches of Linux development: Debian-based and Arch. OS based on these distributions are the most popular and common among users. The first include such systems as Debian itself, Ubuntu, Linux Mint. The second branch includes the Arch itself and derivatives (Antergos, Sus, and others). What is interesting: there are much more programs and other interesting things for "ubunt-like" distributions. But "Arch" is constantly getting the latest kernels and components. The difference is in the installation process itself and in which Linux commands are used to control the operating system.
Distribution choice
Choosing a distribution kit is always a purely personal matter. But for beginners, OSs based on Debian (Mint, Ubuntu, and others) are more suitable. They have a convenient graphical system installer and will not cause problems when installing on a computer. Not at all with the Arch. This distribution has a purely console structure when installed on a PC or laptop. This means that you will have to enter Linux installation commands on the command line. This prospect scares many novice users. Those who have already learned enough about the Linux family OS and can easily use the terminal go to Arch, and now we will turn to the teams themselves for different occasions.
Installation commands
When installing certain programs in the OS, the system requires the introduction of certain Linux installation commands . They are not so complicated, but it is important to enter them correctly, in a strict order. So, you must remember that before each command of such a plan, you should enter "sudo". This prefix ensures that the action is performed on behalf of the superuser. After entering the first command, you will have to enter the administrator password. For example, you need to update the list of available packages from the Internet, based on the connected repositories. You should enter a command of this type "sudo apt-get update". The main Linux commands for installing applications (we are talking about "ubunt-like" distributions) look like this: "sudo apt-get install package name" and "sudo apt-get remove package name". The last command is to uninstall the application. After it, it is advisable to perform another "sudo autoremove" to clean up the "tails" remaining after removal. But this is optional. Linux does not have a registry, so it is not cluttered. The system always works quickly and stably.

Reboot commands
There are situations where Linux needs to be rebooted. Often this happens when reinstalling drivers in the system. You can use the standard method (via the menu). But it’s much faster and more convenient to enter the corresponding text in the terminal. By pressing the Enter button, the OS will reboot quickly and painlessly. The Linux reboot command looks like "sudo reboot". Nothing complicated. Everything is simple and clear. The first word in the command starts the action on behalf of the administrator (superuser), and the second - the word "reload" in English. In Linux, in general, all commands become much clearer if the user knows English. These are the same words. But acronyms and abbreviations are often used.
Console commands
Linux console commands come in many types. They can manage files, display information about the operating system and the computer in the terminal, and can also serve to configure this or that equipment. It all depends on specific tasks. The most popular and common commands are "cp", "top" and "htop", "lsdef". The first is used along with the name of the folder. It allows you to enter the specified folder and edit files in the terminal. If you use it without a folder name, the OS will automatically direct the user to the home directory. The "top" command provides the user with information about the loaded processes and the amount of occupied and free RAM. All information is provided in real time. The phrase "htop" typed in the terminal will give all statistics about running processes in the system. The "lsdef" command will inform the user about all the features of the installed equipment. These teams are purely informative.
Configuration commands
It often happens that some applications in Linux have a purely console structure. Therefore, in order to start the configuration of a program, you have to enter the appropriate Linux commands. A striking example is the "layer" for running Windows applications called wine-staging. She has no shortcuts and startup files. Therefore, you must enter "winecfg" in the terminal. It does not need to be run as administrator. need to be entered as it is. Also with some other applications. Moreover, there are programs in Linux that are completely devoid of a graphical interface. Interact with them is only possible using the console. But in this case, you need to enter commands that support this particular application. So, you have to study them separately. For each utility has its own set of commands for work.
Work with hard drives
Linux OS allows you to manage hard drives directly from the console. There are also special teams for this. They are applicable if it is not possible to use utilities with a graphical interface for a particular operation. By the way, this way you can restore even thoroughly "killed" drives. In this regard, “Linux” is indispensable and much better than “Windows”. So, the main command for working with disks is "fdisk -l". It displays information about all the drives installed in the system. "Sudo mount" - mounts the disk partition to the mount point. It can be used so that the operating system detects a newly connected hard drive. The umount command is used to unmount. And with the help of "sudo hdparm -tT / dev / sda" you can evaluate the performance of the hard drive. These are the basic commands for working with hard drives. In combination with certain prefixes, these commands can perform various operations on the hard drive.
Networking
Linux commands for managing network parameters help you find out all the information about a particular connection and configure it in a basic way. In order to see information about all network interfaces, you should type the ifconfig command in the terminal. If you want to check the parameters of only a wired connection, then the necessary command is "ifconfig eth0". You can also ping a connection to control the data rate. It is necessary to enter "ping 192.168.0.2" in the terminal. If you have problems with the network connection, you can try restarting the DHCP client with the simple command "sudo /etc/init.d/dhcpd restart". For other tasks when working with the network, there are also teams. But to list them all within the framework of this material is impossible. There are too many of them.
Common Commands
These are the Linux commands that cannot be categorized. Their purpose is different, but they are common in nature. For example, using the "uname -a" command, you can view information about the Linux kernel version. The uptime command will inform the user about the total operating time of the operating system since the last boot. "Wget" allows you to download any file from the Internet using the console. To do this, enter the command in the format "wget download link". The next command could be attributed to the network. It serves to configure the connection to the network via the ADSL modem and looks like this: "pppoeconf". If you need to exit Linux, just type in the console "shutdown -h now" or "poweroff" (the Linux shutdown command). These are all teams of a general type that cannot be assigned to one category or another. Some of them serve to obtain certain information, and some to configure certain operating system parameters.
Installing and uninstalling packages in Arch distributions
Continuing the study of Linux. The list of commands used in the "arch-like" distributions may differ significantly from the builds based on "Debian". The fact is that completely different prefixes are used there. And the hierarchy is different. For example, the process of installing and removing packages will be very different. You can view the list of installed packages using the rpm -qa command. Note that a completely new prefix has already appeared here. And the teams themselves have nothing to do with the “Debian”. To install a specific package, you will need to enter "sudo rpm -i pkgname.rpm", where "pkgname.rpm" is the name of the corresponding package. You can also put all packages from this directory in one step by entering the command "sudo dpkg -i * .rpm". As you can see, nothing to do with the commands from the ubunto-like distributions. To remove certain packages in Arch, you should enter the command "sudo rpm -e pkgname, where" pkgname "is the name of the application or package to be deleted. In principle, everything is simple and logical. You only need to spend a certain amount of time to understand this logic. Once the user has mastered the basic Linux commands, communication with the operating system will be much more pleasant.
Work with ISO images and CDs
No matter how strange it may seem, the Linux terminal allows the user to work with disk images: record, copy disks and perform other actions. For those who have just moved to OS with Windows, a similar situation seems unimaginable savagery. But it should be noted that through the console, working with disks and images is much more successful than when using utilities with a graphical interface. So, Linux teams for working with optical storage media and their images.
The "cdrecord -scanbus" command shows a list of available drives that are ready for recording (if there are several of them installed on your PC).
The phrase "dd if = / dev / hdc of = / tmp / mycd.iso bs = 2048 conv = notrunc" initiates the process of creating a copy of the ISO format CD named "mycd". By default, disk copies are in the home directory. Using certain commands, you can also burn the image to a USB flash drive or to a CD. Although to write images to a flash drive in any Linux distribution there is an excellent application with a graphical interface. So it’s better to use it.
Work with users and groups
If in Windows work with the user account and access rights is carried out completely through the graphical interface, then in Linux everything happens using the console. and just like that, the command will not work. You must enter a prefix to access administrator rights and a personal password. That is why Linux is considered more secure than crafts from Microsoft. It is worth noting that the Linux startup command cannot do without superuser privileges. Therefore, no hacker can use your PC to mine bitcoins without a password. But back to working with users. To obtain information about the current user, enter "id" in the terminal. The "last" command will show the last registered users (relevant for servers). If you need to see the name of the current user and the time of his login, then use the "who" command. To add a new user, use "useradd username". The name should consist only of Latin letters and symbols and Arabic numbers. To delete a specific user, there is a "userdel" command. Adding a group is done by combining the "groupadd group name. In principle, there is nothing complicated.
Conclusion
So, the description of Linux commands for working with the operating system through the console is complete. Working with the console is safer than using programs with graphical interfaces. All commands are logical and understandable. Only basic knowledge of the English language is needed. If they are, then dealing with the Linux terminal will not be difficult. For beginners who do not speak English, at first it is recommended to look for instructions on the implementation of certain actions on the Web and simply copy the necessary commands to the terminal. Over time, experience and understanding will come. And working with the operating system will be much easier.