SlideShare a Scribd company logo
1 of 28
Download to read offline
IMPORTANT
LINUX
COMMANDS
Check CPU Cores in
Linux
Use one of the below commands to find number of CPUs
in Linux including cores
Linux Create Directory
To create a single directory in Linux
To create multiple directory in Linux
To create a directory by setting permission
Linux Touch Command
One of the easiest ways to create a new and empty file is the
touch command. Use below command to create an empty file
Create multiple empty files
Linux Files and
Directory Permissions
There are three main permissions that you assign to a file or
directory
Read - 4
Write - 2
Execute - 1
To give full permissions to owner (read, write and execute),
give read and execute permission to other group members
and no permissions to all other users
And, there are three main levels of permissions
Owner of the file
Other members of the group which owner belongs to
All other users on the server
To give full permissions on /u01 and also to all the contents inside
the folder
Here
7 = Read(4) + Write(2) + Execute(1)
5 = Read(4) + Execute(1)
0 = No permissions
Linux WC Command
The wc command allows you to count the number of lines,
characters, and words in a text. To count the number of lines in a file
To count the number of characters in a file
To count the number of words in a file
Linux SORT Command
To sort and display the contents of a file
To sort a file and remove the duplicate values
To sort a file in reverse order
Linux GREP Command
GREP command is used to search anytime inside a file or output.
Linux grep is different from Linux find command. Linux find command
is used for searching files and directories. Linux grep is powerful and
can be used for searching a pattern inside a file.
To print each line containing the word oracle. The
command is case sensitive
If you want to ignore the case, use -i
To search a specific phrase inside a file
To count total number of lines that contain a specific word
To print line number along the exact line that contains the word oracle
To get the name of the files that contain a specific string (oracle) inside
To match the lines which start with the given string or pattern
To match the lines which end with the given string or pattern
Linux Find Command
To find files older than 35 days in a specific directory path and save
the ouput in backupfiles.log. Here the directory we are searching is
/backup/logs and -mtime specifies the modified time of a file. We
are saving the list of all the files which are older than 35 days in
backupfiles.log
To print files older than 7 days on screen and do not want to save
it into a file, use below command
To find all the files under current location (as we have specified .
dot), search file name starting with arch and ending with log.
check file create time with -ctime older than 28 days and then
remove those files using rm -f
Force User to Change
Password
To force user to change password on next login, first of all the
password must have expired
Run below command which will force user to change password
on next login
To check the status of a user's password
Managing Groups in
Linux
Create a new group in Linux
Add users to a group
List all users that belong to a group
List all the groups that a user belongs to
List all the groups on your Linux server
Delete a group
Managing Users in
Linux
To create a new user with a home directory having the same
username
Add a password to the created user
Create a user with password in the same command
Create a user and assign it to an already existing group
Add user to multiple groups
Remove users from the group
To lock the user password and prevent the user from logging in
using a password
To unlock a user password on Linux
To delete a user in Linux
Courses | Projects | Bootcamps

More Related Content

What's hot

Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
Rohit Kumar
 

What's hot (20)

Unix slideshare
Unix slideshareUnix slideshare
Unix slideshare
 
Basic commands
Basic commandsBasic commands
Basic commands
 
Know the UNIX Commands
Know the UNIX CommandsKnow the UNIX Commands
Know the UNIX Commands
 
Basic commands of linux
Basic commands of linuxBasic commands of linux
Basic commands of linux
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command Line
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Basic Linux day 2
Basic Linux day 2Basic Linux day 2
Basic Linux day 2
 
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)
 
Basic Linux commands
Basic Linux commandsBasic Linux commands
Basic Linux commands
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
 
Linux commands
Linux commands Linux commands
Linux commands
 
Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)
 

Similar to Important Linux Commands

Introduction to Linux Slides.pptx
Introduction to Linux Slides.pptxIntroduction to Linux Slides.pptx
Introduction to Linux Slides.pptx
hazhamina
 
Linux introductory-course-day-1
Linux introductory-course-day-1Linux introductory-course-day-1
Linux introductory-course-day-1
Julio Pulido
 

Similar to Important Linux Commands (20)

Linux day 2.ppt
Linux day  2.pptLinux day  2.ppt
Linux day 2.ppt
 
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
 
