Basic Linux Commands (Part 1)

  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.

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
  
-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.
     Command: rmdir "directory  name" 
 
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

Name

AWS,1,Devops,2,linux,8,
ltr
item
Techie View: Basic Linux Commands (Part 1)
Basic Linux Commands (Part 1)
https://1.bp.blogspot.com/-7yUs7VSebT8/X5lJnHCV2zI/AAAAAAAAAIc/sRzMyLckIW419ZP71l3TWaTCkC9lZ0D9QCLcBGAsYHQ/s320/zGciGXd-linux-hd-wallpaper.jpg
https://1.bp.blogspot.com/-7yUs7VSebT8/X5lJnHCV2zI/AAAAAAAAAIc/sRzMyLckIW419ZP71l3TWaTCkC9lZ0D9QCLcBGAsYHQ/s72-c/zGciGXd-linux-hd-wallpaper.jpg
Techie View
https://www.techiev.com/2020/05/basic-linux-commands.html
https://www.techiev.com/
https://www.techiev.com/
https://www.techiev.com/2020/05/basic-linux-commands.html
true
7013663511659419322
UTF-8
Loaded All Posts Not found any posts VIEW ALL View Full Article Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy