NUnix · L3 MIAGE · CM1 · 90 minutes
ISTIC · University of Rennes
2026–2027
You can use it all day without opening a terminal.
Android phones
The Linux kernel manages processes, memory and hardware.
Freebox Server Pop
A home internet box. Free publishes its Linux source code.
Linux can run behind a touchscreen or a web interface.
Mobile web use
69.17%
of observed mobile page views come from Android, built on Linux.
Websites
92.1%
use the Unix family, including Linux, among sites whose OS W3Techs identifies.
Supercomputers
500/500
systems in the June 2026 TOP500 list use the Linux family.
$ whoamiWho teaches NUnix, and how is the course organised?
Associate Professor
University of Rennes · ISTIC
IRISA / Inria · Taran
Previously: Inria / INSA Lyon, Emeraude.
PhD: BSC / UPC.

MareNostrum 4 · BSC, Barcelona
NUnix · L3 MIAGE · 2026–2027
| Sessions | Teaching team |
|---|---|
| CM · lectures | Louis Ledoux |
| TD · tutorials | Elisabeth Bouriah and Louis Ledoux |
| TP · practical sessions | Elisabeth Bouriah and Louis Ledoux |
In TD and TP, we practise the lecture topics through exercises, commands and Bash scripts.
Three lectures (CM) of 90 minutes.
| Lecture | Topics | Application |
|---|---|---|
| CM1 · Unix | Files, paths and permissions | Find files and check access |
| CM2 · Commands | Processes, search, pipes and redirections | Count errors in a log |
| CM3 · Bash | Variables, conditions, loops and functions | Write scripts with arguments and loops |
TD and TP: practise commands first, then write scripts.
Which errors occur most often in 1,000 log entries?
Save the counts in output.txt and the report in rapport.pdf.
errors.log · first three lines
Database timeout
Login rejected
Connection refused
output.txt · first three counts
320 Database timeout
210 Login rejected
140 Connection refused
a2ps: text → PostScript
ps2pdf: PostScript → PDF
By the end of this course, you will understand this command.
What happens between typing a command and the machine doing the work?
We use hardware to interact with programs.
The kernel shares resources and controls access.
Our working environment: a Linux system with the Bash shell and command-line tools.
| Name | Meaning |
|---|---|
| Unix | The operating-system family that inspired Linux |
| GNU | The project behind Bash and many command-line tools |
| Linux | The kernel: manages processes, memory and hardware |
GNU = GNU’s Not Unix.
The name contains itself: a recursive acronym.
You already use interfaces to start programs.
| Your action | Interface | Example |
|---|---|---|
| Touch a phone screen | Graphical interface | Open an app from its launcher |
| Click with a mouse | Graphical interface | Open a folder in a file manager |
| Type a command | Text interface | Ask Bash to list a directory |
A smartphone can be a terminal: an endpoint for using a service.
Its touchscreen, like a mouse or keyboard, provides input.

