# 🐧 Linux Command Cheat Sheet (Raspberry Pi / Home Server)
This document provides a practical reference of the most important Linux commands used in this project, with a focus on:
- service management (systemd)
- networking
- remote access (SSH / XRDP)
- Tailscale VPN
- system monitoring and troubleshooting
---
## ⚙️ Service Management (systemd)
### 🔍 Check service status
```bash
systemctl status <service>Examples:
systemctl status xrdp
systemctl status tailscaledsudo systemctl start <service>
sudo systemctl stop <service>
sudo systemctl restart <service>sudo systemctl enable <service>
sudo systemctl disable <service>systemctl list-units --type=service --state=runningsystemctl list-unit-files --state=enabledsudo systemctl reset-failedip aip routeping -c 3 8.8.8.8sudo ss -tulnpFilter examples:
sudo ss -tulnp | grep 3389
sudo ss -tulnp | grep 22hostname -Icurl ifconfig.messh user@192.168.x.x
ssh user@100.x.x.xscp file.txt user@host:/pathsystemctl status xrdpsudo systemctl restart xrdpsudo ss -tulnp | grep 3389tailscale statustailscale ip -4sudo tailscale upsudo tailscale downsudo systemctl restart tailscaledsudo apt update
sudo apt upgrade -ysudo apt install <package> -ysudo apt remove <package>sudo apt autoremove -ytop
htopfree -hdf -huptimejournalctl -xejournalctl -u xrdp
journalctl -u tailscaledjournalctl -bps auxps aux | grep <name>kill -9 <PID>ip linksystemctl list-units | grep -E "vpn|wg|tailscale"dpkg -l | grep -E "wireguard|tailscale|openvpn"When something doesn't work:
- Check service:
systemctl status <service>- Check ports:
sudo ss -tulnp- Check logs:
journalctl -u <service>- Check network:
ip a
ip route- Always verify services with
systemctl status - Use
ss -tulnpto debug networking issues - Logs (
journalctl) are your best friend - Prefer Tailscale IP (
100.x.x.x) for remote access - Avoid exposing services directly to the internet