Source: https://mayphus.org/systems-linux-networking/ Title: Linux — networking and packages Metadata: {"kind":"page","language":"en","route":"/systems-linux-networking/","tags":["systems","linux"],"type":"page"} A machine can have an address without a usable route. A program can listen locally without being reachable from another computer. A package can be installed while the repository advertises a different version. These distinctions prevent an observation at one layer from becoming an unsupported conclusion about the whole system. The goal is to build two small inventories: the local network's visible state and the package manager's record of one command. This follows [processes, services and logs](/systems-linux-processes/) in [Understanding computer systems](/understanding-computer-systems/). ## Environment and exercise status **Proposed exercises, not executed on Ubuntu 24.04 LTS for this guide.** Commands target Ubuntu 24.04 LTS with iproute2, dpkg and APT already present. Use your own desktop or disposable learning VM. No command below installs packages, refreshes repository metadata, contacts a test website or changes interfaces, routes or firewall rules. Keep outputs private: interface addresses and repository locations can identify a machine or organization. If a tool is missing, record the gap rather than installing software on an unfamiliar host. Containers can expose only their own network namespace, not the physical host's entire network. ## Exercise 1 — separate three network observations Run each command on Ubuntu 24.04 LTS: ```sh ip -brief address show ip route show ip -6 route show ss -ltn ``` The address view associates configured addresses with interfaces. Loopback is a local interface, not a cable. More than one address or interface is normal; the presence of an address alone does not establish that it was obtained correctly or that traffic can leave the machine. The [`ip address` manual](https://manpages.ubuntu.com/manpages/noble/man8/ip-address.8.html) explains the address view. The next two commands show IPv4 and IPv6 routes separately. Look for connected networks and, if present, a default route. A default route describes where otherwise-unmatched traffic can be directed; it is not a successful connectivity test. An isolated machine can legitimately have no default route. Policy routing and additional tables require further investigation beyond these default views. See [`ip route`](https://manpages.ubuntu.com/manpages/noble/man8/ip-route.8.html). Finally, `ss -ltn` selects listening TCP sockets and prints numeric addresses and ports. A loopback listener is bound locally; a wildcard listener has a broader local binding. Neither observation proves access through a firewall, router or external network. A container's view can differ from the host's. UDP is intentionally outside this command's scope. The options are documented in [`ss`](https://manpages.ubuntu.com/manpages/noble/man8/ss.8.html). Write three separate conclusions: one about configured addresses, one about visible routes and one about TCP listeners. Add a fourth sentence beginning “I have not tested…”. Suitable unknowns include name resolution, outbound access and remote reachability. Do not try random public addresses or scan neighboring machines to fill those gaps. ## Exercise 2 — trace a command to package records On Ubuntu 24.04 LTS, inspect the package supplying `stat`, used in [files and permissions](/systems-linux-files/): ```sh dpkg-query -W -f='${binary:Package}\t${Version}\t${Status}\n' coreutils apt-cache policy coreutils ``` Keep the single quotes in the first command. They pass the field placeholders to `dpkg-query` rather than asking the shell to expand them. The installed-package database should report a package name, version and status. Read the whole status field: a known package name alone does not mean installation completed successfully. [`dpkg-query`](https://manpages.ubuntu.com/manpages/noble/man1/dpkg-query.1.html) defines the selected fields. APT's policy view can then show an installed version, a candidate and locally known repository versions. That candidate depends on configuration, priorities and available cached metadata. It is not a fresh audit of everything currently published upstream. This command does not update the cache. The [`apt-cache` reference](https://manpages.ubuntu.com/manpages/noble/man8/apt-cache.8.html) explains the distinction between querying cached information and changing packages. Compare the two installed-version observations. If a candidate differs, record the difference without upgrading. If the cache is empty or incomplete, record that limitation. No exact version number is prescribed here because updates can change it within the same Ubuntu release. ## What counts as a useful result The learning result is a set of bounded statements, not a green “healthy” label. You can establish that a local listener was visible at inspection time; you cannot infer that a phone on another network can reach it. You can identify the recorded package version; you cannot infer that every file is unmodified or that the application behaves correctly. These questions also help when evaluating my [older-desktop workspace proposal](/older-desktop-phone-workspace/): what environment would run the tools, which software would be present, and which connection would the phone actually use? That page describes a proposal, not a completed Ubuntu migration or a demonstrated remote-access setup. For another operating system, return to the guide's separate FreeBSD path. Its networking and package tools deserve their own commands and evidence; this Ubuntu chapter is not portable instructions for all Unix-like systems. Official references checked on 2026-10-08. Expected observations are proposed learning outcomes, not measured Ubuntu results.