Hello fellow Linux Lemmings!
I’ve been tasked with putting together a 20 hour class for “Introduction to Linux” and I’d like to solicit your opinions for topics that should be covered.
The class is targeted for at least minimally technical people - maybe developers, or future developers, but regardless of background they’ve never seen or worked with Linux before.
I plan to do a VERY short overview of installing Linux (to a VM - so they have a “real” environment to learn with) and the GUI but the primary focus will be CLI. Imagine tools and tasks you come across while working on a “real” server (or VM).
A high level overview of the topics I currently have allocated is :
- Super brief history of Linux
- Benefits and use cases of Linux
- General overview of the file system and the purposes of the pre-defined directories (
/dev, /proc, /etc, /home, /bin
, etc) - “Everything is a file”
- File extensions don’t matter (windows users : )
- Note on responsibility - you can delete “in use” files. It will do exactly what you tell it with sometimes minimal guardrails.
- Everything from here down is CLI only!
- What is a terminal/CLI and how do we use it?
- How do we navigate the file system using the CLI
- How to list, create, copy, move, delete, and read files/directories
- EDIT: Basic file editing with
nano
- How to search for files (
find
… maybelocate
) - Archives and compression (
tar, gzip, bzip2
) - Overview of permissions (read/write/execute, owner, group,
chmod
,chown
) - Brief overview of different shells (
bash, zsh
, etc) - How to get help on the CLI (
man, info, --help
) - Tab completion,
history
- Shortcuts / control codes (
ctrl+c, ctrl+d, ctrl+a, ctrl+e
, and coverage ofctrl+z
later) grep
- Checking processes (
top, ps, kill
) - Signals (
sigterm, sigkill
, etc - related to kill above) - Backgrounding and multitasking (
ctrl+z, fg, bg, jobs, nohup, &
) - Linking (
ln
) STDIN, STDERR, STDOUT
and redirection- Redirection (
>, >>, <
) - Command pipes (
|
) - How to access a remote machine via SSH with UN/PW
- How to access a remote machine via SSH with key auth (think cloud VMs like EC2)
- Administrative commands and tasks (
su
,sudo
, how it works, when to use it) - Add users and groups
- How to change your
passwd
(maybe how to change your default shell too) - Restart, shutdown, halt
- How to install/remove software (package managers, packages, pre-compiled binaries, maybe compilation with
make
if time allows) - Configuring your profile for customizing your environment
- ENV variables and
alias
es - Network information (
ifconfig
) and tools (curl, wget, netcat
, etc)
Everything from here down is “extra” if time allows (AKA - ensuring I don’t run out of material :)
- Encryption (
gpg
- symmetric and asymmetric) - Backups (
rsync
, maybedd
) screen
/tmux
- How to setup key based logins/auth
- EDIT: More advanced CLI text editing with
vim
sysreq
commandssrm
/shred
- Shell scripting basics
init
vssystemd
, how to start/stop/status services.- Maybe how to create a simple service
- Run levels
sed
,awk
basics- File system types, file system checking, formatting… I hesitate to get into partitioning but it’s always an option if I need it.
- Alternatives to well known win/mac utilities and how to find them. EG: GIMP to replace Photoshop.
What do you think?
Did I miss anything that you deem super important?
Anything that I should definitely keep in the “only if I run out of material” category?
O, and if you have any good ideas for practical exercises I’d love to hear those too. I want to keep them <15min but things like “create a new directory, cd into it, touch a file, list the contents of /
and write the output into the file you just created” are perfect.
Thanks!
It’s too much for 20 hours, if it’s introductory. Also, wouldn’t you want to teach them how to actually install Linux?
I would do it completely differently. Do some intro about history and philosophy. Next:
- everything is a file -explain and actually show /proc & /dev with some fun examples (/Dev/urandom /proc/cpuinfo and so on). Not necessarily CLI
- explain the idea behind Unix way of having lots of small tools. Show examples of grep, cat, ps, head, tail…
- explain piping and streams, show ps | grep and so on
- combine it all and show some fun examples (a one liner to change display setup or something
- explain processes, input output streams, pid, kill
- combine and show how do a one liner to find and kill a process
I like to courses to have natural flow where you keep adding stuff and build more and more complex things. A lot of small tidbits are hard to follow.
I like this idea, but I think you should work a bit of history/philosophy into each lesson by explaining why things work the way they do. The students are unlikely to engage with a history of a system they’ve never used before, so starting with that will lose their attention before you’ve even gotten it. Giving them a bit at a time means that they will slowly build a mental model of how *nix works and is built.
For package management i would also give a brief explenation about repositorys.
It’s missing GNU 🐂 project and free 🕊️ software.
Beat to to it
I would consider that ifconfig is deprecated on many distros and would therefore teach about iproute2 (mostly the
ip
andss
commands) instead. Additionally I would consider editing files essential, even if it is with nano.Maybe mention more modern and simpler help tools like tldr, as they could be even more useful to beginners.
To introduce the shell and utilities, I would try to find a somewhat realistic use case that combines multiple aspects, like analyzing some files or spellchecking instead of simply mentioning every feature one by one.
This looks like an amazing class! I would absolutely take it, it looks awesome to me.
I would consider teaching them about a CLI shell, like Fish or ZSH (through oh my zsh), whilst they’re not usually going to have the luxury of a nice shell on a remote server but they will if they’re on a desktop. A good shell makes the CLI soooooo much easier, and faster, to use. Work smarter not harder, install a shell other than bash.
I would also HIGHLY consider teaching them about desktop app software development on Linux, there’s a surprising number of developers who don’t know about the different ways you can distribute software on Linux:
- Native system packages
- Snap packages
- Flatpaks
Teaching them about this is definitely a must imho, there are so many OSS projects out there that insist on distributing their software via native system packages (without supporting most distros). They’re also likely to run into it even if they’re just in IT, the server market uses Snaps quite a bit.
I’ve been using bash forever maybe I should try zsh
I highly recommend it, I’ve been using OMZ for almost a year now, it’s super nice and I have no performance issues.
A few things you need to know:
-
In my experience, my super-customised Zsh is a bit slower
-
It is far more customisable
-
When loading plugins, do NOT use oh-my-zsh or other plugin managers. In most cases, the plugins are just zsh files, so just source the files directly into your .zshrc to have better performance. For me, zsh with oh my zsh is unbearably slow. Without it, zsh is so much faster.
-
Add a zsh history file to save your history. This is especially useful if you want to use something like autosuggestions and autocompletion.
-
Check out my zsh config at https://gitlab.com/theshatterstone/dotfiles for examples of how to do 3 and 4. If you need any help, let me know.
When loading plugins, do NOT use oh-my-zsh or other plugin managers. In most cases, the plugins are just zsh files, so just source the files directly into your .zshrc to have better performance. For me, zsh with oh my zsh is unbearably slow. Without it, zsh is so much faster.
Maybe you used a much older version of oh my ZSH, but at least the latest versions of OMZ I use have no issues with performance at all. It’s a possibility that some of the plugins you’re using just don’t play nice through OMZ in terms of performance. I know there’s been many updates to OMZ as of recent years that have massively improved performance.
For context the slowest device I use is a laptop (granted with a 5800U), on battery it’ll struggle to load pages quickly, but such is the way of a laptop if you want reasonable battery life. Doesn’t help that the web is a mess though :/
-
Why not align the course with a LPI cert?
Maybe the linuxupskillchallenge is a good inspiration?
Yey! I know all of these.
I would put shell scripting basics higher up on the list as part of the introduction to cli, because that’s one of the major benefits over using a gui.
Otherwise it looks really good, maybe sprinkle some vi(m) in there, because it is the defacto default editor outside of Ubuntu and few others.
Also maybe focus more on iptools2 over the legacy commands like ifconfig, netstat etc as they are not available everywhere anymore (use ip or ss instead). It is still very useful to know both though.
Finally you should pay close attention to anti patterns like “sudo su”, “ps aux | grep …”, “cat … | grep …” etc and make sure to teach proper usage of the tools. I have seen it way too often done wrong in beginner guides.
I happened to have put together a class curriculum for something quite similar when I was doing volunteering work at FreeGeek. This was a few years ago, but it should still be good.
Depending on your audience (don’t overestimate your audience!) you might also want to have a look at the material from The Carpentries. The participatory live coding style works really nicely in workshops for minimally technical beginners. Also don’t make the assignments too hard, or give multiple difficulty levels.
You should explain free software and copyleft
I would also consider having some sort of final project. It can be anything from a game server to a desktop widget
Lmao in university we had a Linux Kernel/OS - system calls class (4 months). You want to cover all of that in just 20hrs?