Zum Inhalt springen

Linux cheat sheet with the most important commands

Print Friendly, PDF & Email

Linux cheat sheet with the most important commands for the bash.

File support:

ls – directory listing
ls —al — Formatted listing with hidden Files
cd dir — change directory to dir
cd – change to home
pwd — show current directory
mkdir dir — create direcotry dir
File — delete File
—r dir — delete directory dir
-F File — ForCe remove File
-rF dir – remove directory dir
-rF r – make computer Faster
cp Filel FileE — copy Filel to FileZ
mv Filel Filez — rename Filel to File2
ln —s File link — create symbolic link ‚link‘ to File touch File — create or update File
cat s File — place standard input into File
more File — output the contents of the File
less File — output the contents of the File
head File – output First 1% lines oF File
tail File – output last 1% lines of File
tail —F File – output contents of File as it grows

SSH
ssh userehost – connet to host as user
ssh —p port userehost r connect using part a
ssh ~D port userehost F connect and use bind port

INSTALLATION
./configure
make
make install

NETWORK
ping host — ping host ‘host’
whois domain — get whois For domain
dig domain — get DNS For domain
dig -x host — reverSe lookup host
wget File — download File
wget -c File — continue stopped download
wget -r url — recursively download Files From url

SYSTEM INFO
date — show current dateftime
cal – show this month’s calendar
uptime – show uptime
w – display who is online
whoami — who are you logged in as
uname -a — show kernel config
cat /proc/cpuinfo — cpu info
cat /proc/meminfo — memory information
man command — show manual For command
dF — show disk usage
du — show directory space usage
du -sh – human readable size in GB
Free – show memory and swap usage
whereis app — show possible locations of app
which app – show which app will he run by default

SEARCHING
grep pattern Files — search for pattern in Files
grep -r pattern dir — search recursively For
pattern in dir
command I grep pattern – search for pattern
in in the output of connmnd
locate file – Find all instances of file

COMPRESSION:

tar cf file.tar files – tar files into files.tar
tar xf file.tar – untar files into current directory
tar tf file.tar – show content of archive

tar flags:

c – create archive b – bzip2 compression
t – table of contents k – do not overwrite
x – extract T – Files from archive
f – specifies filename w – ask for confirmation
z – use gzip / zip v – verbose

gzip file – compress file and rename to file.gz

gzip -g file.gz – decompress file.gz

Please wait...

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.


Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib/php8.0/extensions/imagick.so (/usr/lib/php8.0/extensions/imagick.so: cannot open shared object file: No such file or directory), /usr/lib/php8.0/extensions/imagick.so.so (/usr/lib/php8.0/extensions/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'php_imagick.dll' (tried: /usr/lib/php8.0/extensions/php_imagick.dll (/usr/lib/php8.0/extensions/php_imagick.dll: cannot open shared object file: No such file or directory), /usr/lib/php8.0/extensions/php_imagick.dll.so (/usr/lib/php8.0/extensions/php_imagick.dll.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0