Skip to content

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.

    bash
    alias zpools="/sbin/zpool list && /sbin/zpool status"
    alias mem="free -h && df -h"

    Then just type zpools or mem.

  • tmux โ†’ Install and use tmux so if your phone disconnects, sessions persist.

  • Termux (Android app) โ†’ You can even script commands from your phone.

Version: dca0e30 | Updated: 2026-10-28