sort and uniq Commands: Sort, Count and Deduplicate Lines
Sort text with sort (numeric, by column, human sizes, reverse), remove or count duplicates with uniq, and build top-N reports from server logs.
Blog
Linux server administration: Debian, Ubuntu, AlmaLinux, storage, performance and troubleshooting.
Sort text with sort (numeric, by column, human sizes, reverse), remove or count duplicates with uniq, and build top-N reports from server logs.
Check and change the Linux I/O scheduler: none, mq-deadline, bfq and kyber explained, which suits SSDs, NVMe and VPS virtio disks, persistence, and measuring.
Linux signals explained: SIGTERM, SIGKILL, SIGHUP and SIGINT, how services use them for reloads, graceful shutdown in apps and Docker, and trap in Bash.
Bash startup files explained: login vs interactive shells, when .bash_profile, .profile and .bashrc run, SSH and sudo behaviour, where PATH and aliases go.
Use tee to save command output while still seeing it, append with -a, write root-owned files with sudo tee, log scripts and split pipelines.
Monitor Linux servers with SNMP: configure snmpd, secure SNMPv3 users, snmpwalk and snmpget, common OIDs, firewall rules, and Zabbix or LibreNMS.
Run a command once later with at: enable atd, time formats, list and remove jobs with atq and atrm, batch for idle times, lockout safety nets, systemd-run.
Create, list and extract tar archives with gzip, bzip2, xz and zstd compression, exclude files, extract single files and make reliable backups with tar.
Set up a Samba file server on Linux: smb.conf shares, Samba users and permissions, SMB3 encryption, VPN-only access, and Windows, macOS and Linux clients.
Write reusable Bash functions: syntax, arguments, return values and exit codes, local scope, error handling, libraries with source, and examples.
Mount remote folders over SSH with SSHFS on Linux, macOS and Windows: mount and unmount, reconnect options, permissions, fstab auto-mount, speed tips.
Find CPU model, cores, threads, cache and flags on Linux with lscpu, nproc and /proc/cpuinfo, check AVX support, and see current CPU load.
Create a secure SFTP server with OpenSSH: SFTP-only users, chroot jails and permissions, SSH keys, logging, FileZilla and WinSCP, and common fixes.
Configure Debian networking with ifupdown: the /etc/network/interfaces format, static IPv4, DNS, extra IPs, applying changes safely, and cloud-init notes.
Navigate large files with less: scrolling, searching, jumping to lines, following logs with F, filtering lines, opening compressed files and useful options.
Keep server clocks accurate with chrony: install, choose NTP servers, check sync with chronyc, fix large offsets, and compare with systemd-timesyncd.
Manage NetworkManager with nmcli: devices and connections, a static IP, DNS and gateway, extra IPs, applying changes safely, and nmtui on RHEL and AlmaLinux.
Use Bash arrays: create, append, loop, slice and delete elements, associative arrays as maps, read command output into arrays, and pass arrays to commands.
Why commands fail under cron: the minimal cron environment, setting PATH, SHELL, MAILTO and CRON_TZ, loading .env files, nvm and virtualenvs, and debugging.
Read vmstat output column by column: run queue, blocked processes, swap in and out, I/O, context switches and CPU split, with real diagnosis examples.
Batch rename files on Linux: Bash loops with parameter expansion, the Perl rename command, extensions and case, prefixes and dates, recursion, dry runs.
Write systemd service units: [Unit], [Service] and [Install], Type, Restart, User, Environment, overrides with systemctl edit, sandboxing, debugging.
Benchmark a new VPS or dedicated server: sysbench and Geekbench for CPU, fio for disks, iperf3 and speedtest for network, and wrk or k6 for web.
Build and manage Linux software RAID with mdadm: choosing RAID levels, creating arrays, mdadm.conf, monitoring and alerts, replacing failed disks.