class: center, middle # Introduction to Linux ## For CPSC 213 Students <img src="../../slides/intro-to-linux/linux_PNG48.png" width="50%"> --- # What is Linux 🐧 --- # What is Linux 🐧 - Linux is a family of operating systems --- # What is Linux 🐧 - Linux is a family of operating systems - Just like Windows or MacOs! --- # Why should I care ❓ --- # Why should I care ❓ - The majority of servers run Linux! --- class: center, middle # Wait what the heck is a server 😱 --- # The CPSC Department's servers - In CPSC 213, all your assignments will be handed in through the CPSC department's linux servers <img src="../../slides/intro-to-linux/cs-server.jpg" width=80%> --- class: center, middle # Getting started! 😁 --- # What you need to install 🏗 - An `ssh` client - An `SFTP` client --- # Windows ## [`Xmanager`](https://my.cs.ubc.ca/docs/free-terminal-emulation-software-xmanager) --- # Mac ## `ssh` is natively installed 🕺 ## [`CyberDuck`](https://cyberduck.io/) for `SFTP` 🦆 --- class: center, middle # Tarik's recommended setup ⭐️ --- # Visual Studio Code - Install VS code from their [website](https://code.visualstudio.com/) --- # Visual Studio Code - Install VS code from their [website](https://code.visualstudio.com/) - Install the Visual studio [Remote extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) --- # Visual Studio Code - Install VS code from their [website](https://code.visualstudio.com/) - Install the Visual studio [Remote extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) - Setup the Ubc server using the extension. Use the following: ```bash ssh <CWL>@remote.students.cs.ubc.ca ``` --- # Visual Studio Code - Install VS code from their [website](https://code.visualstudio.com/) - Install the Visual studio [Remote extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) - Setup the Ubc server using the extension. Use the following: ```bash ssh <CWL>@remote.students.cs.ubc.ca ``` - Celebrate because you're connected to the server 🔥 --- class: center, middle # Lets have some command line fun! 💃 --- # Common commands ## The `ls` command `ls` lists all the files and directories in your current directory. Example: ```bash tarikesh@valder:~/tarik/code$ ls file.txt folder file2.txt ``` ## The `cd` command `cd` changes your current directory. You can think of this as double clicking a folder! ```bash tarikesh@valdes:~/tarik/code$ cd folder tarikesh@valdes:~/tarik/code/folder$ cd .. tarikesh@valdes:~/tarik/code$ ``` --- # Common commands ## The `pwd` command `pwd` prints you current working directory. Meaning it prints the path from the root of the device to your current directory. ```bash tarikesh@valdes:~/tarik/code$ pwd /home/t/tarikesh/tarik/code ``` ## The `cat` command `cat` prints the contents of a file ```bash tarikesh@valdes:~/tarik/code$ cat file.txt I am what is inside that file! ``` --- class: center, middle # What you need to do for CPSC 213 --- # What you need for CPSC 213 - A folder named `cs-213` in your home directory - A folder named `aX` inside the `cs-213` directory for each assignment. Replacing the `X` with the assignment number (i.e Assignment 1 needs an `a1` folder) ```bash ~ └── cs-213 └── a1 ``` --- # Handin ✔️ In order to hand-in your assignments, you would use the `handin` command as follows: ```bash tarikesh@valdes:~$ handin cs-213 a1 ``` And if you'd like to overwrite a submission ```bash tarikesh@valdes:~$ handin -o cs-213 a1 ``` --- class: center, middle # Hope you have a wonderful term! ### We are looking for any ways to make sure students have the best time possible, so if this is useful to you, let us know! #### Tarik Eshaq - tarikesh@student.ubc.ca