Skip to content
RAÚL MORENO IZQUIERDOA PRACTICAL KNOWLEDGE LIBRARY

YOUR FIRST STEPS · ENGLISH GUIDE

Meet Linux.
Make yourself
at home.

Understand your system, learn the commands and build confidence—one small, deliberate step at a time.

Linux fundamentals · Debian · Shell skills · Software freedom

● ● ●your terminal · your tools
# Find out where you are

$ pwd

/home/you# Ask a question

$ whoami

you# Find the manual

$ man ls

Read. Understand. Run. Check.

01Start with inspection
02Practise in your own space
03Know what each change does

THE BIG PICTURE

One system.
Different responsibilities.

Select a layer to see what it does. The shell is a user-space program, not an obligatory layer between every application and the kernel.

Applications, shells and services run as processes in user space. A desktop or terminal is how you interact with some of them.

A SMALL FIRST WIN

Eight lines. A fresh practice directory.

These commands create a new temporary directory, write a two-line note and inspect a copy. Run them in your own terminal if you choose. They need no administrator privileges. Temporary files may be cleaned up later, so use a normal project directory for work you want to keep.

Local practice · creates temporary files
practice_dir=$(mktemp -d)
cd "$practice_dir"
pwd
printf '%s\n' 'Hello Linux' 'Learning one command at a time' > notes.txt
cat notes.txt
grep -n 'Linux' notes.txt
cp -i notes.txt notes-copy.txt
ls -l

Do not type the $ shown in illustrative prompts elsewhere. This exercise contains no prompt characters. To inspect the file afterwards, stay in the same terminal and directory.

YOUR COMMAND REFERENCE

Find a command.
Understand its effect.

Examples assume a typical Debian environment. Some commands need packages that are not installed by default. “Inspect” describes the main action, not whether its output is safe to share.

47 commands

NavigationInspect
pwd

Show the current working directory.

NavigationInspect
ls -lah

List entries, including hidden names, with sizes and permissions.

NavigationShell
cd ~

Return to your home directory.

NavigationShell
cd ..

Move to the parent directory.

NavigationInspect
whoami

Print the current effective username.

NavigationInspect
id

Show your user and group identities.

FilesChanges files
mkdir project

Create a project directory in the current directory.

FilesChanges files
touch notes.txt

Create an empty file, or update timestamps if it exists.

FilesChanges files
cp -i notes.txt notes-copy.txt

Copy a file; ask before overwriting an existing destination.

FilesChanges files
mv -i notes-copy.txt draft.txt

Rename or move a file; ask before overwriting.

FilesRemoves a file
rm -i draft.txt

Ask before removing this practice file. Confirm only if it is the intended file.

FilesInspect
find . -name "*.txt"

Find names ending in .txt below the current directory.

TextInspect
cat notes.txt

Print a short text file.

TextInspect
less notes.txt

Read a file a screen at a time; press q to leave.

TextInspect
head -n 5 notes.txt

Print the first five lines.

TextInspect
tail -n 5 notes.txt

Print the last five lines.

TextInspect
grep -n "Linux" notes.txt

Find lines containing Linux and show their line numbers.

TextInspect
wc -l notes.txt

Count newline characters in a file.

TextInspect
grep "Linux" notes.txt | wc -l

Count matching lines by connecting two tools.

TextChanges files
nano notes.txt

Edit a text file with nano, if installed.

PermissionsInspect
ls -l notes.txt

Inspect ownership and permission bits for one file.

PermissionsChanges files
chmod u+x hello.sh

Add execute permission for the owner of an existing script.

SystemInspect
uname -r

Show the running kernel release, not the distribution release.

SystemInspect
cat /etc/os-release

Read distribution identification information.

SystemInspect
df -h

Show filesystem capacity and available space.

SystemInspect
du -sh .

Summarize disk usage below the current directory.

SystemInspect
free -h

Show memory and swap information; available is often more useful than free alone.

SystemInspect
ps -u "$USER" -o pid,comm

Show processes associated with your user identity.

SystemInspect
top

Watch process activity; press q to leave.

SystemInspect
systemctl --failed

List failed units on a systemd system.

