Cheat Sheet Flashcards
Opens man pages for the specified tool.
man <tools>
Prints the help page of the tool.
<tool>
-h
Searches through man pages’ descriptions for instances of a given keyword.
apropos <keyword>
Concatenate and print files.
cat
Displays current username.
whoami
Returns users identity.
id
Sets or prints the name of the current host system.
hostname
Prints operating system name.
uname
Returns working directory name.
pwd
Used to assign or view an address to a network interface and/or configure network interface parameters.
ifconfig
A utility to show or manipulate routing, network devices, interfaces, and tunnels.
ip
Shows network status.
netstat
Another utility to investigate sockets.
ss
Shows process status.
ps
Displays who is logged in.
who
Prints environment or sets and executes a command.
env
Lists block devices.
lsblk
Lists USB devices.
lsusb
Lists opened files.
lsof
Lists PCI devices.
lspci
Execute command as a different user.
sudo
The utility requests appropriate user credentials via PAM and switches to that user ID (the default user is the superuser). A shell is then executed.
su
Creates a new user or update default new user information.
useradd
Deletes a user account and related files.
userdel
Modifies a user account.
usermod
Adds a group to the system.
addgroup
Removes a group from the system.
delgroup
Changes user password.
passwd
Install, remove and configure Debian-based packages.
dpkg
High-level package management command-line utility.
apt
Alternative to apt.
aptitude
Install, remove and configure snap packages.
snap
Standard package manager for Ruby.
gem
Standard package manager for Python.
pip
Revision control system command-line utility.
git
Command-line based service and systemd control manager.
systemctl
Prints a snapshot of the current processes.
ps
Query the systemd journal.
journalctl
Sends a signal to a process.
kill
Puts a process into background.
bg
Lists all processes that are running in the background.
jobs
Puts a process into the foreground.
fg
Command-line utility to transfer data from or to a server.
curl
An alternative to curl that downloads files from FTP or HTTP(s) server.
wget
Starts a Python3 web server on TCP port 8000.
python3 -m http.server
Lists directory contents.
ls
Changes the directory.
cd
Clears the terminal.
clear
Creates an empty file.
touch
mkdir
mkdir
Lists the contents of a directory recursively.
tree
Move or rename files or directories.
mv
Copy files or directories.
cp
Terminal based text editor.
nano
Returns the path to a file or link.
which
Searches for files in a directory hierarchy.
find
Updates the locale database for existing contents on the system.
updatedb
Uses the locale database to find contents on the system.
locate
Pager that is used to read STDOUT or files.
more
An alternative to more with more features.
less
Prints the first ten lines of STDOUT or a file.
head
Prints the last ten lines of STDOUT or a file.
tail
Sorts the contents of STDOUT or a file.
sort
Searches for specific results that contain given patterns.
grep
Removes sections from each line of files.
cut
Replaces certain characters.
tr
Command-line based utility that formats its input into multiple columns.
column
Pattern scanning and processing language.
awk
A stream editor for filtering and transforming text.
sed
Prints newline, word, and byte counts for a given input.
wc
Changes permission of a file or directory.
chmod
Changes the owner and group of a file or directory.
chown
Go back to the previous directory.
cd ..
Simplest way to go to the users Home directory.
cd
Way to go to the users Home directory using a special character.
cd ~
Way to go to the users Home directory by using an environment variable.
cd $HOME