linux-file-system01.ppt
linux-file-system01.pptlinux-file-system01.ppt
linux-file-system01.ppt
 
Programming Embedded linux
Programming Embedded linuxProgramming Embedded linux
Programming Embedded linux
 
Linux Basics.pptx
Linux Basics.pptxLinux Basics.pptx
Linux Basics.pptx
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
Introduction to Linux Slides.pptx
Introduction to Linux Slides.pptxIntroduction to Linux Slides.pptx
Introduction to Linux Slides.pptx
 
40 basic linux command
40 basic linux command40 basic linux command
40 basic linux command
 
40 basic linux command
40 basic linux command40 basic linux command
40 basic linux command
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration training
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Introduction to linux day1
Introduction to linux day1Introduction to linux day1
Introduction to linux day1
 
BASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptxBASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptx
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
 
OS Unit IV.ppt
OS Unit IV.pptOS Unit IV.ppt
OS Unit IV.ppt
 
Assignment OS LAB 2022
Assignment OS LAB 2022Assignment OS LAB 2022
Assignment OS LAB 2022
 
35 ls Command Examples in Linux (The Complete Guide).pdf
35 ls Command Examples in Linux (The Complete Guide).pdf35 ls Command Examples in Linux (The Complete Guide).pdf
35 ls Command Examples in Linux (The Complete Guide).pdf
 
Linux introductory-course-day-1
Linux introductory-course-day-1Linux introductory-course-day-1
Linux introductory-course-day-1
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Linux commands
Linux commandsLinux commands
Linux commands
 

More from Arun Sharma

More from Arun Sharma (20)

Oracle Golden Gate Functions
Oracle Golden Gate FunctionsOracle Golden Gate Functions
Oracle Golden Gate Functions
 
Oracle Golden Gate Bidirectional Replication
Oracle Golden Gate Bidirectional ReplicationOracle Golden Gate Bidirectional Replication
Oracle Golden Gate Bidirectional Replication
 
Install Oracle 12c Golden Gate On Oracle Linux
Install Oracle 12c Golden Gate On Oracle LinuxInstall Oracle 12c Golden Gate On Oracle Linux
Install Oracle 12c Golden Gate On Oracle Linux
 
Configure Golden Gate Initial Load and Change Sync
Configure Golden Gate Initial Load and Change SyncConfigure Golden Gate Initial Load and Change Sync
Configure Golden Gate Initial Load and Change Sync
 
Oracle TKPROF Utility
Oracle TKPROF UtilityOracle TKPROF Utility
Oracle TKPROF Utility
 
Oracle Segment Advisor
Oracle Segment AdvisorOracle Segment Advisor
Oracle Segment Advisor
 
Oracle 11g Installation With ASM and Data Guard Setup
Oracle 11g Installation With ASM and Data Guard SetupOracle 11g Installation With ASM and Data Guard Setup
Oracle 11g Installation With ASM and Data Guard Setup
 
Oracle 11g to 12c Upgrade With Data Guard and ASM
Oracle 11g to 12c  Upgrade With Data Guard and ASMOracle 11g to 12c  Upgrade With Data Guard and ASM
Oracle 11g to 12c Upgrade With Data Guard and ASM
 
Oracle 11g to 12c Rolling Upgrade
Oracle 11g to 12c Rolling UpgradeOracle 11g to 12c Rolling Upgrade
Oracle 11g to 12c Rolling Upgrade
 
Convert Physical Standby Into Logical Standby
Convert Physical Standby Into Logical StandbyConvert Physical Standby Into Logical Standby
Convert Physical Standby Into Logical Standby
 
Enable Fast Start Failover Data Guard Broker
Enable Fast Start Failover Data Guard BrokerEnable Fast Start Failover Data Guard Broker
Enable Fast Start Failover Data Guard Broker
 
Data Guard Broker Failover
Data Guard Broker FailoverData Guard Broker Failover
Data Guard Broker Failover
 
Oracle Data Guard Physical Standby Configuration
Oracle Data Guard Physical Standby ConfigurationOracle Data Guard Physical Standby Configuration
Oracle Data Guard Physical Standby Configuration
 
