Chapter -2
Basic commands in Linux
Types of commands
Linux Directory Commands
•Linux File Commands
•Linux File Content Commands
•Linux User Commands
•Linux Filter Commands
•Linux Utility Commands
•Linux Networking Command
Linux Directory Commands
1. pwd Command
The pwd command is used to display the location of the current working directory.
Syntax:
pwd
Output:
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:
cal Command
The cal command print a calendar on the standard output.
clear Command
clear command lets you clear the terminal screen, simply type.
date Command
date command displays/sets the system date and time like this.
df Command
df command is used to show file system disk space usage as follows.
echo Command
echo command prints a text of line provided to it.
exit Command
exit command is used to exit a shell like so.
expr Command
expr command is used to calculate an expression as shown below.
factor Command
factor command is used to show the prime factors of a number.