0% found this document useful (0 votes)
12 views1 page

Cheat Sheet

Uploaded by

Ajay 19cse003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views1 page

Cheat Sheet

Uploaded by

Ajay 19cse003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

6/11/24, 2:05 PM Linux Command Line Cheat Sheet | OverAPI.

com

OverAPI.com Python jQuery NodeJS PHP Java Ruby Javascript ActionScript CSS Express More » Search

Resource Bash Bash Bash IO


Online Commands Shortcuts Variables Redirection
Official Website
uname -a CTRL-c env cmd < file
Download Show system and kernel Stop current command Show enviro-nment variables Input of cmd from file
Linux Command Line Tips head -n1 /etc/issue CTRL-z echo $NAME cmd1 <(cmd2
Unix/Linux Command Cheat Sh Show distri-bution Sleep program Output value of $NAME variabl Output of cmd2 as file input to c
eet [.pdf] mount CTRL-a e md1
Linux Administrator's Quick Ref Show mounted filesy-stems Go to start of line export NAME-=v-alue cmd > file
erence [.pdf] date CTRL-e Set $NAME to value Standard output (stdout) of cmd
Command Line Interface Comm Show system date Go to end of line $PATH to file
ands [.jpg] uptime CTRL-u Executable search path cmd
Show uptime Cut from start of line $HOME Discard stdout of cmd
Related whoami CTRL-k Home directory cmd >> file
chmod Show your username Cut to end of line $SHELL Append stdout to file
Debian man command CTRL-r Current shell cmd 2> file
Fedora Show manual for command Search history Error output (stderr) of cmd to fil
Red Hat !! e
Ubuntu Repeat last command cmd >&2
Unix !abc stdout to same place as stderr
Run last command starting with Pipes cmd 2>&1
Command abc
!abc:p Anchros
stderr to same place as stdout
cmd &> file

Directory Lists Print last command starting with


abc
cmd1 | cmd2
stdout of cmd1 to cmd2
Every output of cmd to file

!$
Operations cmd1 ; cmd2
Run cmd1 then cmd2 Last argument of previous com
cmd1 |& cmd2
stderr of cmd1 to cmd2
mand
pwd cmd1 && cmd2
Show current directory
Run cmd2 if cmd1 is successful
ALT-.
Last argument of previous com ls Options
mkdir dir cmd1 || cmd2 mand
Run cmd2 if cmd1 is not succes -a
!*
Make directory dir
cd dir
sful
cmd
All arguments of previous com Search Files Show all (including hidden)
Change directory to dir mand -R
Run cmd in a subshell
^abc-^-123 grep pattern files Recursive list
cd ..
Go up a directory Run previous command, replaci
Search for pattern in files -r
ng abc with 123 grep -i Reverse order
ls
List files
Case insens-itive search -t
grep -r Sort by last modified
File Recursive search
grep -v
-S
Sort by file size
Operations Inverted search -l
Nano touch file1
Process grep -o
Show matched part of file only -1
Long listing format

Shortcuts Create file1


cat file1 file2
Management find /dir/ -name name*
Find files starting with name in -m
One file per line

Concat-enate files and output ps dir Comma--sep-arated output


Files less file1 find /dir/ -user name
Show snapshot of processes -Q
Ctrl-R View and paginate file1 top Find files owned by name in dir Quoted output
Read file file file1 find /dir/ -mmin num
Show real time processes
Ctrl-O Get type of file1 kill pid Find files modifed less than nu
Save file m minutes ago in dir
https://overapi.com/linux 1/2

You might also like