Automate safe system upodates with a single script (for APT + systemd systems)

THE PROBLEM Keeping a Linux system fully updated usually means doing several things by hand: Update APT package lists Upgrade installed packages Remove unused dependencies and cached files Update Flatpak apps (if you use Flatpak) Update firmware via fwupd (if available) Decide whether to reboot or shut down None of that is hard, but it is repetitive and easy to skip steps, especially firmware updates. This script turns that whole workflow into a single, safe command. REQUIREMENTS This script assumes: Package manager Uses APT Example: Debian, Ubuntu, Linux Mint and similar Init system Uses systemd (for systemctl reboot/poweroff) Shell bash (script uses “#!/usr/bin/env bash” and “set -euo pipefail”) You can run it with: bash script.sh Privileges Your user has sudo rights Optional components Flatpak (optional) If not installed, Flatpak steps are skipped fwupd (fwupdmgr, optional) If not installed, firmware steps a...

Networking utilities and tools: DNS and addresses

DNS and addresses


Files

Debian family: /etc/network
SUSE family: /etc/sysconfig/network


Basic and omnipresent network utilities

nmtui is the GUI utility independent from the desktop environment, working on the shell.
nmcli is the command line utility.
Ubuntu uses netplan.


IP utility

$ /sbin/ip addr show
Diplays the IP address of the machine

$ /sbin/ip route show
Displays the routing information

Dynamic Host Configuration Protocol Client - dhclient
Utility to set and manage dynamic IP


Route

Route manage the routing table, which displays the correlation of final destinations with the next hop addresses.

$ route –n
or
$ ip route
Shows current routing table

$ route add -net address
or
ip route add
Add static route

$ route del -net address
or
$ ip route del
Delete static route


Traceroute

Traceroute inspects the route taken by the data packet to reach the destination host. Used for delays and errors network troubleshooting . It can isolate connectivity issues between hops.

$ traceroute <address>


Other networking tools

ethtool
Queries network interfaces and can also set various parameters such as the speed

netstat
Displays all active connections and routing tables; useful for monitoring performance and troubleshooting

nmap
Scans open ports on a network; important for security analysis

tcpdump
Dumps network traffic for analysis

iptraf
Monitors network traffic in text mode

mtr
Combines functionality of ping and traceroute and gives a continuously updated display

dig
Tests DNS workings; a good replacement for host and nslookup

$ /etc/ifconfig [options]
Visualises and configures network interfaces





Comments