RedTeam Nexus Labs
Module 01 · Lesson 03 // Linux Fundamentals

commands

Linux Fundamentals · Linux

Freereading · 10 min
On this page
LESSON

Overview

Working in Linux means running commands. They follow a consistent structure, and learning that structure — plus a handful of essential commands — lets you navigate and inspect any Linux system. This lesson covers command anatomy and the core commands to know first.

Learning objectives

  • Describe the general structure of a Linux command.
  • Use essential navigation and inspection commands.
  • Distinguish options from arguments.

Core concept

A Linux command generally follows the pattern:

command [options] [arguments]
  • command — the program to run (e.g. ls).
  • options (flags) — modify behavior, usually prefixed with - (short, e.g. -l) or -- (long, e.g. --all).
  • arguments — what the command acts on (e.g. a file or directory).

Essential first commands include pwd (print working directory), ls (list contents), cd (change directory), cat (show file contents), cp/mv/rm (copy/move/remove), and mkdir (make directory).

How it works

The shell reads the command name, resolves it to a program, applies the options to adjust its behavior, and acts on the arguments. For example, ls lists the current directory; ls -l lists it in long format (permissions, owner, size, date); ls -l /etc applies that long format to the /etc directory. Options can often be combined (ls -la), and most commands accept --help to summarize their usage.

Practical example

$ pwd
/home/user
$ ls -l
drwxr-xr-x 2 user user 4096 Sep 21 10:00 projects
-rw-r--r-- 1 user user  220 Sep 21 09:15 notes.txt
$ cd projects
$ cat notes.txt

pwd shows where you are, ls -l lists details, cd projects moves into a directory, and cat notes.txt prints a file's contents. (Exact listings vary by system.)

Cybersecurity relevance

Fluency with core commands is the foundation of all Linux security work — enumerating a system, reading configuration files, inspecting logs, and navigating the filesystem all rely on them. On a compromised or target host (in authorized testing), quick, accurate command use is how you understand the environment. These same commands appear constantly in later modules on permissions, processes, and logs.

Common mistakes

  • Confusing options with arguments — options modify behavior; arguments are what the command acts on.
  • Running rm carelessly — removal is immediate and not sent to a recycle bin.
  • Forgetting --help/man pages when unsure of a command's usage.

Key takeaways

  • Commands follow command [options] [arguments]; options (with -/--) modify behavior, arguments are the targets.
  • Essential commands: pwd, ls, cd, cat, cp, mv, rm, mkdir.
  • Command fluency underpins all Linux administration and security tasks, from enumeration to reading logs.

Check your understanding

  • In ls -l /etc, identify the command, the option, and the argument.
  • Why should the rm command be used with particular care on Linux?
FINISH THIS LESSON

Sign in to save your progress.