Useful Linux server tools: htop, tmux, Midnight Commander, rsync, Git and more
A handful of small command-line tools make a VPS much easier to run. Each one below installs from your distribution's package manager. On Debian and Ubuntu use sudo apt install <name>; on CentOS, AlmaLinux and Fedora use sudo yum install <name> (or dnf). Even the cheapest plans have room for all of them.
htop: see what is using your CPU and memory
htop is a live view of running processes with color-coded CPU and memory use. It is a friendlier version of top, with mouse support and the ability to sort and kill processes.
sudo apt install htop
htop
Press F6 to sort by CPU or memory, F9 to kill a process and F10 to quit. It is the first thing to open when a server feels slow.
tmux: keep sessions running after you disconnect
tmux is a terminal multiplexer. It lets you run several terminal windows inside one SSH connection, split the screen into panes, and detach from a session and come back to it later. Anything running inside keeps going when your connection drops. (If you prefer an older, simpler tool, see how to use screen.)
sudo apt update
sudo apt install tmux
tmux
- Press Ctrl+b then
dto detach. - Run
tmux attachto reattach, ortmux lsto list sessions. - Ctrl+b then
%splits the window left and right; Ctrl+b then"splits it top and bottom.
Midnight Commander: a file manager in the terminal
Midnight Commander (mc) shows two directory panes side by side, so you can copy, move, view and edit files without typing long paths. It also has a built-in editor and can browse archives and remote servers.
sudo apt install mc
mc
rsync: copy and back up files between servers
rsync copies only what has changed, over SSH, so it is fast and cheap on bandwidth. It is the usual tool for simple backups and for moving a site from one server to another.
sudo apt install rsync
rsync -avz /var/www/html/ user@server2:/var/www/html/
The trailing slash on the source matters: with it, the contents of the folder are copied; without it, the folder itself is. Add --dry-run first to see what would happen, and --delete only when you want the destination to mirror the source exactly.
Git: version control for code and config
Git tracks changes to files. On a server it is mostly used to pull your code or to keep configuration files under version control.
sudo apt install git
git clone https://example.com/you/project.git
cd project
git pull
Monit: restart services that stop
Monit watches processes, files and network services, and can restart something that has died or email you when a check fails. After installing, add checks to /etc/monit/monitrc (or a file under /etc/monit/conf.d/).
sudo apt install monit
sudo systemctl enable --now monit
Apache JMeter: load-test a website
JMeter simulates many visitors hitting a site so you can see how it copes before real traffic arrives. It is a Java program with a graphical interface, so it is normally run on your own computer (not on a small server) and pointed at the site you want to test. Only test sites you own or have permission to test.
Need a server for these? Cheapest VPS plans in stock
- 1 GB KVM VPS Special1 CPU · 1 GB RAM · 20 GB disk · 3 TB bandwidth · New York, Los Angeles, Chicago$21.99/yrabout $1.83/moView at RackNerd
- KVM-512MB1 CPU · 512 MB RAM · 30 GB disk · 500 GB bandwidth · Los Angeles, Dallas, Chicago$26.99/yrabout $2.25/moView at RackNerd
- Ryzen-512MB (Linux)1 CPU · 512 MB RAM · 10 GB disk · 500 GB bandwidth · New York, Chicago, Seattle$26.99/yrabout $2.25/moView at RackNerd
In stock when this page loaded. See all 20 matching plans