1. sudo
sudo (SuperUser DO) Linux command allows you to run programs or other commands with administrative privileges like “Run as administrator” in Windows. This is useful when, for example, you need to modify files in a directory that your user wouldn’t normally have access to.
2. cd
cd (change director”) Linux command also known as chdir used to change the current working directory. You can use full paths to folders or simply the name of a folder within the directory you are currently working. Some common uses are:
cd / – Takes you to the root directory.
cd .. – Takes you up one directory level.
cd – – Takes you to the previous directory.
3. pwd
pwd (print working directory) Ubuntu command displays the full pathname of the current working directory.
4. ls
ls (list) command lists all files and folders in your current working directory. You can also specify paths to other directories if you want to view their contents.
5. cp
cp (copy) Linux command allows you to copy a file. You should specify both the file you want to be copied and the location you want it copied to – for example, cp xyz /home/myfiles would copy the file “xyz” to the directory “/home/myfiles”.
6. mv
mv (move) command allows you to move files. You can also rename files by moving them to the directory they are currently in, but under a new name. The usage is the same as cp – for example mv xyz /home/myfiles would move the file “xyz” to the directory “/home/myfiles”.
7. rm
rm (remove) command removes the specified file.
rmdir (“remove directory”) – Removes an empty directory.
rm -r (“remove recursively”) – Removes a directory along with its content.
8. mkdir
mkdir (make directory) command allows you to create a new directory. You can specify where you want the directory created – if you do not do so, it will be created in your current working directory.
9. history
history command displays all of your previous commands up to the history limit.
10. df
df (display filesystem) command displays information about the disk space usage of all mounted filesystems.
11. du
du (directory usage) command displays the size of a directory and all of its subdirectories.
12. free
free – Displays the amount of free space available on the system.
13. uname -a
uname -a – Provides a wide range of basic information about the system.
14. top
top – Displays the processes using the most system resources at any given time. “q” can be used to exit.
15. man
man command displays a “manual page”. Manual pages are usually very detailed, and it’s recommended that you read the man pages for any command you are unfamiliar with. Some uses are :
man man – Provides information about the manual itself.
man intro – Displays a brief introduction to Linux commands.
16. info
Similar to man, but often provides more detailed or precise information.
17. <command name> -h or <command name> –help
This command is a third alternative to get help. While not as detailed as the info or man pages, this will provide a quick overview of the command and its uses.
sudo (SuperUser DO) Linux command allows you to run programs or other commands with administrative privileges like “Run as administrator” in Windows. This is useful when, for example, you need to modify files in a directory that your user wouldn’t normally have access to.
2. cd
cd (change director”) Linux command also known as chdir used to change the current working directory. You can use full paths to folders or simply the name of a folder within the directory you are currently working. Some common uses are:
cd / – Takes you to the root directory.
cd .. – Takes you up one directory level.
cd – – Takes you to the previous directory.
3. pwd
pwd (print working directory) Ubuntu command displays the full pathname of the current working directory.
4. ls
ls (list) command lists all files and folders in your current working directory. You can also specify paths to other directories if you want to view their contents.
5. cp
cp (copy) Linux command allows you to copy a file. You should specify both the file you want to be copied and the location you want it copied to – for example, cp xyz /home/myfiles would copy the file “xyz” to the directory “/home/myfiles”.
6. mv
mv (move) command allows you to move files. You can also rename files by moving them to the directory they are currently in, but under a new name. The usage is the same as cp – for example mv xyz /home/myfiles would move the file “xyz” to the directory “/home/myfiles”.
7. rm
rm (remove) command removes the specified file.
rmdir (“remove directory”) – Removes an empty directory.
rm -r (“remove recursively”) – Removes a directory along with its content.
8. mkdir
mkdir (make directory) command allows you to create a new directory. You can specify where you want the directory created – if you do not do so, it will be created in your current working directory.
9. history
history command displays all of your previous commands up to the history limit.
10. df
df (display filesystem) command displays information about the disk space usage of all mounted filesystems.
11. du
du (directory usage) command displays the size of a directory and all of its subdirectories.
12. free
free – Displays the amount of free space available on the system.
13. uname -a
uname -a – Provides a wide range of basic information about the system.
14. top
top – Displays the processes using the most system resources at any given time. “q” can be used to exit.
15. man
man command displays a “manual page”. Manual pages are usually very detailed, and it’s recommended that you read the man pages for any command you are unfamiliar with. Some uses are :
man man – Provides information about the manual itself.
man intro – Displays a brief introduction to Linux commands.
16. info
Similar to man, but often provides more detailed or precise information.
17. <command name> -h or <command name> –help
This command is a third alternative to get help. While not as detailed as the info or man pages, this will provide a quick overview of the command and its uses.