The Linux Upskills Challenge
Course Overview
We begin our journey into Systems and Programming with the Linux Upskill Challenge
This challenge is a great way to take our first steps into Linux. It is a month long commitment that you can follow at your own pace, but if you dedicate 2-3 each day it will take you roughly 21 days to complete the challenge.
For our purposes we will be using the Challenge as a way to learn Linux for the first time and as a way to begin building on our Linux Command Line Skills.
Goals of this Course
- Set up your own Linux Server either on the cloud or locally on your own machine
- Learn to Navigate the Linux File System & learn about the Linux File Hierarchy Structure ( LFHS )
- Cover the basics of the powerful vim text editor
- Set up your own web server with Apache and set up some traffic rules with ufw
- Understand how to filter information with commands like grep, cat, more, less, cute, tail, etc.
- Learn about various file transfer protocols from SMB to SFTP and more
- Grasp the basics of permissions involving users and groups
- Ubuntu Universe vs Multiverse
- Learn about Archiving & Compressing and build from source
- Inodes, symlinks and other shortcuts
- Get a brief introduction to shell scripting
Course Notes
The Linux Upskill Challenge has a lot of great concise and sufficiently detailed explanations for most of the topics they cover. Which makes it pretty hard to make any notes that wouldn't just be a copy & paste.
As a middle ground the following notes are commands and information I found particularly useful.
A quick note for people who are windows users.
Some of you may be using WSL to access your cloud instance. You might experience clock-drift on your device making you unable to access to the AWS CLI. If this happens try running the following command.
sudo hwclock -s
This should serve as a temporary fix to your clock-drift but I would recommend looking online for a more permanent solution.
The ls command and its switches
- ( -l ) : lists directory contents
- ( -a ) : lists hidden files
- ( -t ) : lists by date created
- ( -r ) : lists in reverse order
Some notes on Sudo & Root Best practices
- Don't leave root open
- Be careful of using sudo to open GUI applications, if you have to, use sudo -h
- /etc/shadow : A very important space that stores information about the user passwords on a Linux system
- Hackers can't auto-crack if root is locked down
Commands used to find files
- locate | find | grep | which
Ownership and Permissions in Linux
- ls -ltr is a good way of showing who owns what files and what permissions they have
- chmod
- u = user | g = group | o = others | a = all
- ( + ) = add permission | ( - ) = remove permission | ( = ) = set permission
- r = read | w = write | x = execute
- u = user | g = group | o = others | a = all
- 1 = execute | 2 = write | 4 = read
examples:
- chmod u+w hello.txt | Gives user write permissions to the hello.txt file
- chmod 777 hello.txt | Gives read write and execute permissions to everyone
You can get practice with vim by running vimtutor
Turn a file into a bash script with #!/bin/bash