Schedule RMAN Backups On Windows
Schedule RMAN Backups On WindowsSchedule RMAN Backups On Windows
Schedule RMAN Backups On Windows
 
RMAN Backup Compression Types
RMAN Backup Compression TypesRMAN Backup Compression Types
RMAN Backup Compression Types
 
Scheduling Jobs With DBMA_Scheduler
Scheduling Jobs With DBMA_SchedulerScheduling Jobs With DBMA_Scheduler
Scheduling Jobs With DBMA_Scheduler
 
Oracle User Management
Oracle User ManagementOracle User Management
Oracle User Management
 
Create Directory Under ASM Diskgroup
Create Directory Under ASM DiskgroupCreate Directory Under ASM Diskgroup
Create Directory Under ASM Diskgroup
 
Create Diskgroup Sqlplus Command
Create Diskgroup Sqlplus CommandCreate Diskgroup Sqlplus Command
Create Diskgroup Sqlplus Command
 
Oracle Golden Gate Interview Questions
Oracle Golden Gate Interview QuestionsOracle Golden Gate Interview Questions
Oracle Golden Gate Interview Questions
 

Recently uploaded

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

Important Linux Commands

  • 2. Check CPU Cores in Linux Use one of the below commands to find number of CPUs in Linux including cores
  • 3.
  • 4. Linux Create Directory To create a single directory in Linux To create multiple directory in Linux To create a directory by setting permission
  • 5. Linux Touch Command One of the easiest ways to create a new and empty file is the touch command. Use below command to create an empty file Create multiple empty files
  • 6. Linux Files and Directory Permissions There are three main permissions that you assign to a file or directory Read - 4 Write - 2 Execute - 1
  • 7. To give full permissions to owner (read, write and execute), give read and execute permission to other group members and no permissions to all other users And, there are three main levels of permissions Owner of the file Other members of the group which owner belongs to All other users on the server
  • 8. To give full permissions on /u01 and also to all the contents inside the folder Here 7 = Read(4) + Write(2) + Execute(1) 5 = Read(4) + Execute(1) 0 = No permissions
  • 9. Linux WC Command The wc command allows you to count the number of lines, characters, and words in a text. To count the number of lines in a file
  • 10. To count the number of characters in a file To count the number of words in a file
  • 11. Linux SORT Command To sort and display the contents of a file
  • 12. To sort a file and remove the duplicate values To sort a file in reverse order
  • 13. Linux GREP Command GREP command is used to search anytime inside a file or output. Linux grep is different from Linux find command. Linux find command is used for searching files and directories. Linux grep is powerful and can be used for searching a pattern inside a file.
  • 14. To print each line containing the word oracle. The command is case sensitive If you want to ignore the case, use -i To search a specific phrase inside a file
  • 15. To count total number of lines that contain a specific word To print line number along the exact line that contains the word oracle To get the name of the files that contain a specific string (oracle) inside
  • 16. To match the lines which start with the given string or pattern To match the lines which end with the given string or pattern
  • 17. Linux Find Command To find files older than 35 days in a specific directory path and save the ouput in backupfiles.log. Here the directory we are searching is /backup/logs and -mtime specifies the modified time of a file. We are saving the list of all the files which are older than 35 days in backupfiles.log
  • 18. To print files older than 7 days on screen and do not want to save it into a file, use below command To find all the files under current location (as we have specified . dot), search file name starting with arch and ending with log. check file create time with -ctime older than 28 days and then remove those files using rm -f
  • 19. Force User to Change Password To force user to change password on next login, first of all the password must have expired
  • 20. Run below command which will force user to change password on next login To check the status of a user's password
  • 21. Managing Groups in Linux Create a new group in Linux
  • 22. Add users to a group List all users that belong to a group List all the groups that a user belongs to
  • 23. List all the groups on your Linux server Delete a group
  • 24. Managing Users in Linux To create a new user with a home directory having the same username
  • 25. Add a password to the created user Create a user with password in the same command
  • 26. Create a user and assign it to an already existing group Add user to multiple groups Remove users from the group
  • 27. To lock the user password and prevent the user from logging in using a password To unlock a user password on Linux To delete a user in Linux
  • 28. Courses | Projects | Bootcamps