Linux Kernel Labs
Linux Kernel Labs
Practical Labs
https://bootlin.com
Training setup
Download fles and directories used in practical labs
Lab data are now available in an linux-kernel-labs directory in your home directory. This
directory contains directories and les used in the various practical labs. It will also be used as
working space, in particular to keep generated les separate when needed.
More guidelines
Can be useul throughout any o the labs
• Read instructions and tips careully. Lots o people make mistakes or waste time because
they missed an explanation or a guideline.
1 This tool rom Microsot is Open Source! To try it on Ubuntu: sudo snap install code --classic
• Always read error messages careully, in particular the rst one which is issued. Some
people stumble on very simple errors just because they specied a wrong le path and
didn’t pay enough attention to the corresponding error message.
• Never stay stuck with a strange problem more than 5 minutes. Show your problem to
your colleagues or to the instructor.
• You should only use the root user or operations that require super-user privileges, such
as: mounting a le system, loading a kernel module, changing le ownership, conguring
the network. Most regular tasks (such as downloading, extracting sources, compiling...)
can be done as a regular user.
• I you ran commands rom a root shell by mistake, your regular user may no longer be
able to handle the corresponding generated les. In this case, use the chown -R command
to give the new les back to your regular user.
Example: $ sudo chown -R myuser.myuser linux/
Setup
Create the $HOME/linux-kernel-labs/src directory.
Git confguration
Ater installing git on a new machine, the rst thing to do is to let git know about your name
and e-mail address:
git config --global user.name 'My Name'
git config --global user.email me@mydomain.net
Such inormation will be stored in commits. It is important to congure it properly when the
time comes to generate and send patches, in particular.
It can also be particularly useul to display line numbers when using the git grep command.
This can be enabled by deault with the ollowing conguration:
git config --global grep.lineNumber true