Installing htop and using nohup for long-running SSH sessions on Intel-based QNAP NAS (QTS 5.1+)

Abstract: Resolve process monitoring limitations and prevent SSH session termination during long-running tasks on Intel-based QNAP NAS systems.

Created: 2026-08-08 by
Install htop via the QNAP App Center or Entware package manager to gain a superior interactive process viewer compared to the default top command. Use nohup combined with an ampersand to detach long-running SSH tasks from your terminal session, ensuring they continue executing even if you disconnect unexpectedly.

Prerequisites for Intel-Based QNAP Systems

Before diving into command-line utilities, ensure your Intel-based QNAP NAS is running QTS 5.1 or a later version. These instructions rely on standard Linux environments available through either the built-in App Center or third-party package managers like Entware. If you are using a newer ARM-based model, the package repositories may differ significantly, but this guide focuses specifically on x86_64 architecture found in most Intel-powered devices. You will need SSH access enabled on your NAS. Navigate to Control Panel > Network & File Services > Telnet / SSH and check Enable SSH Service. Set the port to 22 unless you have specific security requirements mandating a non-standard port. Connect using a terminal client such as PuTTY on Windows or Terminal on macOS/Linux. Enter your admin credentials when prompted. Having root access is not strictly necessary for installing user-space applications, but it simplifies system-wide configurations.

Installing htop for Process Monitoring

The default top command in Linux provides basic process information but lacks interactivity and visual clarity. htop offers a colorful, mouse-friendly interface that displays CPU, memory, and swap usage in real-time. It allows you to sort processes by various metrics and kill them directly from the interface without knowing their PID numbers. If your QNAP NAS has the App Center installed, search for "htop" and install it directly. This method handles dependencies automatically and places the binary in a standard path. For more advanced users who prefer package management similar to Debian or Ubuntu systems, Entware is the recommended approach. First, ensure Entware is installed on your device. If not, follow the official installation script for your specific hardware platform. Once Entware is active, open your SSH session and run the following command to update the package list:
opkg update
Next, install htop using the package manager:
opkg install htop
After installation, verify the setup by typing htop in your terminal. You should see a grid of processes with clear headers for CPU, MEM, and SWAP columns. Press F10 to quit the application. This tool is particularly useful when troubleshooting high CPU usage caused by background indexing or network shares. For related networking issues that might affect performance monitoring, consider reviewing our guide on fixing random disconnects with Intel I225-V adapters QNAP NAS: Fixing Random Disconnect Issues with Intel I225-V Network Adapters.

Using nohup for Persistent Sessions

When running long scripts, large file transfers, or complex compilations over SSH, a dropped connection can terminate the process. The nohup command (short for "no hangup") prevents the shell from sending a SIGHUP signal to the process when the terminal closes. Combine this with the ampersand (&) to run the job in the background. For example, to run a backup script named backup.sh persistently, use:
nohup ./backup.sh > backup.log 2&&1 &
This command redirects both standard output and standard error to backup.log, preventing clutter in your terminal. The trailing ampersand sends the process to the background immediately. You can then safely close your SSH window. To monitor progress later, reconnect via SSH and tail the log file:
tail -f backup.log
This technique is essential for maintenance tasks that span hours. It eliminates the anxiety of losing progress due to unstable Wi-Fi connections or accidental laptop sleep modes. For deeper insights into background execution principles, refer to our article on understanding background script execution using nohup on Ubuntu Server Understanding Background Script Execution using nohup on Ubuntu Server.

Managing Background Jobs

Once jobs are running in the background, you may need to manage them. Use the jobs command to list all background tasks associated with your current shell session. If you need to bring a job back to the foreground, use fg %1, replacing 1 with the job number. To suspend a foreground process, press Ctrl+Z, then resume it in the background with bg. While htop shows these processes visually, jobs helps manage shell-level control. Note that nohup jobs persist beyond the shell session, so they may not appear in jobs after reconnection. Use ps aux | grep backup to find them by name.

Troubleshooting Common Issues

Sometimes htop may not display correctly if your terminal emulator does not support color codes. Ensure your SSH client is configured to accept ANSI colors. If opkg fails to find htop, verify your internet connection and DNS settings on the NAS. Some enterprise firewalls block external package repositories. In such cases, manual installation from compiled binaries may be required, though this is rare for common tools. Regarding disk space, htop consumes negligible resources, making it safe for continuous monitoring. Always ensure your QTS firmware is up to date to avoid compatibility issues with newer versions of these utilities.

Frequently Asked Questions

Can I use htop on ARM-based QNAP models?

Yes, but the installation method differs slightly. ARM models often use different package repositories or require precompiled binaries from community sources. Check the QNAP forum for specific Entware builds compatible with your processor architecture before attempting installation.

How do I kill a stuck process shown in htop?

Navigate to the process using arrow keys and press F9 to send a signal. Select SIGTERM (15) for a graceful shutdown or SIGKILL (9) if the process is unresponsive. Confirm the action to terminate the task immediately.

What happens to my nohup job if the NAS restarts?

Nohup jobs do not survive a system reboot. They are tied to the kernel's process table, which clears upon shutdown. You must schedule persistent tasks using cron jobs or QNAP's Task Scheduler for automatic restarts after power cycles.

Is nohup safer than tmux or screen?

Nohup is simpler for single commands but lacks session restoration capabilities. Tools like tmux allow you to detach and reattach to interactive shells, preserving input state. Use nohup for one-off scripts and tmux for long-term administrative work.

Why does htop show higher CPU usage than top?

Both tools read from the same /proc filesystem, but htop calculates averages differently across multiple cores. It may aggregate load in ways that appear higher initially. Trust both equally; significant discrepancies usually indicate a reporting bug in older htop versions.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More