Allgemein

bash keyboard shortcuts

Cheatsheet: Productivity-boosting Bash shortcuts

root shell

$ sudo -i

Tastaturlayout einstellen

# Kali, Ubuntu, ... 
$ setxkbmap -layout de
# Metasploitable
$ loadkeys de

Shutdown

$ shutdown -h now

Netzwerk

IP Adresse

$ ifconfig [eth0]
$ ip a

Gebundene Netzwerkservices

$ netstat -tlpn | grep 80

Default Gateway

$ route -n

Restart

In Metasploitable notwendig nach Konfigurationsänderungen

$ sudo ifdown eth0
$ sudo ifup eth0

ARP cache

arp -a -n
# `-a` ... Use alternate BSD style output format (with no fixed columns)
# `-n`, `--numeric` ... shows numerical addresses instead of trying to determine symbolic host, port or user names

geht auch unter Windows

Apache Webserver

$ service apache2 start
$ cd /var/www/html

vi, vim

i → Insert mode, ESC → Command mode

explainshell

Erklärung für Optionen

explainshell.com