SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
Linux Command Cheat Sheet
|
sudo [command]
nohup [command]
man [command]
[command] &
>> [fileA]
> [fileA]
echo -n
xargs
1>2&
fg %N
jobs
ctrl-z
Basic commands
Pipe (redirect) output
run < command> in superuser
mode
run < command> immune to
hangup signal
display help pages of
< command>
run < command> and send task
to background
append to fileA, preserving
existing contents
output to fileA, overwriting
contents
display a line of text
build command line from previ-
ous output
Redirect stdout to stderr
go to task N
list task
suspend current task
df -h, -i
mkfs -t -V
resize2fs
fsck -A -N
pvcreate
mount -a -t
fdisk -l
lvcreate
umount -f -v
Disk Utilities
File system usage
create file system
update a filesystem, after
lvextend*
file system check & repair
create physical volume
mount a filesystem
edit disk partition
create a logical volume
umount a filesystem
chmod -c -R
touch -a -t
chown -c -R
chgrp -c -R
touch -a -t
File permission
chmod file read, write and
executable permission
modify (or create) file timestamp
change file ownership
change file group permission
modify (or create) file time-
stamp
tr -d
uniq -c -u
split -l
wc -w
head -n
cut -s
diff -q
join -i
more, less
sort -n
comm -3
cat -s
tail -f
File Utilities
translate or delete character
report or omit repeated lines
split file into pieces
print newline, word, and byte
counts for each file
output the first part of files
remove section from file
file compare, line by line
join lines of two files on a
common field
view file content, one page at a
time
sort lines in text file
compare two sorted files, line
by line
concatenate files to the stan-
dard output
output last part of the file
mkdir
rmdir
Directory Utilities
create a directory
remove a directory
find
ls -a -C -h
rm -r -f
locate -i
cp -a -R -i
du -s
file -b -i
mv -f -i
grep, egrep, fgrep -i -v
File management
search for a file
list content of directory
remove files and directory
find file, using updatedb(8)
database
copy files or directory
disk usage
identify the file type
move files or directory
print lines matching pattern
tar xvfz
gzip, gunzip, zcat
uuencode, uudecode
zip, unzip -v
rpm
bzip2, bunzip2
rar
File compression
create or extract .tar or .tgz
files
create, extract or view .gz files
create or extract .Z files
create or extract .ZIP files
create or extract .rpm files
create or extract .bz2 files
create or extract .rar files
ex
vi
nano
view
emacs
sublime
sed
pico
File Editor
basic editor
visual editor
pico clone
view file only
extensible, customizable editor
yet another text editor
stream editor
simple editor
free -m
killall
sensors
top
kill -1 -9
service
[start|stop|restart]
ps aux
dmesg -k
Memory & Processes
display free and used system
memory
stop all process by name
CPU temperature
display current processes, real
time monitoring
send signal to process
manage or run sysV init script
display current processes,
snapshot
display system messages
netstat -r -v
telnet
tcpdump
ssh -i
ping -c
Network
print network information,
routing and connections
user interface to the TELNET
protocol
dump network traffic
openSSH client
print routing packet trace to
host network
pwd -P
bc
expr
cal
export
` [command]
date -d
$[variable]
Misc Commands
print current working directory
high precision calculator
evaluate expression
print calender
assign or remove environment
variable
backquote, execute command
print formatted date
if set, access the variable
awk, gawk
tsh
" "
' '
python
bash
ksh
php
csh, tcsh
perl
source [file]
Scripting
pattern scanning
tiny shell
anything within double quotes
is unchanged except  and $
anything within single quote is
unchanged
"object-oriented programming
language"
GNU bourne-again SHell
korn shell
general-purpose scripting
language
C shell
Practical Extraction and Report
Language
load any functions file into the
current shell, requires the file
to be executable
Compiled by Alvin Khoo
Share This Cheat Sheet
Read the Blog Post »
http://bit.ly/LinuxSheet

Contenu connexe

Plus de SolarWinds Loggly

Loggly - Case Study - BEMOBI - Bemobi Monitors the Experience of 500 Million ...
Loggly - Case Study - BEMOBI - Bemobi Monitors the Experience of 500 Million ...Loggly - Case Study - BEMOBI - Bemobi Monitors the Experience of 500 Million ...
Loggly - Case Study - BEMOBI - Bemobi Monitors the Experience of 500 Million ...SolarWinds Loggly
 
Loggly - How to Scale Your Architecture and DevOps Practices for Big Data App...
Loggly - How to Scale Your Architecture and DevOps Practices for Big Data App...Loggly - How to Scale Your Architecture and DevOps Practices for Big Data App...
Loggly - How to Scale Your Architecture and DevOps Practices for Big Data App...SolarWinds Loggly
 
Loggly - Benchmarking 5 Node.js Logging Libraries
Loggly - Benchmarking 5 Node.js Logging LibrariesLoggly - Benchmarking 5 Node.js Logging Libraries
Loggly - Benchmarking 5 Node.js Logging LibrariesSolarWinds Loggly
 
Why @Loggly Loves Apache Kafka, and How We Use Its Unbreakable Messaging for ...
Why @Loggly Loves Apache Kafka, and How We Use Its Unbreakable Messaging for ...Why @Loggly Loves Apache Kafka, and How We Use Its Unbreakable Messaging for ...
Why @Loggly Loves Apache Kafka, and How We Use Its Unbreakable Messaging for ...SolarWinds Loggly
 
6 Critical SaaS Engineering Mistakes to Avoid
6 Critical SaaS Engineering Mistakes to Avoid6 Critical SaaS Engineering Mistakes to Avoid
6 Critical SaaS Engineering Mistakes to AvoidSolarWinds Loggly
 
Rumble Entertainment GDC 2014: Maximizing Revenue Through Logging
Rumble Entertainment GDC 2014: Maximizing Revenue Through LoggingRumble Entertainment GDC 2014: Maximizing Revenue Through Logging
Rumble Entertainment GDC 2014: Maximizing Revenue Through LoggingSolarWinds Loggly
 
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly SolarWinds Loggly
 

Plus de SolarWinds Loggly (7)

Loggly - Case Study - BEMOBI - Bemobi Monitors the Experience of 500 Million ...
Loggly - Case Study - BEMOBI - Bemobi Monitors the Experience of 500 Million ...Loggly - Case Study - BEMOBI - Bemobi Monitors the Experience of 500 Million ...
Loggly - Case Study - BEMOBI - Bemobi Monitors the Experience of 500 Million ...
 
Loggly - How to Scale Your Architecture and DevOps Practices for Big Data App...
Loggly - How to Scale Your Architecture and DevOps Practices for Big Data App...Loggly - How to Scale Your Architecture and DevOps Practices for Big Data App...
Loggly - How to Scale Your Architecture and DevOps Practices for Big Data App...
 
Loggly - Benchmarking 5 Node.js Logging Libraries
Loggly - Benchmarking 5 Node.js Logging LibrariesLoggly - Benchmarking 5 Node.js Logging Libraries
Loggly - Benchmarking 5 Node.js Logging Libraries
 
Why @Loggly Loves Apache Kafka, and How We Use Its Unbreakable Messaging for ...
Why @Loggly Loves Apache Kafka, and How We Use Its Unbreakable Messaging for ...Why @Loggly Loves Apache Kafka, and How We Use Its Unbreakable Messaging for ...
Why @Loggly Loves Apache Kafka, and How We Use Its Unbreakable Messaging for ...
 
6 Critical SaaS Engineering Mistakes to Avoid
6 Critical SaaS Engineering Mistakes to Avoid6 Critical SaaS Engineering Mistakes to Avoid
6 Critical SaaS Engineering Mistakes to Avoid
 
Rumble Entertainment GDC 2014: Maximizing Revenue Through Logging
Rumble Entertainment GDC 2014: Maximizing Revenue Through LoggingRumble Entertainment GDC 2014: Maximizing Revenue Through Logging
Rumble Entertainment GDC 2014: Maximizing Revenue Through Logging
 
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
 

Dernier

Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 

Dernier (20)

Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 

The Essential Cheat Sheet for Linux Admins

  • 1. Linux Command Cheat Sheet | sudo [command] nohup [command] man [command] [command] & >> [fileA] > [fileA] echo -n xargs 1>2& fg %N jobs ctrl-z Basic commands Pipe (redirect) output run < command> in superuser mode run < command> immune to hangup signal display help pages of < command> run < command> and send task to background append to fileA, preserving existing contents output to fileA, overwriting contents display a line of text build command line from previ- ous output Redirect stdout to stderr go to task N list task suspend current task df -h, -i mkfs -t -V resize2fs fsck -A -N pvcreate mount -a -t fdisk -l lvcreate umount -f -v Disk Utilities File system usage create file system update a filesystem, after lvextend* file system check & repair create physical volume mount a filesystem edit disk partition create a logical volume umount a filesystem chmod -c -R touch -a -t chown -c -R chgrp -c -R touch -a -t File permission chmod file read, write and executable permission modify (or create) file timestamp change file ownership change file group permission modify (or create) file time- stamp tr -d uniq -c -u split -l wc -w head -n cut -s diff -q join -i more, less sort -n comm -3 cat -s tail -f File Utilities translate or delete character report or omit repeated lines split file into pieces print newline, word, and byte counts for each file output the first part of files remove section from file file compare, line by line join lines of two files on a common field view file content, one page at a time sort lines in text file compare two sorted files, line by line concatenate files to the stan- dard output output last part of the file mkdir rmdir Directory Utilities create a directory remove a directory find ls -a -C -h rm -r -f locate -i cp -a -R -i du -s file -b -i mv -f -i grep, egrep, fgrep -i -v File management search for a file list content of directory remove files and directory find file, using updatedb(8) database copy files or directory disk usage identify the file type move files or directory print lines matching pattern tar xvfz gzip, gunzip, zcat uuencode, uudecode zip, unzip -v rpm bzip2, bunzip2 rar File compression create or extract .tar or .tgz files create, extract or view .gz files create or extract .Z files create or extract .ZIP files create or extract .rpm files create or extract .bz2 files create or extract .rar files ex vi nano view emacs sublime sed pico File Editor basic editor visual editor pico clone view file only extensible, customizable editor yet another text editor stream editor simple editor free -m killall sensors top kill -1 -9 service [start|stop|restart] ps aux dmesg -k Memory & Processes display free and used system memory stop all process by name CPU temperature display current processes, real time monitoring send signal to process manage or run sysV init script display current processes, snapshot display system messages netstat -r -v telnet tcpdump ssh -i ping -c Network print network information, routing and connections user interface to the TELNET protocol dump network traffic openSSH client print routing packet trace to host network pwd -P bc expr cal export ` [command] date -d $[variable] Misc Commands print current working directory high precision calculator evaluate expression print calender assign or remove environment variable backquote, execute command print formatted date if set, access the variable awk, gawk tsh " " ' ' python bash ksh php csh, tcsh perl source [file] Scripting pattern scanning tiny shell anything within double quotes is unchanged except and $ anything within single quote is unchanged "object-oriented programming language" GNU bourne-again SHell korn shell general-purpose scripting language C shell Practical Extraction and Report Language load any functions file into the current shell, requires the file to be executable Compiled by Alvin Khoo Share This Cheat Sheet Read the Blog Post » http://bit.ly/LinuxSheet