Welcome to the course: Linux command line 101¶
This material
Here you will find the content of the workshop "Command line 101".
- Documentation about Linux at some of the Swedish HPC centres
- NAISS/Arrhenius: Linux commands
- HPC2N: https://docs.hpc2n.umu.se/tutorials/linuxguide/
- UPPMAX: https://docs.uppmax.uu.se/getting_started/linux/
- LUNARC: https://lunarc-documentation.readthedocs.io/en/latest/guides/linux/linux_basics_intro/
- PDC: https://support.pdc.kth.se/doc/support-docs/basics/introduction/#basic-linux-for-new-hpc-users
- Documentation from Software Carpentry: https://swcarpentry.github.io/shell-novice/
Prerequisites
- You need access to a Linux system.
- You will use your own computer or any other computer (including computing access at computing centers) you have access to and that runs Linux.
- The course project will be on Arrhenius, ONLY for those that do not have other access to a computer that runs Linux.
- For those using Arrhenius, there is a Get started guide for Arrhenius here.
Learning outcome
-
This NAISS course aims to give a brief, but comprehensive introduction to the Linux operating system.
-
What is Linux and why should I use it?
- You will learn about
- the command line interface (CLI)
- navigating and modifying the file tree
- ls
- mkdir
- cd
- mv
- editors on the Linux system
- pipes, sorting, filters
- redirection
- pipes
- etc.
- patterns
- scripting
-
some handy hints and tricks
-
This course will consist of lectures and type-alongs, as well as a few exercises where you get to try out what you have just learned.
- This course has been somewhat reworked based on previous participant input. We would be grateful if you will fill the evaluation survey so we can further improve the course: https://forms.cloud.microsoft/e/Bhq1g06R05.
Cluster-specific approaches
The course is given by application experts from several NAISS branches. It is agnostic, but the course project for those who do not have their own Linux access will the NAISS system "Arrhenius". There is a Get started guide for Arrhenius here.
- The login node for Arrhenius is
login.hpc.arrhenius.naiss.sefor regular SSH connections. More info here: Terminal login. - There is also ThinLinc access. Use
tl.hpc.arrhenius.naiss.seas server. More information here: ThinLinc info.
Important info¶
- There is an "important info" page for this course, containing info on the course project. It can be found here: https://nextcloud.naiss.se/s/iffFCJxy2diP9gc
- There is a Q/A page for use during the lectures. Since the lectures are recorded, you may get recorded if you ask questions in the Zoom, but you can always write questions on the Q/A and get answers there. It also has the advantage that you can go back and look at the answers later. The Q/A page can be found here: https://nextcloud.naiss.se/s/2KJXbN2NmESEYKw
Preliminary schedule¶
| Time | Topic | Activity | Teacher |
|---|---|---|---|
| 9:00 | Welcome+Syllabus | Joachim | |
| 9:10 | What is Linux? Why should you use it? |
Lecture | Joachim |
| 9:20 | The command line (CLI) | Lecture+code along | Sahar |
| 9:30 | Navigating the File System | Lecture+code along+exercise | Sahar |
| 10:00 | Modifying the file tree | Lecture+code along+exercise | Sahar |
| 10:25 | BREAK | ||
| 10:40 | Editors | Lecture+code along | Birgitte |
| 10:50 | Piping and filters | Lecture+code along+exercise | Birgitte |
| 11:10 | Finding patterns | Lecture+code along+exercises | Pedro |
| 11:25 | Scripting | Lecture+code along | Pedro |
| 11:40 | Hints and tricks | Lecture+code along | Joachim |
| 11:50 | Summary | Joachim | |
| 12:00 | END of course |
Preparations¶
In order to type along and do the exercises, please prepare your course environment now:
- Login to the system you are using (NAISS system, Arrhenius, your own computer, other system)
- Create a directory to work in (
mkdir intro-linux) and then switch to it (cd intro-linux) - Download the exercises with
wget https://gitlab.naiss.se/hpc/training/linux-command-line-101/-/raw/main/exercises.tar.gz - Check the contents of the file
tar tzvf exercises.tar.gz - Extract the exercises with
tar xzvf exercises.tar.gz - Enter the directory that was created:
cd exercises
Remark: By default the utility wget is not installed on a Mac. You can download from the website: https://gitlab.naiss.se/hpc/training/linux-command-line-101/-/raw/main/exercises.tar.gz and move the file: mv ~/Downloads/exercises.tar.gz . instead of step 3.