Top Linux Commands With Examples

Here are the basic Linux commands that works on any distribution including Ubuntu 16.04. Only use the commands if you are sure about what you are doing. Remember,  a single command like rm can completely wipe your server files if used incorrectly.

No Command  Description
1 cat displays the content of a file
2 cd Change directory

e.g. cd /var

3 chmod change permissions of a file
4 chown change the ownership of a file or directory
5 cp copy  a file

e.g. cp /var/test1.text /var/test2.text

6 cp -a copy a directory
7 df -h reports the amount of available disk space
8 du –h shows the disk usage in a specific directory

e.g du -h /var

9 find locates a file or a directory
10 history display all  previous commands typed in terminal
11 ifconfig see the TCP/IP settings of the system
12 ls list directory contents
13 mkdir Short form for make directory. Used create directory

e.g. mkdir samplefolder

14 mv move a file
15 pwd print working directory
16 reboot restarts the system
17 rm removes a file
18 rm -f removes a directory without giving any warning
19 shutdown –h shuts the system down
20 tar compress/decompress files
21 uptime see how long the system has been running
22 date display the current date and time
Ads by Google

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.