Linux commands

Linux commands are very useful when you are working with the Linux operating system. There are many different commands, but you only need a handful of these to do most things, like navigating directories, modifying files and get information about the system.

List of commands

command description example
ls List files and directories in the current directory ls /home
cd Change the current directory cd /home
mv Move a file to a different location mv old/cat.png new/cat.png
rm Remove a file or directory rm file.txt
cp Copy a file to a different location cp first/cat.png second/cat.png
nano Edit the contents of a text file nano script.cpp
sudo Execute a function as super user sudo nano script.cpp
mkdir Create a new directory mkdir amazing-directory
rmdir Remove a directory rmdir amazing-directory