A practical toolbox โ
A practical toolbox of commands that cover the most common maintenance tasks on a TrueNAS Scale box (Debian Linux + ZFS).
๐ System Monitoring โ
bash
uptime # Show how long system is running, and load average
htop # Interactive CPU, RAM, process monitor (install if missing)
top # Similar to htop but preinstalled
free -h # Show memory usage
df -h # Disk usage (human-readable)
du -sh /mnt/* # Show dataset/folder sizes under /mnt๐๏ธ Storage / ZFS โ
bash
/sbin/zpool list # List pools, size, health
/sbin/zpool status # Check pool health, errors
/sbin/zpool scrub Pool_A # Start scrub (replace Pool_A with your pool name)
/sbin/zpool status Pool_A # Check progress of scrub
/sbin/zfs list # List datasets
/sbin/zfs get compression Pool_A # Check compression settingโ๏ธ Services โ
bash
systemctl status ssh # Check SSH service status
systemctl status nfs-kernel-server # Check NFS service (if used)
systemctl restart smb # Restart SMB/CIFS shares
systemctl list-units --type=service # List running services
journalctl -xe # Show recent logs (errors)
journalctl --since "2025-09-01 17:18:00" --until "2025-09-01 18:00:00" # Show logs in time frame (errors)๐ฅ Users & Permissions โ
bash
id # Show groups of current user
groups # Same, shorter
who # Who is logged in via SSH
last # Last logins๐ Network โ
bash
ip a # Show all network interfaces and IPs
ping 8.8.8.8 # Test internet connectivity
ss -tulpn # Show open ports and listening services๐ File Management โ
bash
ls -lh /mnt/ # List datasets with sizes
cd /mnt/Pool_A/share # Navigate to share
cp file1 file2 # Copy
mv file1 file2 # Move/rename
rm file1 # Delete (โ careful!)
nano filename.txt # Edit file (if nano installed)๐งน Housekeeping โ
bash
reboot # Reboot server
shutdown now # Shutdown immediately
sudo apt update && sudo apt upgrade # Update system (if you enable sudo)๐ Pro-Tips for Mobile SSH โ
Aliases โ create shortcuts in
~/.bashrc, e.g.bashalias zpools="/sbin/zpool list && /sbin/zpool status" alias mem="free -h && df -h"Then just type
zpoolsormem.tmux โ Install and use
tmuxso if your phone disconnects, sessions persist.Termux (Android app) โ You can even script commands from your phone.