SystemInspect
journalctl -b -p warning

Show warning-or-higher entries from this boot, subject to permissions.

PackagesInspect
apt search editor

Search configured package metadata for editor-related packages.

PackagesInspect
apt show nano

Inspect metadata for the nano package.

PackagesInspect
apt list --upgradable

List upgrade candidates using the current local metadata.

PackagesChanges system
sudo apt update

Refresh repository metadata; requires configured administrative access.

PackagesChanges system
sudo apt upgrade

Review and apply the proposed package upgrade plan.

PackagesChanges system
sudo apt install nano

Review and install nano and any dependencies from configured repositories.

NetworkInspect
ip address show

Inspect network interfaces and addresses.

NetworkInspect
ip route show

Inspect the routing table.

NetworkInspect
ss -tuln

List listening TCP and UDP sockets numerically.

NetworkNetwork request
curl -I https://www.debian.org

Request HTTP response headers from the Debian website, if curl is installed.

NetworkNetwork request
ssh user@server.example

Connect to an SSH server: replace the example user and host; verify its fingerprint.

ArchivesChanges files
tar -czf notes.tar.gz notes.txt

Create a gzip-compressed archive containing a practice file.

ArchivesInspect
tar -tzf notes.tar.gz

List archive contents before deciding where to extract.

HelpInspect
man ls

Open the local manual for ls; press q to leave.

HelpInspect
ls --help

Read a command’s built-in usage information.

HelpInspect
type cd

Check how the shell resolves a command; cd is usually a built-in.

01

What Linux actually is

Linux is a kernel: the privileged part of a system that coordinates processes, memory, devices, filesystems and networking. A usable operating system also needs libraries, utilities, service management, applications and a way to install and update software. A distribution assembles those components into a maintained system.

Debian GNU/Linux combines the Linux kernel with GNU tools and many other projects. A terminal is an application that gives you access to a shell, such as Bash. The shell interprets commands and starts programs; those programs use libraries and system calls to request kernel services. A graphical desktop is another way to interact with the same system, not a requirement for Linux to work.

Read more: Kernel documentation · Debian introduction

02

Why use it—and when to check compatibility

Linux can be useful for development, servers, automation, scientific work and everyday computing. Package repositories, scriptable tools and inspectable configuration make it possible to build repeatable workflows. You can run a desktop, a remote server or a small command-line environment depending on the task.

Choose a system around your actual applications and hardware. Some commercial applications, games, peripherals or management tools need a compatibility check or another operating system. Linux is not automatically secure and does not remove the need for updates, backups and access control. Try a virtual machine first if you want to learn without replacing your current installation.

03

A practical first session

Use a maintained Debian installation or a virtual machine from an official image. Open a terminal and try pwd, whoami and ls before changing anything. A prompt ending in $ commonly indicates an ordinary user; # commonly indicates root, but prompts are configurable. You do not type the prompt itself.

Create the temporary practice directory below and work inside it. Commands are case-sensitive. A space separates arguments; quotes keep a filename containing spaces together. Tab often completes names, Up recalls previous commands, Ctrl+C interrupts a foreground command, and q exits many pagers. Use exit to leave a shell. Closing a terminal can end the programs attached to it.

Read more: Debian Reference: GNU/Linux tutorials · GNU Bash reference manual

04

Files, paths and the directory tree

An absolute path begins with /; a relative path starts from your current directory. Your home directory is commonly /home/yourname, and ~ is a shell shortcut to your own home. The path . means the current directory, while .. means its parent. A leading dot makes a name hidden from a default ls listing, not secret or encrypted.

Typical locations include /etc for system configuration, /var for changing service data and logs, /tmp for temporary files, and /usr for much installed software. Mount points attach other filesystems to this single tree. Symbolic links are references to other paths. A filename extension is a convention: Linux does not require .txt for text or .sh for an executable script.

Read more: Filesystem Hierarchy Standard · GNU Coreutils manual

05

Users, permissions and sudo

Files have an owner and a group, with read, write and execute permissions for the owner, group and others. On a directory, execute allows traversal, while write generally controls adding or removing entries; the directory’s permissions matter when deleting a file. Use ls -l and id to inspect the situation before changing it.

