Base Server Setup Across Distributions
July 11, 2026
After the initial server preparation, the next step is installing the utility toolkit you'll rely on for monitoring, debugging, and day-to-day administration. The same tools exist on every distribution, but package names and service management patterns differ. This post documents the full set of base packages installed on every server, along with configuration for htop and screen.
Package Managers
Before diving into package lists, a quick reference for the three package managers used here.
Gentoo (Portage)
# sync the package tree
emerge --sync
# install a package
emerge -av category/package
# search for packages
eix package-name
# update everything
emerge -uDN @world
# remove orphaned dependencies
emerge --depclean
Gentoo uses category/package notation. USE flags control compile-time features. Every package is compiled from source unless you're running a binary package host.
Debian (APT)
# update package lists
apt update
# install a package
apt install -y package
# upgrade all packages
apt upgrade -y
# search
apt search package-name
# remove a package and its config
apt purge package
Alpine (APK)
# update package index
apk update
# install a package
apk add package
# upgrade all
apk upgrade
# search
apk search package-name
# remove
apk del package
Alpine packages are musl-based and smaller than their glibc equivalents. Some tools behave slightly differently because of this.
Essential Utilities
Every server gets the same core set of tools. The table below maps package names across distributions.
| Tool | Gentoo | Debian | Alpine |
|---|---|---|---|
| htop | sys-process/htop | htop | htop |
| pciutils | sys-apps/pciutils | pciutils | pciutils |
| nano | app-editors/nano | nano | nano |
| colordiff | app-misc/colordiff | colordiff | colordiff |
| screen | app-misc/screen | screen | screen |
| nmap | net-analyzer/nmap | nmap | nmap |
| tcpdump | net-analyzer/tcpdump | tcpdump | tcpdump |
| DNS tools | net-dns/bind | dnsutils | bind-tools |
| traceroute | net-analyzer/traceroute | traceroute | traceroute |
| iperf | net-misc/iperf | iperf3 | iperf3 |
| lshw | sys-apps/lshw | lshw | lshw |
| nvme-cli | sys-apps/nvme-cli | nvme-cli | nvme-cli |
| lsof | sys-process/lsof | lsof | lsof |
| cpupower | sys-power/cpupower | - | cpupower |
| elinks | www-client/elinks | elinks | elinks |
| rsync | net-misc/rsync | rsync | rsync |
Notable differences: DNS lookup tools ship as net-dns/bind on Gentoo (which provides dig and host), dnsutils on Debian, and bind-tools on Alpine. Gentoo also gets portage-specific tools that don't exist on other distributions.
Installing on Gentoo
emerge -av sys-process/htop sys-apps/pciutils app-editors/nano \
app-misc/colordiff app-portage/eix app-misc/screen \
app-portage/genlop app-shells/bash-completion \
app-shells/gentoo-bashcomp net-analyzer/nmap \
net-analyzer/tcpdump net-dns/bind net-analyzer/traceroute \
net-misc/iperf sys-apps/lshw sys-apps/nvme-cli \
sys-process/lsof sys-power/cpupower www-client/elinks \
net-misc/rsync
Gentoo-specific packages in this list:
app-portage/eix— fast package search that replaces slowemerge --searchapp-portage/genlop— tracks compilation progress and estimates time remainingapp-shells/gentoo-bashcomp— bash completion definitions for Gentoo tools
Installing on Debian
apt install -y htop pciutils nano colordiff screen nmap \
tcpdump dnsutils traceroute iperf3 lshw nvme-cli lsof \
elinks bash-completion rsync
Installing on Alpine
apk add htop pciutils nano colordiff screen nmap tcpdump \
bind-tools traceroute iperf3 lshw nvme-cli lsof cpupower \
elinks rsync
Configuring htop
The default htop layout wastes screen space and hides useful metrics. A custom htoprc configures a two-column header layout with ZFS, disk I/O, and network metrics visible at a glance.
Create the htop config directory and deploy the configuration:
mkdir -p /root/.config/htop
mkdir -p /etc/skel/.config/htop
Write the following to /root/.config/htop/htoprc:
htop_version=3.3.0
config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1
hide_kernel_threads=1
shadow_other_users=1
show_program_path=1
highlight_megabytes=1
highlight_threads=1
header_margin=1
screen_tabs=1
show_cpu_usage=1
show_cpu_frequency=1
color_scheme=0
enable_mouse=1
delay=15
header_layout=two_67_33
column_meters_0=AllCPUs4 Blank CPU Memory Swap
column_meter_modes_0=1 2 1 1 1
column_meters_1=Hostname DateTime Blank Blank ZFSCARC DiskIO NetworkIO Blank LoadAverage Tasks Uptime
column_meter_modes_1=2 2 2 2 2 2 2 2 2 2 2
tree_view=0
sort_key=46
sort_direction=-1
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU
.tree_sort_key=PID
.tree_view=0
.sort_direction=-1
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE Command
.sort_key=IO_RATE
.tree_sort_key=PID
.tree_view=0
.sort_direction=-1
Key settings in this configuration:
header_layout=two_67_33— splits the header into two columns, 67% and 33%- Left column shows CPU bars, overall CPU percentage, memory, and swap
- Right column shows hostname, date/time, ZFS ARC stats, disk I/O, network I/O, load average, tasks, and uptime
hide_kernel_threads=1— reduces noise in the process listscreen_tabs=1— enables the I/O view tab for disk-heavy troubleshootingdelay=15— refreshes every 1.5 seconds instead of the default
Copy the config to /etc/skel/.config/htop/htoprc so new users get it automatically.
Configuring Screen
Screen is the terminal multiplexer that survives disconnects. A system-wide screenrc gives every user a status bar showing the hostname, window list, load average, and date.
Add the following to /etc/screenrc:
caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= %{y}@%H %{r}%1`%{w}| %{g}%l %{w} | %{y}%m/%d/%Y %c %{w}"
termcapinfo xterm* ti@:te@
This status line shows:
- Window list with the active window highlighted in bold white on blue
- Hostname in yellow on the right
- Load average in green
- Date and time in yellow
The termcapinfo line fixes scrollback behavior in xterm-compatible terminals, letting you use the scrollbar instead of screen's copy mode.
On Alpine, /etc/screenrc may not exist. Create it:
touch /etc/screenrc
Then add the same configuration.
Service Management
The biggest operational difference between these distributions is how services are managed.
OpenRC (Gentoo and Alpine)
Gentoo and Alpine both use OpenRC. The commands are identical:
# start a service
rc-service servicename start
# stop a service
rc-service servicename stop
# restart
rc-service servicename restart
# enable at boot (default runlevel)
rc-update add servicename default
# disable at boot
rc-update del servicename default
# list all services and their status
rc-status
Services live in /etc/init.d/. Configuration variables for each service go in /etc/conf.d/.
systemd (Debian)
Debian uses systemd:
# start a service
systemctl start servicename
# stop a service
systemctl stop servicename
# restart
systemctl restart servicename
# enable at boot
systemctl enable servicename
# disable at boot
systemctl disable servicename
# check status
systemctl status servicename
# list running services
systemctl list-units --type=service --state=running
Service files live in /lib/systemd/system/ with overrides in /etc/systemd/system/.
Checking Listening Ports
Regardless of init system, verifying that a service is actually listening is the same:
ss -lnt
This shows all TCP sockets in the LISTEN state with port numbers. Use sport = :PORT to filter:
ss -lnt sport = :22
Verifying the Base
After installing everything, verify the key tools are available and the system is clean:
# confirm packages are installed
which htop nmap dig lsof screen rsync
# check running services
rc-status # Gentoo/Alpine
systemctl status # Debian
# verify no unnecessary services are running
ss -lnt
# check disk usage
df -h
# check memory
free -m
At this point the server has a complete toolkit for monitoring, debugging, and administration. The next step is hardening SSH access and locking down who can log in.