# Linux Command Line and Packages

> Navigate the filesystem, read documentation, install software and get comfortable working on a remote Linux server. Free notes, key concepts, resources and a...

Canonical: https://www.internhack.in/roadmaps/tracks/devops/linux-basics
Last updated: 2026-11-28

Navigate the filesystem, read documentation, install software and get comfortable working on a remote Linux server.

Beginner · about 15 hours · difficulty 1/5

The Linux command line is your primary workspace as a DevOps engineer. Servers usually have no GUI, containers are Linux userlands, and CI jobs run shell commands. Fluency here makes everything else faster.

### Essentials

- Navigation and files: `pwd`, `ls -la`, `cd`, `cp`, `mv`, `rm`, `mkdir -p`, `find`, `tree`.
- Reading files: `cat`, `less`, `head`, `tail -f`, `wc`.
- Getting help: `man`, `--help`, and `tldr` for quick examples.
- Pipes and redirection: `|`, `>`, `>>`, `2>&1`, and `tee`.
- Environment: `PATH`, `export`, `env`, and dotfiles like `~/.bashrc`.

### Distributions and package managers

Distros differ mainly in package tooling and release cadence. Debian and Ubuntu use `apt` with `.deb` packages; RHEL, Fedora, Rocky and Amazon Linux use `dnf`/`yum` with `.rpm`; Alpine (popular in containers) uses `apk`. Learn to search, install, pin versions, add a vendor repository with its signing key, and apply security updates.

### Pitfalls

Running everything as root, piping random `curl | sh` installers without reading them, and not knowing which distro you are on (`cat /etc/os-release`).

**Good enough to move on:** you can SSH into a fresh VM, find what distro it runs, install and update packages, locate a config file with `find`, and follow a log with `tail -f`.

## Key concepts

- **Filesystem navigation**
- **Pipes and redirection**
- **man pages and help**
- **Environment variables and PATH**
- **apt (Debian/Ubuntu)**
- **dnf / yum (RHEL family)**
- **apk (Alpine)**: Common in container images
- **Snap / Flatpak**

## Mini project

Spin up an Ubuntu VM (or WSL), install nginx from apt, find its config and log files with find, and write down every command you used as a reproducible setup script.

## Check yourself

What is the difference between > and >> and what does 2>&1 do at the end of a command?

## Free resources

- [Linux Journey](https://linuxjourney.com/) (linuxjourney.com)
- [Linux man pages](https://man7.org/linux/man-pages/) (man7.org)

Previous: [JavaScript / Node.js for Automation](https://www.internhack.in/roadmaps/tracks/devops/node-automation) · Next: [Processes, Signals and Resources](https://www.internhack.in/roadmaps/tracks/devops/processes-signals)

## More in Living on Linux

- [Linux Command Line and Packages](https://www.internhack.in/roadmaps/tracks/devops/linux-basics)
- [Processes, Signals and Resources](https://www.internhack.in/roadmaps/tracks/devops/processes-signals)
- [Filesystems, Disks and Storage](https://www.internhack.in/roadmaps/tracks/devops/filesystems-storage)
- [Users, Groups and Permissions](https://www.internhack.in/roadmaps/tracks/devops/users-permissions)
- [Services with systemd](https://www.internhack.in/roadmaps/tracks/devops/systemd-services)
- [Performance and Troubleshooting](https://www.internhack.in/roadmaps/tracks/devops/linux-performance)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [DevOps Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/devops)
