Show Menu
Cheatography

Linux Fundamentals Cheat Sheet by

You have just completed the Linux Fundamentals

system commands

man <to­ol>
Opens man pages for the specified tool.
<to­ol> -h
Prints the help page of the tool.
apropos <ke­ywo­rd>
Searches through man pages' descri­ptions for instances of a given keyword.
cat
Concat­enate and print files.
whoami
Displays current username.
id
Returns users identity.
hostname
Sets or prints the name of the current host system.
uname
Prints operating system name.
pwd
Returns working directory name.
ifconfig
The ifconfig utility is used to assign or view an address to a network interface and/or configure network interface parame­ters.
ip
Ip is a utility to show or manipulate routing, network devices, interf­aces, and tunnels.
netstat
Shows network status.
ss
Another utility to invest­igate sockets.
ps
Shows process status.
who
Displays who is logged in.
env
Prints enviro­nment or sets and executes a command.
journalctl
Query the systemd journal.
kill
Sends a signal to a process.
bg
Puts a process into backgr­ound.
jobs
Lists all processes that are running in the backgr­ound.
fg
Puts a process into the foregr­ound.
ls
Lists directory contents.
cd
Changes the directory.
clear
Clears the terminal.
which
Returns the path to a file or link.
find
Searches for files in a directory hierarchy.
updatedb
Updates the locale database for existing contents on the system.
locate
Uses the locale database to find contents on the system.

Permission

chmod
Changes permission of a file or directory.
chown
Changes the owner and group of a file or directory.

packages & reposi­tories

dpkg
Install, remove and configure Debian­-based packages.
apt
High-level package management comman­d-line utility.
aptitude
Altern­ative to apt.
snap
Install, remove and configure snap packages.
gem
Standard package manager for Ruby.
pip
Standard package manager for Python.
git
Revision control system comman­d-line utility.
 

users & groups management

sudo
Execute command as a different user.
su
The su utility requests approp­riate user creden­tials via PAM and switches to that user ID (the default user is the superu­ser). A shell is then executed.
useradd
Creates a new user or update default new user inform­ation.
userdel
Deletes a user account and related files.
usermod
Modifies a user account.
addgroup
Adds a group to the system.
delgroup
Removes a group from the system.
passwd
Changes user password.

Request

curl
Comman­d-line utility to transfer data from or to a server.
wget
An altern­ative to curl that downloads files from FTP or HTTP(s) server.
python3 -m http.s­erver
Starts a Python3 web server on TCP port 8000.

Lists

lsblk
Lists block devices.
lsus
Lists USB devices.
lsof
Lists opened files.
lspci
Lists PCI devices.

direct­ories & files

touch
Creates an empty file.
mkdir
Creates a directory.
tree
Lists the contents of a directory recurs­ively.
mv
Move or rename files or direct­ories.
cp
Copy files or direct­ories.
nano
Terminal based text editor.
more
Pager that is used to read STDOUT or files.
less
An altern­ative to more with more features.
head
Prints the first ten lines of STDOUT or a file.
tail
Prints the last ten lines of STDOUT or a file.
sort
Sorts the contents of STDOUT or a file.
grep
Searches for specific results that contain given patterns.
cut
Removes sections from each line of files.
tr
Replaces certain charac­ters.
column
Comman­d-line based utility that formats its input into multiple columns.
awk
Pattern scanning and processing language.
sed
A stream editor for filtering and transf­orming text.
wc
Prints newline, word, and byte counts for a given input.
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Eclipse Cheat Sheet
          Bash_test_expressions Cheat Sheet
          Basic Linux Commands Cheat Sheet