sudo runs an authorized command as another user, normally root. It is available only when installed and configured for your account; Debian installation choices differ. Use administrative privileges for a specific task rather than operating all day as root. Avoid blanket fixes such as chmod -R 777: understand which user needs which access and grant only that access. Executable permission is not evidence that a script is trustworthy.

Read more: GNU Coreutils manual · sudo manual

06

Make small tools work together

A program can write normal output to standard output and diagnostics to standard error. A pipe, |, passes standard output to another command. For example, grep can select lines and wc can count them. Read the output of each command separately before connecting a longer pipeline.

The operator > writes output to a file and normally replaces its previous content; >> appends. Quote paths and variables, especially when they may contain spaces. A command’s exit status reports success or failure according to that program’s convention; zero usually means success. In Bash, an ordinary pipeline normally reports the last command’s status unless options such as pipefail change that behaviour.

Read more: GNU Bash reference manual

07

Debian: a distribution and a community

Debian is a community-developed operating system distribution with a public Social Contract and Free Software Guidelines. Its main archive follows those guidelines. Additional archive components—contrib, non-free and non-free-firmware—have different inclusion criteria; firmware is relevant to some hardware, so check the official installation guidance rather than assuming every machine needs the same components.

Debian offers stable, testing and unstable branches. Stable prioritizes a maintained release with security and other selected updates; it does not promise the newest upstream version of every application. Do not casually mix branches to obtain a newer package. Check the official release page for the currently supported release and follow its release notes for a major upgrade.

APT resolves dependencies and retrieves packages from configured repositories. dpkg handles installed Debian packages at a lower level. Prefer the official repositories for a first system, inspect what APT proposes, and understand the source of any third-party repository. A signed repository helps authenticate package metadata; it does not make every program or repository suitable for your needs.

Read more: Debian introduction · Debian Social Contract and Free Software Guidelines · Debian release information · APT manual · Debian installation guide: firmware

08

Install and update software with APT

sudo apt update refreshes repository metadata; it does not install the available upgrades. apt list --upgradable shows candidates. sudo apt upgrade applies an upgrade plan that you should review before confirming. sudo apt install nano installs a named package and required dependencies, if available in your configured repositories.

apt full-upgrade may remove packages to resolve an upgrade, so it is not interchangeable with an unexamined routine upgrade. A major Debian release upgrade is a separate procedure described in the release notes. Avoid pasting installation scripts into a root shell without reading and understanding them. You can inspect a package’s licensing information in /usr/share/doc/PACKAGE/copyright, replacing PACKAGE with its actual name.

Read more: APT manual · Debian Policy: copyright information · Debian release information

09

Processes, services and troubleshooting

Every running program has a process identity. ps gives a snapshot, while top provides a changing view of activity. A service is usually a background process managed by the system’s service manager. On a Debian system using systemd, systemctl can inspect units and journalctl can read the journal; a container or another installation may not run systemd as its init system.

Troubleshoot one observation at a time: read the exact error, check the current path and user, inspect disk space and permissions, then examine the relevant service and logs. Save changes to configuration deliberately and keep a way to restore them. Before terminating a process, identify its PID and purpose; a graceful termination request is usually the first step, and it may still interrupt active work.

Read more: systemctl manual · journalctl manual

10

Habits that make a system easier to maintain

Keep supported software updated, use a normal account for daily work and maintain backups that you have actually tested restoring. Install only the services you need. Before changing remote access or firewall rules, make sure you have a recovery path so that a mistake does not lock you out.

Keep credentials out of command examples, repositories and shared screenshots. Review unfamiliar commands, particularly deletion, redirection and privilege changes. rm does not generally send files to a desktop trash folder. Read-only inspection commands are good starting points, but their output can still contain private information. Choose changes you understand and check the result afterwards.

11

Software licenses: permissions with conditions

A software license describes permissions and conditions for using, modifying or sharing a work. Free software refers to freedoms, not just price. Open-source software can be sold and used commercially. A proprietary program may be available at no cost without giving you permission to inspect, modify or redistribute its code. Source-available does not automatically mean open source.

