03 – Operating Systems, Networks and Linux Basics
Course: ICT Basic course · Level: introductory Book: Kurose & Ross, 9th ed., chapter 2 (intro: network applications and the OS); for OS background: Stallings, Operating Systems, or the free book Operating Systems: Three Easy Pieces
Learning goals
After this article you can:
- explain what an operating system (OS) does and why different devices use different OSes;
- explain which parts of the network stack live in the application, the OS kernel and the hardware;
- set up a Linux virtual machine (or WSL) to practise with;
- use basic Linux commands for files, users, permissions, processes and networking;
- use the modern network commands (
ip,ss,dig,curl) and recognise the older ones (ifconfig,netstat).
1. What is an operating system?
An OS is software that manages the hardware of a system (CPU, memory, storage, network interface, display...) and offers services to programs and users. (after Stallings)
Main tasks of an OS:
| Task | Example |
|---|---|
| Process management | run many programs at the same time (scheduling) |
| Memory management | give each program its own protected memory space |
| File systems | store data in files and folders (ext4, NTFS, APFS) |
| Device drivers | talk to hardware such as the network card |
| Networking | implements TCP/IP, offers sockets to applications |
| Security | users, permissions, isolation between programs |
Many OSes, each for its own job
| Device | Typical OS |
|---|---|
| Desktop/laptop | Windows 11, macOS, Linux (Ubuntu, Fedora, Debian) |
| Server / cloud | Linux (the large majority of servers and cloud instances), Windows Server |
| Phone | Android (Linux kernel), iOS |
| Router / switch | Cisco IOS-XE, Juniper Junos, Arista EOS, MikroTik RouterOS, OpenWrt (Linux) |
| Embedded / IoT | Linux (Raspberry Pi OS), FreeRTOS, Zephyr |
| Containers | Linux (Docker, Kubernetes) |
So: "the best OS" doesn't exist. It depends on what you need. Every ICT professional needs to be comfortable with Linux, because almost every server, cloud service and network device uses it or something similar.
2. Where does the network stack live?
1 2 3 4 5 6 7 8 9 10 | |
- A socket is the "door" between an application and the transport layer. A programmer opens a socket and says "send these bytes to IP x, port y". The OS handles the rest.
- Network-core devices (routers) only implement layers 1–3. They don't run user applications.
- Modern exceptions: QUIC (HTTP/3) implements its transport functions in user space, on top of UDP. Smart NICs and eBPF/XDP in Linux process packets very fast, close to the hardware.
3. Your practice environment
To practise with Linux and networking safely, use a 64-bit Linux virtual machine or WSL. (32-bit Linux images are outdated: most modern software no longer supports them.) Choose one of these options:
| Your laptop | Recommended setup |
|---|---|
| Windows 10/11 | WSL2 with Debian or Ubuntu (wsl --install -d Debian), or VirtualBox 7 with a Debian 13 64-bit VM |
| macOS with Apple Silicon (M1–M4) | UTM (free) with Debian 13 ARM64, or VirtualBox 7.1+ (supports Apple Silicon) |
| macOS Intel | VirtualBox 7 with Debian 13 64-bit |
| Linux | You're already there. Or use a VM to experiment safely |
- Debian 13 "trixie" is the current stable release (first released August 2025; supported until 2028, LTS until 2030).
- Install Wireshark on your host laptop (Windows/macOS/Linux) for the capture exercises.
Tip: take a snapshot of your VM before you start experimenting. If you break something, you can go back.
4. Linux basics
4.1 Logging in and the shell
You type commands in a shell (usually bash or zsh). The prompt shows who and where you are:
1 2 | |
When you type a password, nothing appears on the screen. That's a security feature, not a bug.
Root vs. sudo: don't log in as
root. Work as a normal user and usesudofor administrator tasks. This limits the damage from mistakes and malware.
4.2 Files and directories
| Command | Meaning |
|---|---|
pwd |
show the current directory |
ls -la |
list files, including hidden files and permissions |
cd /etc · cd .. · cd ~ |
change directory |
mkdir practice |
create a directory |
cp a b · mv a b · rm a |
copy, move/rename, delete (no recycle bin!) |
cat file · less file |
show a file |
nano file |
simple text editor (or vim if you're brave) |
grep word file |
search for text |
man ls · ls --help |
help |
Important directories: /etc (configuration), /home (users), /var/log (log files), /usr/bin (programs), /tmp (temporary).
4.3 Users and permissions (rwx)
1 2 3 4 5 6 7 | |
| Letter | File | Directory | Value |
|---|---|---|---|
| r | read | list contents | 4 |
| w | write | create/delete files | 2 |
| x | execute | enter (cd) | 1 |
1 2 3 | |
4.4 Packages, services and logs
1 2 3 4 5 6 7 | |
4.5 Network commands – modern and legacy
| Task | Modern (use these) | Legacy (still found on older systems, macOS, books) |
|---|---|---|
| Show interfaces and IP addresses | ip a (or ip addr) |
ifconfig |
| Show routing table | ip r |
route -n, netstat -r |
| Show neighbours (ARP/NDP cache) | ip neigh |
arp -a |
| Show open ports / connections | ss -tulpn |
netstat -tulpn |
| Test reachability | ping, ping -6 |
— |
| Path to destination | traceroute, tracepath, mtr |
— |
| DNS lookup | dig, host, resolvectl query |
nslookup (still widely used, also on Windows) |
| HTTP request | curl -v https://... |
telnet host 80 |
| Raw TCP/UDP connection | nc (netcat), openssl s_client (for TLS) |
telnet |
Why changed?
ifconfig,netstat,routeandarpcome from the old net-tools package. It is no longer maintained on Linux and is not installed by default on Debian. The iproute2 tools (ip,ss) replaced them. On macOS and BSD,ifconfigandnetstatare still the standard tools. Windows usesipconfig /all,route print,arp -a,netstat -ano,nslookup,tracert,Test-NetConnection(PowerShell).
Example:
1 2 3 4 5 6 7 8 | |
lo= loopback interface (127.0.0.1 / ::1): the machine talking to itself.enp0s3= the network card, with a MAC address (link/ether), an IPv4 address (inet) and an IPv6 link-local address (inet6 fe80::).
5. Try it yourself
- Install your practice environment (section 3) and take a snapshot.
- Run
ip a,ip randss -tulpn. What is your IP address? What is your default gateway? Which ports are open? ping -c 4 1.1.1.1andping -c 4 www.hva.nl. If the first works and the second doesn't, what is probably wrong?- Create a file
secret.txtthat only you can read and write (chmod 600). Check it withls -l. - Play the OverTheWire Bandit game (levels 0–10): https://overthewire.org/wargames/bandit/
Check your understanding
- Name four tasks of an operating system.
- Which layers of the network stack are implemented in the OS kernel?
- What is a socket?
- What do the permissions
rw-r-----mean? - Which modern command replaces
ifconfig? Andnetstat?
References
Book and courses
- Kurose & Ross, 9th ed., chapter 2.1 (principles of network applications, sockets)
- R. & A. Arpaci-Dusseau, Operating Systems: Three Easy Pieces (free) – https://pages.cs.wisc.edu/~remzi/OSTEP/
- Debian 13 "trixie" release information – https://www.debian.org/releases/trixie/
- VirtualBox – https://www.virtualbox.org/ · UTM for Mac – https://mac.getutm.app/ · WSL – https://learn.microsoft.com/en-us/windows/wsl/install
Videos
- freeCodeCamp – Introduction to Linux – Full Course for Beginners https://www.youtube.com/watch?v=sWbUDq4S6Y8
- freeCodeCamp – The 50 Most Popular Linux & Terminal Commands https://www.youtube.com/watch?v=ZtqBQ68cfJc
- NetworkChuck – Linux for Hackers EP 1 (fun, beginner-friendly series) https://www.youtube.com/watch?v=VbEx7B_PTOE
Tools
- explainshell – paste a command and see what each part means – https://explainshell.com/
- OverTheWire Bandit – learn Linux by playing – https://overthewire.org/wargames/bandit/
Cyber Security
Why is this important for cyber security?
- The OS is the foundation of security. It decides which user may read which file, which program may use the network, and which memory belongs to whom. If the OS is compromised (e.g. a rootkit), nothing on that machine can be trusted any more.
- Unpatched systems are the number one way in. Attackers scan the whole Internet for known vulnerabilities within hours of their publication. A system that is not updated will be found.
- Too many rights = big damage. Malware or an attacker running as
root/Administrator can do anything. Running as a normal user limits the damage (principle of least privilege). - Open ports = attack surface. Every service listening on the network (
ss -tulpn) is a possible entry point. - Logs are evidence. Without logs (
/var/log,journalctl) you cannot detect or investigate an incident.
What can you do to make it safe?
- Update automatically:
sudo apt install unattended-upgradeson Debian; enable Windows Update / macOS updates. - Use least privilege: work as a normal user, use
sudoonly when needed, give files the minimum permissions (chmod 600for private keys and secrets). - Use strong authentication: long passphrases, and for SSH use keys instead of passwords (
ssh-keygen -t ed25519). Disable root login over SSH (PermitRootLogin no). - Close what you don't use: remove or disable unused services and check with
ss -tulpn. - Use a host firewall:
nftablesorufwon Linux (sudo ufw enable), Windows Defender Firewall. - Download software only from trusted sources (official repositories, verified checksums/signatures). This also applies to VM images!
- Snapshots and backups let you recover from mistakes and ransomware.
Extra references
- CIS Benchmarks – hardening guides for Linux, Windows, macOS – https://www.cisecurity.org/cis-benchmarks
- Debian Security Information – https://www.debian.org/security/
- NCSC-NL – https://www.ncsc.nl/
- Computerphile – How NOT to Store Passwords! https://www.youtube.com/watch?v=8ZtInClXe1Q