The VikiD Truth

Knowledge base / Computing / Linux & the command line

computingFreedom | Build | Picolisp | Picolisp Machine | pil sources | Linux | BASH | C Programmming | Operating Systems | Javascipt | Emacs | vim | Pharo Smalltalk | Computer Security | Python | SimpleLinuxConfig | Keyboard Config

Simple Linux Configuration

Here is the truth about configuring Linux: almost everything is a text file, and the system will tell you which one if you ask. Once that sinks in, “configuration” stops being a mystery and becomes a short list of files you actually touch.

What it is, in plain words

Simple Linux configuration means the everyday settings that make a machine yours: hostname, timezone, locale, keyboard, users, network, what starts at boot, and a few shell and editor defaults. Distros hide these behind installers and GUIs, but underneath they are the same ideas – and on a minimal system like Void/Vikix you meet them directly.

Why it matters

A freshly installed system is nobody’s. Five minutes of configuration turns it into a place you can think in: the right keymap for your fingers, the right time on the clock, SSH keys that Just Work, a window manager that launches on login. Doing it from the text files also means your config can live in Git and move with you.

An everyday analogy: moving into a flat

The landlord hands you empty rooms. You change the locks (users and SSH), label the doorbell (hostname), set the clocks (timezone), plug in the router (network), choose which lamps turn on when you open the door (services), and put your kettle where you want it (dotfiles). None of that requires rebuilding the building.

flowchart TB
  A[Identity: hostname, users, locale, time] --> B[Access: SSH, sudo, firewall]
  B --> C[Network: nmtui / netplan / dhcpcd]
  C --> D[Services: runit / systemd]
  D --> E[Dotfiles: shell, editor, WM]

A hands-on pocket list

Hostname, time, locale

# systemd distros
sudo hostnamectl set-hostname vikix
sudo timedatectl set-timezone Asia/Dubai
sudo localectl set-locale LANG=en_GB.UTF-8

# Void / generic
echo vikix | sudo tee /etc/hostname
sudo ln -sf /usr/share/zoneinfo/Asia/Dubai /etc/localtime
# uncomment your locale in /etc/locale.gen, then:
sudo locale-gen          # Debian-family
# Void: set LANG in /etc/locale.conf and reconfigure glibc

Keyboard (console and X)

# console on systemd
sudo localectl set-keymap uk
# X11 – see Keyboard Config for the long version
setxkbmap -layout us,ru -option caps:ctrl_modifier

A Caps-Lock-as-Control remap pays for itself the first day you use Emacs or StumpWM. For deeper remapping, KMonad.

Users and sudo

sudo useradd -m -G wheel vikid     # wheel/sudo group name varies
sudo passwd vikid
sudo EDITOR=nvim visudo            # allow wheel/%sudo

Network – use nmtui on NetworkManager systems; on Void with dhcpcd, ln -s /etc/sv/dhcpcd /var/service/ and optionally static config in /etc/dhcpcd.conf.

What starts at boot

# systemd
systemctl enable --now sshd NetworkManager
# Void runit
sudo ln -s /etc/sv/sshd /var/service/
sudo ln -s /etc/sv/NetworkManager /var/service/

Dotfiles worth carrying

FilePurpose
~/.bashrc / ~/.zshrcaliases, prompt, PATH
~/.inputrcreadline keybindings
~/.config/nvim/init.lua or ~/.emacs.d/editor
~/.stumpwmrcStumpWM
~/.gitconfigname, email, aliases
~/.ssh/confighosts and keys – see SSH Login

Keep them in a Git repo and symlink in; GNU Stow or a small shell script is enough.

A tiny first-boot script (adapt paths for your distro):

#!/bin/sh
set -e
sudo hostnamectl set-hostname vikix 2>/dev/null || echo vikix | sudo tee /etc/hostname
sudo timedatectl set-timezone Asia/Dubai 2>/dev/null || sudo ln -sf /usr/share/zoneinfo/Asia/Dubai /etc/localtime
ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519
git clone git@github.com:you/dotfiles.git ~/dotfiles && ~/dotfiles/install.sh

Firmware and microcode

On bare metal, install CPU microcode and keep firmware current – a boring security and stability win:

# Debian/Ubuntu
sudo apt install intel-microcode amd64-microcode
# Void
sudo xbps-install -S linux-firmware

Then reboot after kernel or firmware updates when prompted.

Common misconceptions

Connections

Reading List & Source

Last edited · 1 revisions

Tags: #Computing