Linux Commands
Linux Commands
Linux Commands
2. mkdir Command
The mkdir command is used to create a new directory under any directory.
Syntax: mkdir <directory name>
Output:
3. rmdir Command
The rmdir command is used to delete a directory.
Syntax: rmdir <directory name>
Output:
4. ls Command
The ls command is used to display a list of content of a directory.
Syntax: ls
Output:
5. cd Command
The cd command is used to change the current directory.
Syntax: cd <directory name>
Output:
7. cat Command
The cat command is a multi-purpose utility in the Linux system. It can be used to create a file, display content of
the file, copy the content of one file to another file, and more.
Syntax:
1. cat [OPTION]... [FILE]..
To create a file, execute it as follows:
1. cat > <file name>
2. // Enter file content
Press "CTRL+ D" keys to save the file. To display the content of the file, execute it as follows:
1. cat <file name>
Output:
8. rm Command
The rm command is used to remove a file.
Syntax: rm <file name>
Output:
9. cp Command
The cp command is used to copy a file or directory.
Syntax:
To copy in the same directory:
1. cp <existing file name> <new file name>
To copy in a different directory:
Output:
10. mv Command
The mv command is used to move a file or a directory form one location to another location.
Syntax:
1. mv <file name> <directory path>
Output:
24. df Command
The df command is used to display the disk space used in the file system. It displays the output as in the number
of used blocks, available blocks, and the mounted directory.
Syntax:
1. df
Output:
After pressing the ENTER key, it will clear the terminal screen.
Linux Networking Commands
27. ip Command
Linux ip command is an updated version of the ipconfig command. It is used to assign an IP address, initialize
an interface, disable an interface.
Syntax:
1. ip a or ip addr
Output: