All tools

Linux

You're viewing a free preview. Sign in free to read every tool guide.

2 min read

Where DevOps actually happens

Most production Linux servers have no screen, no mouse, and no desktop — the terminal is the entire interface. Think of it as a very literal conversation: you type an instruction, press Enter, and it happens immediately. No confirmation dialogs, no "are you sure?" — which is exactly why the basics in this page matter before anything else in this guide.

Opening a terminal

On Linux or macOS, a Terminal app is already built in. On Windows, Windows Terminal or PuTTY both work, and WSL (Windows Subsystem for Linux) gives you a real Linux environment alongside it. Whichever you use, the commands you type from here on are identical — that's the whole point of a standard shell.

Connecting to a remote server: SSH

ssh alice@10.0.1.5              # connect as user "alice"
ssh alice@10.0.1.5 -p 2222      # a non-default port
ssh -i ~/.ssh/id_rsa alice@10.0.1.5   # connect using a specific key instead of a password

The first time you connect to a new server, SSH shows a host key fingerprint and asks whether to trust it — that's normal, and it's SSH's way of noticing if you ever connect to that same address and get a different server unexpectedly later.

Reading the prompt

alice@web-01:~$
PartMeans
aliceThe user you're logged in as
web-01The hostname of the machine
~Your current directory — ~ is shorthand for your home folder
$You're a regular user. A # here instead means you're logged in as root — be extra careful, everything you type runs with full power

sudo: borrowing admin power for one command

sudo systemctl restart nginx

sudo runs a single command with administrator privileges, then hands control straight back — rather than staying logged in as root the whole session. It asks for your own password, not root's, and every use gets logged, so there's a record of who ran what.

Command anatomy

ls -la /var/log
  • ls — the command
  • -la — flags (options) that change its behavior — here, "list format" and "include hidden files"
  • /var/log — the argument: what to run it against

Tip: almost every command has a --help flag, and man <command> opens its full manual page. Reach for those before searching the internet — they're already open, and they always match the exact version actually installed on that server.