Unix and Linux for Students: A Practical Introduction
Learn how to use a Debian command line, navigate files, understand basic permissions, check user and group information, and inspect running processes. The examples use a safe practice folder and explain which details may differ on other systems.

Begin at the command line
A command line is a text interface to a computer. You type a request and the shell interprets it; a terminal application is commonly the window where you interact with that shell. This guide uses Debian GNU/Linux for its examples. You need a Debian system with a terminal and an ordinary user account; administrator access is not needed for the practice tasks. Commands and defaults can vary between distributions, so check your course instructions before applying an example elsewhere.
Start in a practice folder in your home directory, where you can create and remove your own test files without touching system data. Enter each command separately and read it before pressing Enter:
mkdir -p "$HOME/unix-practice"creates the folder if it does not already exist.cd "$HOME/unix-practice"moves into it;pwdprints your current location.printf '%s\n' 'First note' > notes.txtwrites a line to a file. The>operator replaces that file’s contents if it already exists.cat notes.txtdisplays the contents;cp notes.txt copy.txtmakes a copy.mv copy.txt archive.txtrenames the copy;ls -llists files with details.rm archive.txtremoves the practice copy. Check the filename and location first: removal may not be recoverable through the command line.

How Unix, GNU, and Linux took shape
Unix began at Bell Labs in 1969, when Ken Thompson, Dennis Ritchie, and colleagues started work on a PDP-7. A pivotal design change was rewriting the Fourth Edition in C: the Open Group’s timeline notes that this made Unix portable. Portability helped the system travel beyond one machine and encouraged related systems and tools to develop.
In 1975, the Sixth Edition became the first Unix version widely available outside Bell Labs, and the first BSD version was derived from it. The spread of different systems made common interfaces increasingly valuable. POSIX.1 was published in 1987, providing a standard reference for operating-system interfaces; compatibility with such conventions helps programs and user habits carry across systems.
Richard Stallman’s GNU announcement, dated September 27, 1983, proposed a complete Unix-compatible software system—not just a kernel. Its initial plan included a kernel, shell, compiler, editor, and other utilities. Stallman argued that Unix compatibility could help independently written tools work together, while also making clear GNU need not copy Unix exactly. In 1991, Linus Torvalds began Linux development. The Linux kernel documentation describes Linux as written from scratch and aiming toward POSIX and Single UNIX Specification compliance.
- 1969: Unix work begins at Bell Labs on a PDP-7.
- 1975: Sixth Edition Unix becomes widely available outside Bell Labs; the first BSD version derives from it.
- September 27, 1983: Stallman announces the planned GNU system.
- 1987: POSIX.1 is published.
- 1991: Linus Torvalds commences Linux development.
What this history means at today’s terminal
Portability and compatibility are practical reasons many terminal habits remain familiar across Unix-like systems. A shell can run small utilities, pass their output between commands, and use conventions such as paths, permissions, and process listings. Shared standards and compatible interfaces make those habits more transferable, but they do not guarantee that every command or option behaves identically on every system.
Linux is the kernel: it manages hardware and core system resources. A Linux distribution combines that kernel with user-space software—often including GNU tools, a shell, system libraries, installers, and other applications—to make a usable operating system. GNU is a software project whose tools are used in many distributions; it is not another name for the Linux kernel. The exact selection and versions of tools depend on the distribution.
Differences can appear even in familiar commands. On Linux, ps accepts Unix-style options such as -e, BSD-style options such as ax, and GNU long options such as --help; mixed conventions can have different effects. GNU Coreutils’ chmod is a user-space utility for changing file access permissions. If an option fails or output differs, check the command’s local manual page and your distribution’s documentation before assuming the system is broken.
- Think of Linux as the kernel and a distribution as the assembled system around it.
- Check local command documentation when options or defaults differ; compatibility does not mean identical behavior.

