Top 100 Linux Commands Cheatsheet for Devops
Here's our 100 commands long cheat-sheet for Linux terminal use. Most commands should work on all Linux distributions, including Ubuntu and Debian based distributions. Had we missed
any, share with us on the comments section below.
whatis [option] [argument]
Usage info:
`whatis -help`
exit
Usage info:
`man exit`
To clear the screen of the terminal working on
clear
To view online reference manuals
man [option] [args]
Usage info:
`man -help`
To search and view text files
less [option] [arguement]
Usage info:
`less --help`
To print the current directory's name.
pwd [option] [arguement]
Usage info:
`pwd --help`
To list files in a directory
ls[option] [arguement]
Usage info:
ls -h
To change the current working directory
cd [directory]
Usage info:
`cd --help`
bash [option] [file]
Usage info:
`bash -help`
cat [filename]
Usage info:
`cat --help`
type [file] [command name]
Usage info:
`type --help`
alias [-p] name[=value]
Usage info:
`alias --help`
whoami [options]
Usage info:
`whoami --help`
whereis [options] filename
Usage info:
whereis[-help]
date[options] [format]
Usage info:
`date --help`
touch filename
Usage info:
`touch --help`
echo [options] [string]
Usage info:
`man echo`
nano [options] filename
Usage info:
`nano --help`
mkdir [option] [directories]
Usage info:
`mkdir --help`
cp [option] source destination
Usage info:
`cp --help`
mv [option] source destination
Usage info:
`mv --help`
rm [option] filename
Usage info:
`rm --help`
wc [option] filename
Usage info:
`wc --help`
head [option] filename
Usage info:
`head --help`
tail [option] filename
Usage info:
tail --h
To search a particular keyword
apropos [option] keyword
Usage info:
`apropos -help`
find [where to start searching]
Usage info:
`find --help`
sort filename.txt
Usage info:
`sort --help`
uniq [option] [input] [output]
Usage info:
`uniq --help`
diff [option] file1 file2
Usage info:
`diff --help`
comm [option] file1 file2
Usage info:
`comm --help`
sdiff: -
[-1] [-s] [-o outfile]
Usage info:
`sdiff --help`
paste [option] [files]
Usage info:
`paste --help`
cal [month] year
Usage info:
`cal -help`
sleep number [suffix]
Usage info:
`sleep --help`
ps [options]
Usage info:
`ps --help`
printenv [option] [variable]
Usage info:
`printenv --help`
export [-f] [-n] name [=value]
Usage info:
`export --help`
set [option]
Usage info:
`set --help`
unset
Usage info:
`unset --help`
vim [options] filelist
Usage info:
`vim --help`
history [options] [arguments]
Usage info:
`history --help`
kill -1
Usage info:
`kill --help`
bg [job_spec]
Usage info:
`bg --help`
uname [options]
Usage info:
`uname --help`
jobs [option] [job id]
Usage info:
`jobs --help`
dpkg -i/ debpackage
Usage info:
`dpkg --help`
gzip [options] [filename]
Usage info:
`gzip --help`
gunzip [option] [archive_name]
Usage info:
`gunzip --help`
tar [options] [archive file] [file to be archived]
Usage info:
`tar --help`
rsync local file
Usage info:
`rsync --help`
chmod [reference] [operator] [mode]
Usage info:
`chmod --help`
chown [option] [owner] [group] filename
Usage info:
`chown --help`
id [option] [user]
Usage info:
`id --help`
su [option] [username[arguements] ]
Usage info:
`su --help`
sudo [option] [command]
Usage info:
`sudo --help`
passwd [option] [username]
Usage info:
`passwd --help`
adduser [option] [username]
Usage info:
`adduser --help`
sudo ping -v
Usage info:
`ping -help`
traceroute [option] host_address[path]
Usage info:
`traceroute --help`
(Domain Information Groper) is a network administration command-line tool for querying Domain Name System (DNS) name servers
dig -v
Usage info:
`dig -help`
wget [option] [url]
Usage info:
`wget --help`
time [option] [command]
Usage info:
`man time`
xargs [option] [commands]
Usage info:
`xargs --help`
printf (-v) format (arguments)
Usage info:
`printf --help`
test condition
if command; then commands
function name(commands)
while command; do command; done
Usage info:
`while -help`
case
NO SPECIFIC SYNTAX
for NAME (in words); do command
fold [option] [file]
Usage info:
`fold --help`
stat [option] file
Usage info:
`stat --help`
du [option] file
Usage info:
`du --help`
free [option]
Usage info:
`free --help`
pg [-number] [-p string] [-cefnr]
To retrieve files URLs
curl[url]
Usage info:
`curl --help`
Lsof shows that httpd listens on port 80
lsof
Usage info:
`lsof -help`
shutdown
shows network ports in use and their incoming connections.
netstat
apt [...COMMANDS] [...PACKAGES]
Usage info:
`apt --help`
To print the computer architecture
arch [OPTION]
Usage info:
`arch --help`
atq [-V] [-q queue]
chpasswd
user1:user1_password
user2:user2_password
user3:user3_password
Usage info:
`chpasswd --help`
chroot /path/to/new/root command
Usage info:
`chroot --help`
read
Usage info:
`read -help`
dc [option [file ...]
Usage info:
`dc --help`
hostname -[option] [file]
Usage info:
`hostname --help`
To provide a proper API
hostnamectl [options] command
Usage info:
`hostnamectl -help`
import [options] output-file
info [option]... [menu-item]
install [OPTION]... [-T] SOURCE DEST
install [OPTION]... SOURCE... DIRECTORY
install [OPTION]... -t DIRECTORY SOURCE...
install [OPTION]... -d DIRECTORY...
Usage info:
`install --help`
reboot [options]
Usage info:
`reboot --help`
restore -C [-b blocksize] [-D filesystem] [-f file] [-s fileno][-T directory]
rmdir [filename]
Usage info:
`rmdir --help`
userdel [options] login
Usage info:
`userdel --help`
To show currently logged in users
users [option] file
Usage info:
`users --help`
To find out how long the system is active
uptime [-options]
Usage info:
`uptime --help`
join [option] file1 file2
Usage info:
`join --help`
grep [option] pattern [file]
Usage info:
`grep --help`
To allow a user to communicate with other users, by copying lines from one user's terminal to others
write user [tty]
Usage info:
`write -help`
:::author|102:::
Post a Comment