Permissive licenses and copyleft licenses offer different redistribution conditions. The specific version, exceptions, files involved and way you combine or distribute software matter. Linux is not one license for every installed program: the kernel is GPL-2.0-only with its documented system-call exception, while other packages have their own licenses. Simply running an ordinary application on Linux does not require making that application GPL.

The table is an introductory comparison, not a complete compliance determination. Read the actual license and preserve the relevant notices. Before distributing a product, review its dependencies and how they are linked or packaged. Keep an inventory with exact license identifiers rather than recording only “open source”. Documents, photographs and fonts may use licenses different from the software around them.

Read more: Kernel licensing rules · Open Source Definition · GNU licenses: frequently asked questions · SPDX license list

A beginner’s orientation to common license families
LicenseFamilyWhat to check
MIT ↗PermissiveAllows broad reuse, including commercial reuse; retain the required copyright and permission notices. No explicit patent license clause.
BSD-3-Clause ↗PermissiveRetain required notices and disclaimers. Its non-endorsement condition restricts using contributor names to promote derived products.
Apache-2.0 ↗PermissiveIncludes an express contributor patent grant with conditions. Redistribution has license, change-notice and applicable NOTICE requirements.
GPL-2.0 / GPL-3.0 ↗CopyleftDistribution of covered works can require corresponding source and continued license freedoms. Exact version, combination and distribution method matter.
LGPL ↗Library-oriented copyleftAllows some combinations with non-LGPL applications under specified conditions; modification, linking, replacement and relinking requirements depend on version and use.
MPL-2.0 ↗File-level copyleftDistributed covered source files, including modifications, remain available under MPL terms; other files in a larger work can have different licenses.
AGPL-3.0 ↗Copyleft with a network conditionFor a modified covered program supporting remote interaction, the license includes an offer of corresponding source to those remote users. Review section 13.
Proprietary / custom ↗Terms varyPermissions come from the particular agreement. Being free of charge, downloadable or readable online does not itself make code open source.
12

What to learn next

Build a small routine: navigate to a directory, inspect a text file, search it, create a copy and explain every command you used. Then write a short script, learn version control and practise restoring a backup. Use your distribution’s manuals when a command behaves differently from a tutorial.

For server work, continue with networking, service management, SSH keys, monitoring and backup recovery. For development, add a language environment and isolated project dependencies. Learn the underlying system before relying on automation to hide it. A useful question is not just “does this command work?” but “what changed, why, and how would I undo it?”

MAKE IT REPEATABLE

Your first shell script.

Inside your practice directory, open nano hello.sh and save the following text. In nano, Ctrl+O writes the file, Enter confirms the name, and Ctrl+X exits. Then use chmod u+x hello.sh and ./hello.sh to run your own script.

hello.sh · a small POSIX shell script
#!/bin/sh
set -eu
printf '%s\n' 'Hello from a shell script'
pwd

#!/bin/sh requests a POSIX shell. set -eu enables error-related options, but does not replace checking assumptions or understanding the shell’s exceptions. ./ explicitly selects a program in the current directory.

GO TO THE SOURCE

Official documentation.

This guide uses original explanations and examples. Follow the manuals for your installed versions and the exact license text when it matters.

  1. Kernel documentation ↗
  2. Debian introduction ↗
  3. Debian Reference: GNU/Linux tutorials ↗
  4. GNU Bash reference manual ↗
  5. GNU Coreutils manual ↗
  6. Filesystem Hierarchy Standard ↗
  7. sudo manual ↗
  8. Debian Social Contract and Free Software Guidelines ↗
  9. Debian release information ↗
  10. APT manual ↗
  11. Debian installation guide: firmware ↗
  12. systemctl manual ↗
  13. journalctl manual ↗
  14. Kernel licensing rules ↗
  15. Open Source Definition ↗
  16. GNU licenses: frequently asked questions ↗
  17. SPDX license list ↗
  18. Get Debian from the project ↗
FOLLOW AN IDEA

One idea leads to another.

Explore concepts, discover connections and keep reading.

All topics ↗

20 related concepts + 10 randomly selected business topics to discover new ideas.