Code Monkey home page Code Monkey logo

linuxupskillchallenge's Introduction

Linux Upskill Challenge

An Introduction to Linux Server Administration

Website Lemmy subscribers Subreddit subscribers Discord
GitHub last commit (branch) GitHub Repo stars GitHub watchers GitHub forks GitHub Sponsors
Buy Me A Coffee

This includes all the source material for the 20 lessons of what was previously a commercial online Linux server admin course - now free for you to learn with!

If you spot any typos or "dead links" simply raise an issue.

READ THIS FIRST!

HOW THIS WORKS & FAQ

Table of Contents

  • Day 0 - Creating Your Own Server: how to setup your lab in AWS, Azure, Google Cloud, Digital Ocean and on a local server
  • Day 1 - Get to know your server: Starting with ssh-ing in and some simple commands like: ls, uptime, free, df -h, uname -a. Extensions on doing passwordless login with public keys and and an ssh config file.
  • Day 2 - Basic navigation: Basic navigation, the "man" pages, file hierarchy
  • Day 3 - Power trip!: Working with sudo, uptime, timezones, changing your hostname
  • Day 4 - Installing software, exploring the file structure: Using 'apt' to find and install software. Use of mc to explore the filesystem. Looking at the contents of: /etc/passwd, /etc/ssh/sshd_config and /var/log/auth.log
  • Day 5 - More or less...: Using more, less and navigating in these. Dotfiles, history, tab completion, and using the nano txt editor
  • Day 6 - Editing with "vim": Learning vim, the minimal knowledge, but also via vimtutor
  • Day 7 - The server and its services: Installing Apache2, stopping and starting, altering the content, reading logs
  • Day 8 - The infamous "grep" and other text processors: Hands-on with text tools like grep, cat, more, less, cut, awk and tail - and piping of course. (and a wave to awk and sed)
  • Day 9 - Diving into networking: Looking at open ports with ss, and a nod to netstat, install nmap and test. Install ufw, set up, enable and test etc. Discuss security resonsibilities as the sysadmin.
  • Day 10 - Getting the computer to do your work for you: Covering cron, at, and systemd timers
  • Day 11 - Finding things...: Finding things with: locate, find, grep, which
  • Day 12 - Transferring files: SFTP, the technology, clients, and copying up and down
  • Day 13 - Users and Groups: Using adduser, visudo to setup up a restricted "helper" to manage our host
  • Day 14 - Who has permission?: Permissions, users, groups, (ACLS and SELinux in the Extension)
  • Day 15 - Deeper into repositories...: Repositories in more detail, how to enable "Multiverse", the role of PPAs in Ubuntu, enabling and installing from them
  • Day 16 - Archiving and compressing: Understanding and using tar and gzip
  • Day 17 - Build from the source: Installing from source. Discussion, using wget to get a tarball, tar to extract and then configure, make and install. Discussion of security, maintenance issues.
  • Day 18 - Logs, monitoring and troubleshooting: Log management and rotation, logrotate
  • Day 19 - Inodes, symlinks and other shortcuts: Inodes, hard links symlinks and stat
  • Day 20 - Scripting: Understanding how scripting work in Linux, the shebang, permissions and $PATH. A couple of simple sample scripts based on the filtering of logs we've been doing. Resources to explore further.
  • Day 21 - What's next?: Closing the course with some suggestions.

You are free to use this under the terms of the license, but feel free to donate or contribute to keep the challenge running:

GitHub Sponsors Buy Me A Coffee

linuxupskillchallenge's People

Contributors

alaudet avatar alexwasserman avatar angrycuban13 avatar asher-lab avatar aulonsal avatar azivkovi avatar chrislmartin avatar dannycymru avatar daxsis avatar dwightgunning avatar eagtg avatar eschivo avatar janbue avatar jasonc avatar jikkelsen avatar jstaph avatar juliosegarra avatar kingston802 avatar kraker avatar lanecodes avatar livialima avatar matt-kita avatar mpjwarren avatar robinovitch61 avatar rufflabs avatar sientelo avatar snori74 avatar th0mcat avatar thejoycekung avatar westofer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linuxupskillchallenge's Issues

Day 16 - feature request [always use -f as last argument with tar while creating archive]

Using -f with tar while creating archive is essential. The document uses the following:

tar -cvzf myinits.tgz /etc/init.d/

I accidently used tar -cvfz ssh.tgz /etc/ssh and the the archive file named z

