4. History
● Unix Kernel - 1970 in Bell Labs
○ Somewhat open source
● Linux Kernel - 1991 by Linus Torvalds
○ Open source
● GNU - GNU’s Not Unix - The actual operating system
○ Open source
5. Why GNU/Linux
● Popular Linux Distributions for servers:
○ Ubuntu
○ Debian
○ CentOS
○ Gentoo
○ RedHat
● Why Linux not Windows or ….
○ Security
○ Modulus
○ Stable
○ Free
○ ...
6. Shell & Bash
● Shell - Part of Unix but available in most Linux distributions
● Bash - A GNU alternative for Shell
7. Terminal
● A command line tool to interact with Bash
● Example:
○ Gnome Terminal
○ Tilix
○ Terminator
○ Windows Command Prompt*
○ Powershell*
● How to open:
○ Linux - Ctrl + Alt + T
○ Mac - Applications → Utilities → Terminal
○ Windows - Open Command Prompt
8. Connect to server
● Linux & Mac:
○ ssh -p 22 admin@xxxx.eng.uwo.ca
○ Here xxxx is the server name allocated for your group (Example: foo for Group 1)
○ When prompt, enter the password given by TAs (Meet TAs in person to get the password)
● Windows:
○ Configure Putty
○ If Putty is unable to connect to the server, disable Antivirus/Firewall and try again
9. What's next?
● Summary of Linux 101 tutorial which is shared on OWL
○ SE 4455B 001 FW17 Resources /Web/00. Linux 101
● Let’s get our hand dirty...
10. Basic Commands
● Check your sudo permission:
○ sudo -l
● Print Hello World!:
○ echo "Hello world!"
● Terminal Shortcuts:
○ ↑ - Visit the last used commands
○ Ctrl + R - Search in bash history
○ Ctrl + L or clear - Clear the terminal screen
○ Ctrl + U - Delete the current line
○ Ctrl + A - Go to the start of current line
○ Ctrl + C - Terminate running program
○ Ctrl + D or exit - Exit from a command line program
○ Ctrl + Shift + C - Copy to clipboard
○ Ctrl + Shift + V - Paste from clipboard
○ Tab - Auto complete
GNU/Linux
commands are
case sensitive
11. Paths and Navigation
● Top most parent directory is root
○ /
● User directory is home:
○ /home/<username>
● Print working directory:
○ pwd
● List files:
○ ls
● Change directory:
○ cd <dir-path>
● Path shortcuts: Home: ~ Current directory: ./ Parent directory: ../
12. Files
● Everything is a file including files, folders, keyboards, monitors
● Extensions makes no difference
○ Linux reads the file and decides on type
○ Use file <file-name> command to check the file
● Create a new empty file
○ touch <file-name>
● Create a new directory
○ mkdir <dir-name>
● Create a directory tree
○ mkdir -p linuxtutorialwork/foo/bar
● Path containing space must be escaped
○ mkdir 'hello world'
○ cd hello world
Better to avoid
spaces when
naming files
13. Files...
● Remove an empty directory
○ rmdir linuxtutorialwork/foo/bar
● Copy files
○ cp <source> <destination>
● Move files
○ mv <source> <destination>
● Write to a file
○ echo 'Hello World!' > hello.txt
● Append to a file
○ echo 'Hello World!' > hello.txt
● Print a file
○ cat hello.txt
● Remove file and directories with files
○ rm
14. Ask for Help
● List available parameters and what they can do with --help
○ ls --help
● Check the manual of a command
○ Man ls
● Search for a keyword in manuals
○ man -k create
● A world without Google is hard to imagine
15. Wildcards
● Any character any number of times: *
○ ls foo*
● Any character exactly once: ?
○ ls f?
● List of characters: [abc] or [a-z]
○ ls [ab]*.txt
NEVER EVER RUN:
sudo rm -rf /*
17. Installing Softwares
● Tons of Linux Distributions are out there
● They may or may not have similar ways to install software
● Let’s install tree
○ Fedora: yum install tree -y
○ Debian: sudo apt install tree
○ Ubuntu: sudo apt install tree
○ Arch: sudo pacman -S tree
● Ubuntu is based on Debian but it has its own softwares
○ Not all applications available for Ubuntu are available for Debian
● When you search for commands, use: how to install … on Debian