Users, groups, and account records
A user account gives processes an identity on the system. Groups collect users so they can share access to files through permissions or, in some configurations, access to particular programs. A user may belong to several groups, with one designated as the main group. On Debian, a file a user creates belongs by default to that user and their main group; actual access still depends on the file’s permissions and system configuration.
On Debian, user records are usually stored in /etc/passwd, and hashed passwords are stored in /etc/shadow. These are structured text files with colon-separated fields. A user entry includes a user identifier (UID), the identifier for the main group (GID), a home-directory path, and the program run at login, usually a shell. The $HOME environment variable generally points to the user’s home directory. Regular users cannot read /etc/shadow. These locations describe the usual Debian arrangement, not an assumption that every Linux system obtains account data from the same local files.
Use commands to inspect accounts rather than editing those files as a beginner. id reports your user identifier, main group, and group memberships. For example, run id to check the identity of your current session. getent passwd sam looks up the account named sam in the configured user database; replace sam with a real account name. Unlike simply reading /etc/passwd, getent uses the system’s configured Name Service Switch (NSS) mechanism, which may obtain records from other sources.
For routine account settings, use the appropriate supported command and only change settings you are authorised to manage. A regular user can use passwd to change their password. The chsh command changes a login shell, but ordinary choices are limited to shells listed in /etc/shells; a shell is the program specified to run at login. Do not edit account files directly. If an administrator must do so, the Debian handbook advises making a backup first and describes vipw and vigr as locking the relevant file while it is edited.
- Use
idto inspect your current user and groups; usegetentfor a configured system-database lookup. - Treat Debian account-file locations as Debian guidance, not a universal rule for every Linux installation.
- Do not attempt account administration on a shared or managed system without permission.
Read and change basic file permissions
The basic permission model divides access into three classes: the file’s owner, members of its group, and everyone else. For each class, the familiar letters are r for read, w for write, and x for execute. On a regular file, these usually mean reading its contents, changing it, and running it as a program. On a directory, x is needed to search or pass through it; directory access also depends on the relevant read and write permissions.
Run ls -l notes.txt in the practice directory to see a long listing. A mode displayed as -rw-r----- means the owner has read and write permission, the group has read permission, and others have none. The first character indicates the item type; the remaining permission characters are grouped in threes for owner, group, and others. This is a useful first model, but additional system features can affect access, so a permission string is not always the whole explanation.
The numeric form uses values 4 for read, 2 for write, and 1 for execute; add the values for each class. Thus 640 means owner read and write (6), group read (4), and no permissions for others (0). In the practice folder, chmod 640 notes.txt sets that mode on the named file. The GNU Coreutils documentation gives chmod 644 foo as an example of a world-readable, user-writable file. Our separate 640 example removes access for others; it is not world-readable. Choose permissions for the actual purpose of the file and avoid exposing sensitive content.
Symbolic modes can be easier to read. For example, chmod u+x script.sh adds execute permission for the file’s owner without replacing the other permission bits. chmod can change a file’s mode only when the process owns it or has appropriate privileges. Avoid experimenting with recursive changes such as chmod -R on broad paths: they affect a directory and its contents and can cause unintended access or security problems.
- Inspect the target with
ls -land confirm the path before changing permissions. - Use the least access needed; do not make private files readable by everyone as a troubleshooting shortcut.
- Change only practice files you own unless an administrator has authorised the task.
Inspect running processes
A process is a running instance of a program. Each process has a process identifier (PID), which lets you distinguish it from other processes. The ps command displays a snapshot of selected active processes; it does not continuously update. On the Linux ps described in the manual, the default selection is limited to processes associated with the current terminal and effective user. That is why a default ps may not show every process on the machine.
Try ps to inspect the default selection, then ps -e to select every process on the system. ps -ef requests a full-format listing. Output columns commonly include a PID and command; with ps -ef, you can also inspect the parent process ID (PPID). For a narrower view, ps -o pid,ppid,stat,comm -p 1234 requests those columns for PID 1234; replace the example number with a PID you have actually seen. If you need repeated updates while observing activity, use top rather than expecting ps to refresh itself.
The STAT field gives a short process-state code. Common examples include R for running or runnable, S for interruptible sleep while waiting for an event, and Z for a terminated process not yet reaped by its parent. A process in S is not necessarily broken, and a Z entry is not a normal active program that can be fixed by simply rerunning it. Interpret the state together with the command, PID, and context.
Inspection is safer than intervention. A process name can be unfamiliar because it belongs to the operating system or another application, and a PID can identify a different process later after the original exits. Do not stop a process just because it looks unfamiliar. First confirm what it is, which account owns it, and whether it is part of your own exercise. On shared or managed systems, ask the administrator or instructor before taking action.
- Use
ps -eto list all processes andtopfor a repeatedly refreshed view. - Read the PID and command together; do not assume a process name alone explains its purpose.
- Do not attempt to stop another user’s or system process without authorisation.
Frequently asked questions
Are Unix and Linux the same thing?
No. The Linux kernel documentation describes Linux as a Unix clone and says it aims toward POSIX and Single UNIX Specification compliance. That explains a relationship, not interchangeable names.
Why might getent passwd show an account that is not in /etc/passwd?
On Debian, getent queries the configured system database through NSS. The system may use a source other than the local /etc/passwd file, depending on its configuration.
What should I check before changing a file’s permissions?
Confirm the path and owner, inspect the current mode with ls -l, and decide which users need which access. Change only a file you own or are authorised to manage, and avoid broad recursive changes.
Does ps show every process by default?
Not in the Linux ps described here. Its default selection is limited to processes associated with the current terminal and effective user. Use ps -e to select every process on the system.
Sources and further reading 10
- Introducción y conceptos básicos de Unix Instituto de Astrofísica de Canarias
- Introducción a Unix Repositorio Institucional CEU
- Lecciones de Linux: búsqueda de archivos Universidad de Granada
- 8.4. User and Group Databases Debian Administrator's Handbook
- The Linux command line for beginners Ubuntu
- Linux kernel release 6.x README Linux kernel documentation
- chmod invocation GNU Coreutils
- ps(1) Linux manual page man7.org
- The Single UNIX Specification History & Timeline The Open Group
- GNU initial announcement GNU Project / Free Software Foundation