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
o
neue Zeile darunter + INSERT Mode$
end of line,A
+INSERT Mode^
oder_
beginning (first non-whitespace),I
+INSERT Mode0
(zero) start of line:w
speichern:q
beenden,:wq
speichern und beenden:x
speichern (wenn Änderungen) und beenden:q!
beenden (Änderungen verwerfen)
explainshell
Erklärung für Optionen