This is a draft cheat sheet. It is a work in progress and is not finished yet.
Main
watch -n [sec] [statement]
|
Prints the output of statement every sec seconds |
|
Edits file |
|
Creates empty file |
|
Lists all loaded modules |
|
Load infos of module |
|
Kernel-Log |
|
Lists RAM usage |
|
Starts process manager |
|
Runtime, system load |
|
print OS version |
|
Actual system load (like htop) |
|
Lists CPU information |
|
Lists all block devices |
|
Lists all USB devices |
File System Operations
|
Show disk space |
|
Show free inodes |
Package Managing (sudo apt-get ...)
|
Sync soruces |
|
Execute updates |
|
Execute updates with enhanced package conflict management |
|
Installs package |
install --reinstall [package]
|
Reinstalls package |
|
Uninstalls package (excl. configs) |
|
Uninstalls package (incl. configs) |
|
Checks consistency |
|
Removes local package-sources |
|
Removes unused packages |
Execute all with sudo apt-get ...
|
|
Network operations
scp [file] [user]@[host]:[destination]
|
Copying files or folders via SSH (-r for recursive) |
|
Lists all local IP adrresses |
File operations
|
Search for filename in path |
|
Shows content of file |
|
Outputs the last N lines of file |
Configuration (/boot/config.ini)
|
Rotate Rpi LCD Display |
|
Write debug log (sudo vcdbg log msg) |
Security
Change default password with passwd
.
Change SSH default port in /etc/ssh/sshd_config
.
sudo apt-get install fail2ban
Configure fail2ban ( /etc/fail2ban/jail.conf
):
ignoreip = 127.0.0.1 # local IP
bantime = 3600 # ban time in s
maxretry = 5 # ban after 5 retries
|
|
|
|