DEC VT100 · IF-3-SYS, G. Salagnac, INSA Lyon
A physical terminal sends keystrokes to a computer and displays its replies.
The programs run on the connected computer.
Good news: yours fits in a window.
| Name | Role |
|---|---|
| Terminal emulator | A window for keyboard input and text output |
| Bash, the shell | Interprets the line and runs commands |
ls, a command |
Lists directory entries |
Type ls → Bash runs ls → the terminal displays its output.
TTY = teletypewriter: early terminals printed on paper.
Unix keeps the name, even for emulated terminals.
ls -l /home/alice
| Part | Role |
|---|---|
ls |
Command: list directory entries |
-l |
Option: change how ls lists them |
/home/alice |
Operand: the directory to list |
Both -l and /home/alice are arguments passed to ls.
| Form | Example | Meaning for GNU ls |
|---|---|---|
| Short: one dash | ls -a |
Include hidden entries |
| Long: two dashes | ls --all |
Same as -a |
| Combined | ls -la |
-l and -a together |
Some options take a value: head -n 5 notes.txt prints five lines.
A bare -- ends options.
ls -- -notes.txt treats -notes.txt as a filename.
Each command defines its options. Check --help or man.
Where is my file, and what can I do with it?
A directory is a folder: it contains names of files and other directories.
/
├── home/
│ └── alice/
│ └── notes.txt
└── etc/
The common root is /. The path /home/alice/notes.txt follows the tree.
Alice's home directory is /home/alice; the university may use a different path.
Linux separates personal files, configuration and application data.
| Directory | Typical contents |
|---|---|
/home/alice |
Alice’s personal files |
/etc |
System configuration |
/var |
Changing data: logs, caches, application state |
/var/lib |
Persistent application state |
/var/log |
Log files |
/var/lib and /var/log are subdirectories of /var.
| Directory | Typical role |
|---|---|
/home, /root |
User homes; the root account’s home |
/usr |
Most distribution-provided tools and libraries |
/usr/local |
Software installed locally by the administrator |
/opt |
Add-on software packages |
/ is the filesystem root.
root is also the administrator account’s name.
| Directory | Purpose / lifetime |
|---|---|
/var |
Changing data, often persistent |
/tmp |
Temporary files; cleanup policy varies |
/run |
Runtime state, cleared at boot |
/dev |
Device interfaces |
/proc, /sys |
Views of processes, kernel and devices |
A path can expose live system information.
It need not refer to ordinary data stored on disk.
/
├── home/ user files
├── mnt/ a temporary mount point
└── media/ removable media mount points
Mounting makes another filesystem visible at a directory.
The device node might be /dev/sdb1; its files appear at the mount point.
| Notation | Meaning |
|---|---|
. |
Current working directory |
.. |
Parent directory |
/ |
Root directory |
~ |
Your home directory, expanded by the shell |
$HOME |
Variable containing your home path |
$PWD |
Variable containing the current directory path |
Current directory: /home/alice
| Path | Interpretation |
|---|---|
/home/alice/notes.txt |
Absolute: start at / |
notes.txt |
Relative: start in the current directory |
./notes.txt |
The same relative path |
../bob/notes.txt |
Go to the parent, then into bob |
A path tells us where to look. Permissions determine whether access is allowed.
| Command | Result |
|---|---|
cat notes.txt |
Print the whole file |
less notes.txt |
Browse interactively, q to quit |
more notes.txt |
Browse a page at a time |
head -n 5 notes.txt |
Print the first five lines |
tail -n 5 notes.txt |
Print the last five lines |
diff old.txt new.txt |
Show differences between two files |
cat prints their contents in argument order.cat reads standard input.- means read standard input here.The third command reads first.txt, then your keyboard input, then second.txt.
We want to read one file named meeting notes.txt.
Quotes keep the filename together. The surrounding " characters are not passed to cat.
Each command passes the same filename: meeting notes.txt.
| Form | What you type |
|---|---|
| Single quotes | cat 'meeting notes.txt' |
| Double quotes | cat "meeting notes.txt" |
| Backslash | cat meeting\ notes.txt |
The surrounding quotes and the backslash protect the space. They are not part of the filename.
The directory contains only a.txt and meeting notes.txt.
The shell finds the matches, then passes two filenames to cat:
a.txt and meeting notes.txt.
| Pattern | Matches |
|---|---|
* |
Zero or more characters |
? |
Exactly one character |
[abc] |
One character from the set |
The space inside a matched filename stays intact.
Same directory: a.txt and meeting notes.txt.
Let the shell find matches
cat receives two filenames:
a.txtmeeting notes.txtIt reads both files.
cat "*.txt" and cat \*.txt also pass a literal *.
HOME stores your home directory, here /home/alice. $HOME asks for its value; echo prints its arguments.
| What you type | What you see |
|---|---|
echo '$HOME' |
$HOME |
echo "$HOME" |
/home/alice |
Single quotes keep $HOME literal. Double quotes allow it to expand. Both protect spaces and filename pattern characters such as *.
With double quotes, we can use the variable and protect the space:
cd .. do?ls option includes hidden entries?cat a.txt b.txt print first?cat '*.txt' try to open?-aa.txt.*.txt. The shell does not expand the star.Why can I read this file, but cannot change or delete it?
-rwxr-xr--
u g o
| Class | Applies to |
|---|---|
u |
The file's owner |
g |
Members of the file's group |
o |
Other users |
a |
All three classes when using chmod |
| Bit | Regular file | Directory |
|---|---|---|
| r | Read contents | List entry names |
| w | Modify contents | Add or remove entries* |
| x | Execute | Search / traverse |
*Changing directory entries also requires search permission. Other restrictions, such as the sticky bit, may apply.
640 for a regular file.run.sh.rw-r-----chmod u+x run.shx# Illustrative server metadata
drwxr----- alice students shared/
-rw-r----- alice students shared/notes.txt
Bob belongs to students. He can list the names, but cannot open notes.txt. Why?
The directory’s group bits lack x: traversal.
If team access is intended, the owner can add g+x.
Examples to revisit during TD or personal practice
| Layer | What it gives us |
|---|---|
| Operating system | Processes, storage and access control |
| Graphical interface | Windows, menus and direct visual interaction |
| Shell | Commands we can combine and save in scripts |
| Application | A task-specific tool, such as Excel or a database |
Your laptop can run Windows while the company’s application runs on Linux. You need to work with both.