~ # tar -cvfz hello.tgz /etc/ssh/
tar: hello.tgz: Cannot stat: No such file or directory
tar: Removing leading `/' from member names
/etc/ssh/
/etc/ssh/ssh_host_ecdsa_key
tar: Removing leading `/' from hard link targets
/etc/ssh/ssh_host_rsa_key.pub
/etc/ssh/ssh_host_ecdsa_key.pub
/etc/ssh/ssh_import_id
/etc/ssh/sshd_config.d/
/etc/ssh/ssh_host_ed25519_key.pub
/etc/ssh/sshd_config
/etc/ssh/moduli
/etc/ssh/ssh_config
/etc/ssh/ssh_config.d/
/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_ed25519_key
tar: Exiting with failure status due to previous error

~ # file z
z: POSIX tar archive (GNU)

So, I think we can add a NOTE that the -f considers anything after -f as the name of the archive that needs to be created. So, we should always use -f as the last flag while creating an archive.

test issue

Please always specify the day of the lesson (i.e. Day 17, Day 0 AWS) in the title of the issue.

Type of error

  • Typo
  • Dead Link
  • Technical error
  • Command incorrect
  • Other (please describe)

Describe the error
A clear and concise description of what the error is.

Expected behavior
If applicable, add a clear and concise description of what you expected to happen.

Proposed solution/correction
Add a clear and concise description of the correction proposed.

Additional context
Add any other context about the problem here.

"bash" where we don't want it.

The recent big PR that I approved included at least two instances where the previous formatting was replaced with "3backticks bash". Looks fine I. GitHub and new Reddit, but not in oldreddit which quite a few people use.

Day 0 - correction request Ubuntu Server 20.04 still referenced

Type of error

  • Version outdated

Describe the error
Document still recommend Ubuntu Server 20.04, but not the latest LTS 22.04

Proposed solution/correction
Change reference to 20.04 to simply "latest LTS" to avoid correcting the document every time the version upgrades.

Additional context
Pointed out in Reddit by u/Sintobus
https://www.reddit.com/r/linuxupskillchallenge/comments/11jiam0/comment/jb4apul/?utm_source=share&utm_medium=web2x&context=3

Day 1 - correction request

Please always specify the day of the lesson (i.e. Day 17, Day 0 AWS) in the title of the issue.

Type of error

  • Dead Link

Describe the error
Link "using PuTTY for SSH (Windows)" is dead

Expected behavior
Link should not be dead

Proposed solution/correction
Replace link

Day X - correction request

Please always specify the day of the lesson (i.e. Day 17, Day 0 AWS) in the title of the issue.

Type of error

  • Typo

Describe the error
On line 17 in pdf generation shell command, lessons should be docs

Day 6 - Address confusion between vi and vim reported by learners

Describe the feature or topic you'd like see in the lesson

This lesson first has users check if vi is installed on their system. And it usually is by default on most major Linux distributions. But then the rest of the lesson uses vim which isn't always installed (or aliased) by default. This can cause some confusion if new learners are expecting vim commands to work.

Describe alternatives you've considered

Unless we're going to have learners install vim on their systems at the beginning if the lesson we should use vi throughout. My opinion, is because vi is most often installed by default it will almost always be available. And since they are just learning the basic vi modes and motions which also applies to vim, there's not a distinct reason to have them install vim or explicitly use vim.

Counter to this is that vimtutor is referenced later on in the lesson. We could have learners install vim at this point in the lesson, or to reduce overall confusion just have learners install vim at the beginning of the lesson. In either case we then need to have documented support for installing vim on all major Linux distributions which could add maintenance overhead to this lesson since we would then need to maintain our own version of vim installation documentation.

Another option would be to move vim installation and vimtutor to the extension section of the lesson.

Additional context

Copied from user's comment in the Discord server #suggestions channel:

I had some trouble on Day 6, it says to run vi which exists on my Debian 11 VPS . It then says to run vim testfile, but my system doesn't have vim , only vi which seems to run vim. also, further down in the lesson it says vimtutor should always be installed, on my VPS it was not

Day 20 or 21 - feature request

Additionally to the bash scripting it would be nice and probably sensible to also talk about orchestration frameworks like ansible, cloudinit or terraform.

I might be able to write something like this, but I'm unsure about the location it would fit the best.

Day 0 (no credit card) - correction request

Type of error

  • Technical error

Describe the error
IBM VM presenting command discrepancies

Additional context
Reddit comment by semitones:
I could use a little help figuring out how to disable the iptables firewall that comes installed on the IBM Hyper Protect Virtual Server (HPVS): https://cloud.ibm.com/docs/hp-virtual-servers?topic=hp-virtual-servers-protect_vs

EDIT: I've been experiencing some weird discrepancies with IBM, such as the commands "less" "man" etc disappearing, so I can't recommend using it.

Day 20 - minor suggestions

Mod mail from u/linux26

Good tutorial! but a few things:

but in the first line and followed by a "!"
The shebang doesn't just have to be in the first line, it has to be within the first two bytes. https://stackoverflow.com/a/3009280

