Basic linux commands for the beginner
Most people think that Linux is a complex operating system that is used only by programmers. Actually it is not. In addition, the basic Linux commands are quite clear and simple, and the terminal is just a management tool.
If you don’t have a UNIX-like device at hand, then in this post we wrote about an online emulator with which you can practice. Boot Ubuntu and open a terminal (can be found by searching in the list of applications).
pwd
– shows which directory (folder) you are currently in.
ls
– allows you to view the contents of the directory you are in. Command with flag “-l” (“ls -l
“) will display a more readable list, where you can immediately see the creation date of the file, its size, author and permissions granted to the file.
<путь>cd – command to move to another directory. Looks like “<путь>cd <путь>”. The path to the target directory can be absolute or relative.
<путь>mkdir
– command to create a new directory. A command like “mkdir TestDir
” will create a new folder named “TestDir” where you are now.
touch
is a command whose side effect is to create a new file. Execute the command “touch My_file.txt
“, a new file will be created with the name “Myfile”<чтоКопировать> and extension “.txt”.
cp
– copy command. Looks like "cp <кудаКопировать>". For example, run the command "cp Myfile.txt TestDir/Myfile.txt
" to copy the previously created file "Myfile.txt" to the newly created directory "TestDir".
rm
– command for deleting files. Run the command "rm Myfile.txt
" to delete the first version of our file.