Introduction to Linux: Kernel, Shell, File System and SSH Login
The Linux foundations behind DevOps work: kernel and shell, distributions, the directory layout, the seven file types, and SSH login to a VirtualBox VM.

ON THIS PAGE
Docker, Jenkins, Kubernetes and Ansible all run on Linux servers, so every DevOps workflow eventually depends on reading a Linux system correctly. This first part of the series explains how the kernel and shell divide the work, where files live in the directory tree, which file types exist, and how to open an SSH session to a VirtualBox VM.
What Linux is
An operating system (OS) is the software layer between you and the hardware. It manages the processor, memory, disks and input/output devices, so programs do not have to talk to the hardware directly.
A few design principles explain most of Linux's behaviour:
- Everything is a file, including hardware devices (for example a disk is
/dev/sda). - Configuration lives in plain text files, mostly under
/etc, so you can edit, copy and version it. - Small programs that do one job are combined with pipes to solve bigger tasks.
- It is open source, free to use, and backed by a large community. Most servers, cloud VMs and containers run Linux.
Architecture: hardware, kernel, shell, applications

Linux is built in layers:
- Kernel: the core of the OS. It controls the hardware and lets applications use it (memory, CPU scheduling, devices, file systems).
- Shell: a command-line interpreter. It reads what you type, asks the kernel to do the work, and prints the result. Common shells are
bash,zsh,sh,kshandtcsh. A shell starts when you log in or open a terminal. - Applications and commands: programs such as
vi,grepanddatethat run on top.
Key terms
| Term | What it means | Examples |
|---|---|---|
| Distribution (distro) | The Linux kernel plus tools, a package manager and defaults | Ubuntu, Debian, Red Hat Enterprise Linux, Fedora, CentOS Stream, SUSE, Kali |
| Boot loader | Program that loads the kernel when the machine starts | GRUB, ISOLINUX |
| Service (daemon) | Program that runs in the background | sshd, httpd, nfsd |
| File system | Method used to store and organise files on a disk | ext4, XFS, FAT, NTFS |
| X Window System | Base layer for graphical interfaces on Linux | X11 (Wayland is the newer replacement) |
| Desktop environment | Full graphical interface on top of the OS | GNOME, KDE, Xfce |
The examples in this series use Ubuntu, a Debian-based distro. It is well documented and available as an image on every major cloud provider, including Amazon EC2.
The Linux directory structure
Everything starts at the root directory /. Linux has no drive letters like C:; additional disks are mounted into directories inside this tree. The directories below come up most often in server work:
| Directory | What it holds | Examples |
|---|---|---|
/ | Root of the whole tree. Only root can write here | |
/root | Home directory of the root user (not the same as /) | |
/home | Home directories of normal users | /home/deependra |
/bin, /usr/bin | Commands for all users | ls, cp, grep, ping |
/sbin, /usr/sbin | Commands for system administration | fdisk, reboot, useradd, sshd |
/etc | System and application configuration files | /etc/passwd, /etc/resolv.conf |
/var | Data that grows: logs, caches, mail, spools | /var/log/syslog, /var/lib |
/tmp | Temporary files, usually cleared on reboot | |
/usr | Installed programs, libraries and documentation | /usr/lib, /usr/local (software built from source) |
/opt | Optional third-party applications | /opt/apache-tomcat |
/boot | Kernel, initrd and GRUB files | vmlinuz-*, initrd.img-* |
/lib | Shared libraries for the programs in /bin and /sbin | libc.so.6 |
/dev | Device files | /dev/sda, /dev/tty1 |
/proc | Virtual files with live kernel and process information | /proc/uptime, /proc/<pid>/ |
/mnt, /media | Mount points for extra disks and removable media | /media/cdrom |
/srv | Data served by the system, such as website files | /srv/www |
The seven Linux file types
The first character of ls -l output shows the file type:
| Symbol | Type | What it is |
|---|---|---|
- | Regular file | Text, scripts, binaries, images |
d | Directory | A folder that contains other files |
l | Symbolic link | A pointer to another file |
c | Character device | Device that sends data one character at a time, such as a terminal |
b | Block device | Device that reads and writes data in blocks, such as a disk |
s | Socket | Endpoint for communication between processes |
p | Named pipe (FIFO) | Connects the output of one process to the input of another |
List files of each type with these commands:
$ ls -l /dev | grep "^c"
$ ls -l /dev | grep "^b"
$ ls -l /dev | grep "^l"
$ sudo find / -type s -ls
$ sudo find / -type p -ls
$ sudo find / -type l -ls | lessgrep "^c" keeps only lines that start with c. find -type searches by file type. Both commands are covered in Essential Linux Commands for DevOps.
Logging in from a terminal
After you enter your username and password, the shell shows a prompt. The last character tells you who you are:
[dipen@example.com ~]$ normal user
[root@example.com ~]# root userTo log out, type exit or press Ctrl+D.
Remote login to a VM over SSH
SSH (Secure Shell) opens an encrypted terminal on another machine. In my lab, it replaced the VirtualBox console window: the Ubuntu VM was managed from PowerShell on the host laptop.
-
Set the VM network to Bridged Adapter. VirtualBox uses NAT by default. With NAT the VM gets a private address (usually
10.0.2.15) that the host cannot reach directly. With a bridged adapter, the VM gets an address on the host's local network. -
Find the VM's IP address inside the VM:
terminal$ ip -4 addr show -
Confirm the SSH server is running in the VM. On Ubuntu the service is called
ssh:terminal$ sudo systemctl is-active ssh $ sudo systemctl start ssh $ sudo systemctl status sshIf the service does not exist, install it with
sudo apt install openssh-server. -
Connect from the other machine (PowerShell, a Linux terminal or macOS Terminal) and enter the VM user's password when asked:
terminal$ ssh username@192.168.1.50Replace
usernamewith the user on the VM and the IP with the address from step 2.
Key takeaways
- The kernel controls the hardware; the shell passes your commands to the kernel.
- Everything in Linux is a file, and configuration is plain text under
/etc. - Logs go to
/var/log, third-party apps to/opt, user files to/home. - The first character of
ls -ltells you the file type. - To SSH into a VirtualBox VM, use a bridged adapter (or NAT with port forwarding) and make sure
sshis running.
Next in this series: Essential Linux Commands for DevOps.
Keep reading
- How ssh works
Ever wondered what actually happens behind the scenes when you open your terminal and type ssh user@server
- tmux Cheat Sheet: Sessions, Windows, Panes and Copy Mode
A tmux reference for remote work: sessions that survive SSH drops, windows, split panes, copy mode, synchronized panes, and a minimal tmux.conf.
- Logical Volume Management (LVM) in Linux
Add a disk to a VirtualBox VM and take it through every LVM layer: partition, physical volume, volume group and logical volume, then an ext4 mount in fstab.