Also consider using a here document instead of echo on multiple lines. cat << EOF

$() is better than `` since the latter gets really complicated to nest.

Day 3 - update link for multifactor authentication

From reddit post:

BadSmash4
If anyone was having trouble setting up multifactor authentication for SSH with the instructions above like I was, these instructions helped me to nail it down:

https://www.techrepublic.com/article/enable-ssh-2fa-ubuntu-server/

There are some important distinctions between the Ubuntu 16.04 that the listed instructions are based on and the current 22.04 version that you might be using.

It's important to check which version of Linux you might be using! I'm LEARNING!

Nice catch!

Day 2 - correction request (Typo)

Type of error

  • Typo

Describe the error
Under 'Your Tasks Today',
move 'about' the directory -> move 'around' the directory

Proposed solution/correction
'about' updated to 'around'

Day 15 - correction request

Type of error

  • Dead Link/Technical error

Describe the error
The neofetch third party ppa has been deprecated

ubuntu@ip-172-31-24-204:~$ sudo add-apt-repository ppa:dawidd0811/neofetch
Cannot add PPA: 'ppa:~dawidd0811/ubuntu/neofetch'.
The user named '~dawidd0811' has no PPA named 'ubuntu/neofetch'
Please choose from the following available PPAs:

Expected behavior
Day 15 recommends adding this PPA, but it no longer exists.

Proposed solution/correction
Maybe add a new PPA, or just indicate that this one is now deprecated.

Additional context
Thank you! :)

Day 0 - Add Oracle Free Cloud Tier

Please always specify the day of the lesson (i.e. Day 17, Day 0 AWS) in the title of the issue.

Describe the feature or topic you'd like see in the lesson
Oracle Free Tier is very nice offering, and i think it can be a good point to start.

Describe alternatives you've considered
None

Additional context
https://www.oracle.com/cloud/free/

https://linuxupskillchallenge.org won't load

Describe the bug
https version of the site fails to load, http version will

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://linuxupskillchallenge.com'
  2. Click on address bar after it fails to load and remove the S in https
  3. Site will now load

Expected behavior
Going to https link should load

Screenshots
n/a

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chromium Edge
  • Version: 90.0.818.42 64bit

Smartphone (please complete the following information):
n/a

Additional context
n/a

Day 8 - auth.log not available in Ubuntu minimal

More than a couple of complaints about this on Reddit.
Yep, it seems that in the "minimal" image only the systemd journal is available, the file auth.log is missing.
To get it back need to install rsyslog:
sudo apt install rsyslog

Add a note to Day 8, when we first touch auth.log, to cover it.

Day 0 - remodeling

I'm currently remodeling Day 0 to reduce the amount the files but to open space to add more cloud providers like Oracle and Linode.
Also a section for local servers, as it is requested every month.

Build script error (LaTeX): File `pdftexcmds.sty` not found

When running the Build bash script, the following message is output in the terminal, despite the prerequisites (commented within the script) having been met. Perhaps the missing file is a simple one that can be included in this repo?

Error producing PDF.
! LaTeX Error: File `pdftexcmds.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 
         
l.108 \RequirePackage{pdftexcmds}[2009/04/10]

Day 7 - Broken Resource Link

From Discord:

Verenthi: Broken Resource Link
The link https://ubuntu.com/server/docs/web-servers-apache for day 7 https://linuxupskillchallenge.org/07/#resources resources seems to be broken. Is this an issue worth opening a ticket for?
Day 7 - The server and its services - Linux Upskill Challenge

Mateusz Kita: thanks, it's always good to make a correction, in any way applicable
I think it would be also good to mention potential "corrected link", e.g. https://ubuntu.com/server/docs/how-to-install-apache2

How to install Apache2 | Ubuntu

Thanks Verenthi for catching that and thanks Mateusz for the correct link.

Day 6 - Command incomplete

Type of error

  • Command incomplete

Describe the error
myk99 said on Reddit:

Something to update possibly. The directions stated " type /sun to find the first instance, then press n repeatedly to step through all the next occurrences" - I found out after you type in what you are searching for you should hit enter before looking for next. I had /sunnnnn in the search before I figured out what I was doing wrong. Day 6 complete! Loving the course.

Day 3 - correction request

Type of error

  • Command incorrect

Describe the error
On the SSH hardening article the steps for setting up 2FA are incomplete. At least for the default setup of Digital Ocean.
Expected behavior
It should be possible to successfully follow the extension exercices/resources.

Proposed solution/correction
The following article worked for me
https://www.digitalocean.com/community/tutorials/how-to-set-up-multi-factor-authentication-for-ssh-on-ubuntu-16-04
if it also works on the other cloud providers it could be added as further extension.

Additional context
I understand it's an external resource and I'm not sure if this should be fixed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.