SlideShare a Scribd company logo
1 of 1
Download to read offline
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

More Related Content

More from 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
 

More from 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
 

Recently uploaded

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
 
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
 
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
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
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
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
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
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
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
 
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
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
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
 
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
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 

Recently uploaded (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
 
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
 
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...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
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
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
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
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
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
 
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
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
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
 
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
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 

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