Show Menu
Cheatography

Linux Befehle Cheat Sheet (DRAFT) by

Kurze Zusammenfassung von Linux Befehlen, die häufiger in Benutzung sind.

This is a draft cheat sheet. It is a work in progress and is not finished yet.

A

alias
lets you set another name for a string that belongs to a file, text, program or command name
apt
lets you manage advanced package tool libraries in Debian­-based operating systems such as Ubuntu and Kali
awk
searches and manipu­lates regular expression pattern in a file

C

cal
displays a calendar in your Linux comman­d-line interface
cat
printing the content of a file
cd


cd ..
cd -
to navigate between direct­ories
returns to the current user’s home directory
moves a directory up
goes back to the previous directory
chmod
change the permis­sions of files or direct­ories
chmod -rwx---r-– file.txt
owner, group, other accounts
r: read
w: write
x: execute
chown
lets you change the ownership of files, direct­ories or symbolic links
cp
copy files from your current directory to another folder
curl
transfer data from or to a server by specif­iying its URL
cut



-f
-b
-c

-d
selects specific sections from a file and print them as a terminal output
cut options file
options are mandatory
selects a specific row field
cuts the line by a specified byte size
sections the line using a specified character
separates lines based on delimiters

D

df
checks your Linux system's disk usage
diff
compares two files and prints their differ­ences
dig
displays inform­ation about a domain
du
check the size of a directory and its content

E

echo
print text in your command as a terminal output

F

file
checks a file type, such as txt, pdf or other
find
searches for a file in a specific directory

G

grep
lets you search specific lines from a file using keywords
 

H

head
print the first few entries of a file / by default the first 10 lines
history
checks previously run utilities
hostname
checks your VPS hostname and other related inform­ation
htop
lets you display and manage processes in your Linux server / lets you add additional options
--help
gives you inform­ation about a command (command --help)
with | less you can cut a long help descri­ption into pieces of sites

I

ip
lets you list and manage your systems network parame­ters, similar to the ifconfig command in older linux distri­butions

J

jobs
are tasks or commands that are running in your current shell
jed
lets you edit files

K

kill
terminate a procces using its ID

L

ln
links files or direct­ories with a shortcut
locate
searches for a file and print its location path / updatedb
ls
lists the content of a folder, including files and direct­ories.

M

man
displays a compre­hensive guide of another utility
mkdir
create one or multiple direct­ories
mv
move a file or folder to another location, also can rename files

N

nano
lets you edit files
netstat

-a
-t
-u
-r
-i


-c
displays inform­ation about your systems network config­uration
displays listening and closed sockets
shows TCP connec­tions
lists UDP connec­tions
displays routing tables
shows inform­ation about network interfaces
continuously outputs network inform­ation for real-time monitoring
nslookup
requests a domain name system (DNS) server to check a domain linked to an IP adress or vice versa
 

P

passwd
add or change a password manually later
ping
sends packets to a target server and fetches the responses
ps
summarizes the status of all running processes in your Linux systems at a specific time
doesnt update the inform­ation automa­tically
pwd
checks the full path of your current working directory

R

rm
deletes files from a directory
rmdir
delete empty direct­ories, doesnt work with subfolders

S

scp
lets you securely copy files and direct­ories between systems over a network
sed
search and replace patterns in files quickly
shutdown
turn off or restart your linux system at a specific time
sort
rearrange a file's content in a specific order / doesnt modify the file, print the rearanged as output default from a-z
su
switch to another user in the terminal session
sudo
enables non-root users who are part of the sudo group to execute admini­str­ative commands
systemctl
manage services in your linux system

T

tail
print the last few lines of a file
tar
bundles multiple files or direct­ories into an archive without compre­ssion
tee
outputs another commands result to both the terminal and a file
time
measures the execution time of commands or scripts to gain insights into your system perfor­mance
top
displays all running processes in your system and their hardware consum­ption
touch
create a new empty file in a specific directory
traceroute
tracks a packet's path when traveling between hosts, providing inform­ation like the transfer time and involved routers

U

unalias
remove an alias
uname
displays detailed inform­ation about your linux machine, including hardware, name and operating system kernel
unzip
decomp­resses one or multiple files from a zip archive
useradd
create a new account in your linux system
userdel
remove a user

V

vi
lets you edit files

W

watch
lets you contin­uously run a utility at a specific interval to monitor changes in the output
wget
lets you download files from the internet via http, https or ftp
whoami
checks the user who is currently logged-in

Z

zip
compresses one or multiple files into a zip archive