L inux is basically Unix like Operating systems, So Commands are important to run the terminal in the Linux. In Windows command prompt lik...
Linux is basically Unix like Operating systems, So Commands are important to run the terminal in the Linux. In Windows command prompt like that on Linux, it is called terminal or shell or Bash.








Command: rmdir "directory name"
The Terminal or Shell which is used to run every command. So some of the Basic commands need to know before running the terminal.
Basics Commands:
1. DATE:
To know the current date and time for the local machine.
Command: date
2. CALENDAR:
To Know the calendar.
Command: cal
Example :
3. PWD - Present working directory
In Linux, Folders are called as Directory. we want to check the current working directory Run the pwd command in shell.
Command: pwd
4. whoami command
This command used to check the current logged in user.
5. uname Command:
It is use to check the system information.
syntax: uname [OPTION]
In this command some options available for different use cases.
Options:
a - It is used to check the system information in the order of (Kernel name, network node host name, kernel release date, kernel version, machine hardware name, hardware platform, operating system).
Command: uname -a
Output:
-i , -m , -p : It is used to check the currently using hardware platform (architecture),hardware name, processor type.
Command: uname -i , uname -m , uname -p
Output:
-o : It is used to check the currently used operating system's name.
Command: uname -o
-r : It is used to check the kernel release date.
Command: uname -r
-s : It is used to check the kernel name.
Command: uname -s
-v : It is used to check the kernel version.
Command: uname -v
Output:
6. History
History command is used see the history of the last 1000 commands used by root or user in the shell.
Command: history
7. Ping
Ping command is common command for linux and windows to check the particular server or network connectivity with local machine.
Command: ping google.com
Output:
8. Useradd
Useradd command used to add the particular user in the local machine or server.
Syntax : useradd "username"
Example:
9. passwd
Passwd command used to update the password for the user.
Syntax: passwd "username"
Example:
10. userdel
Userdel command used to delete the user in the Linux using shell.
Syntax : userdel "username"
Example:
11. su (substitute user):
su command used to switch the current user to another.
It is used to run the command as root privileges or other account
privileges.
Command: su "username"
Example:
12. df (Disk free)
The df command used to check the disk usage space, free space of Internal and external disks.
Syntax: df [option] [filename]
Command: df
Options:
-h : it is used for to show the files storage as human readable.
Command: df -h
Command: df -h
-a : It is used to show all the files and folders even it has zero block size.
Command : df -a
--total : It is used to show the total size.
Command: df --total
-i : It used to show the inode information instead of blocks.
Command: df -i
-T : It is used to show the file system Type.
Command: df -T
we have covered some important commands other few options available, Using --help to check the other options.
--help : It is used to show the all the options and usage.
Command: df --help
13. du (Disk usage)
It is used to check the disk usage size for each files and directories.
Syntax : du [option] [file]
Options:
-a (all) : It shows the all the files and directories in the given path.
-c (Total) : It shows the Total size of the files and directories in the given path.
-h (human readable) : It shows the size as human readable.
-s (summarize) : It shows only total size of the given dirctory or file.
--help : It used to shows the all available options.
14. ps (Process Status)
In this command used to check the process status and currently running process's id.
Command: ps
15. kill:
It is used to kill the running process.
Command: kill "processs id"
16.rm (remove):
It is used to remove the particular file and directory.
Command: rm "file or directory name"
Options :
-rf - Remove the regular file.
-rd - Remove the regular directory.
17.rmdir (remove directory)
In this command used to remove the directory.
18. mkdir (make Directory)
It is used to make or create the directory.
Command: mkdir "directoryname"
19. ll and ls :
ls command used to list the files and directories in the Linux environment.
Command: ls (or) ll
ll and ls some options available check our blog for full details List command in Linux (ls,ll)
20. touch :
It is used to create the new file in the local machine or server.
Command: touch new.txt
COMMENTS