pwdShow the current working directory.
YOUR FIRST STEPS · ENGLISH GUIDE
Understand your system, learn the commands and build confidence—one small, deliberate step at a time.
Linux fundamentals · Debian · Shell skills · Software freedom
$ pwd
/home/you# Ask a question$ whoami
you# Find the manual$ man ls
Read. Understand. Run. Check.
THE BIG PICTURE
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
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.
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 -lDo 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
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
pwdShow the current working directory.
ls -lahList entries, including hidden names, with sizes and permissions.
cd ~Return to your home directory.
cd ..Move to the parent directory.
whoamiPrint the current effective username.
idShow your user and group identities.
mkdir projectCreate a project directory in the current directory.
touch notes.txtCreate an empty file, or update timestamps if it exists.
cp -i notes.txt notes-copy.txtCopy a file; ask before overwriting an existing destination.
mv -i notes-copy.txt draft.txtRename or move a file; ask before overwriting.
rm -i draft.txtAsk before removing this practice file. Confirm only if it is the intended file.
find . -name "*.txt"Find names ending in .txt below the current directory.
cat notes.txtPrint a short text file.
less notes.txtRead a file a screen at a time; press q to leave.
head -n 5 notes.txtPrint the first five lines.
tail -n 5 notes.txtPrint the last five lines.
grep -n "Linux" notes.txtFind lines containing Linux and show their line numbers.
wc -l notes.txtCount newline characters in a file.
grep "Linux" notes.txt | wc -lCount matching lines by connecting two tools.
nano notes.txtEdit a text file with nano, if installed.
ls -l notes.txtInspect ownership and permission bits for one file.
chmod u+x hello.shAdd execute permission for the owner of an existing script.
uname -rShow the running kernel release, not the distribution release.
cat /etc/os-releaseRead distribution identification information.
df -hShow filesystem capacity and available space.
du -sh .Summarize disk usage below the current directory.
free -hShow memory and swap information; available is often more useful than free alone.
ps -u "$USER" -o pid,commShow processes associated with your user identity.
topWatch process activity; press q to leave.
systemctl --failedList failed units on a systemd system.
journalctl -b -p warningShow warning-or-higher entries from this boot, subject to permissions.
apt search editorSearch configured package metadata for editor-related packages.
apt show nanoInspect metadata for the nano package.
apt list --upgradableList upgrade candidates using the current local metadata.
sudo apt updateRefresh repository metadata; requires configured administrative access.
sudo apt upgradeReview and apply the proposed package upgrade plan.
sudo apt install nanoReview and install nano and any dependencies from configured repositories.
ip address showInspect network interfaces and addresses.
ip route showInspect the routing table.
ss -tulnList listening TCP and UDP sockets numerically.
curl -I https://www.debian.orgRequest HTTP response headers from the Debian website, if curl is installed.
ssh user@server.exampleConnect to an SSH server: replace the example user and host; verify its fingerprint.
tar -czf notes.tar.gz notes.txtCreate a gzip-compressed archive containing a practice file.
tar -tzf notes.tar.gzList archive contents before deciding where to extract.
man lsOpen the local manual for ls; press q to leave.
ls --helpRead a command’s built-in usage information.
type cdCheck how the shell resolves a command; cd is usually a built-in.
No matching commands. Try another word or choose All.
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
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.
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
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
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
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
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
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
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
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.
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
| License | Family | What to check |
|---|---|---|
| MIT ↗ | Permissive | Allows broad reuse, including commercial reuse; retain the required copyright and permission notices. No explicit patent license clause. |
| BSD-3-Clause ↗ | Permissive | Retain required notices and disclaimers. Its non-endorsement condition restricts using contributor names to promote derived products. |
| Apache-2.0 ↗ | Permissive | Includes an express contributor patent grant with conditions. Redistribution has license, change-notice and applicable NOTICE requirements. |
| GPL-2.0 / GPL-3.0 ↗ | Copyleft | Distribution of covered works can require corresponding source and continued license freedoms. Exact version, combination and distribution method matter. |
| LGPL ↗ | Library-oriented copyleft | Allows 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 copyleft | Distributed 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 condition | For 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 vary | Permissions come from the particular agreement. Being free of charge, downloadable or readable online does not itself make code open source. |
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
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.
#!/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
This guide uses original explanations and examples. Follow the manuals for your installed versions and the exact license text when it matters.