Lab 1 Linux Essentials

This first lab was a simple, easy to grasp introduction to Linux. It was not particularly challenging because of my prior experience with the terminal, but it served as useful preparation for the following labs. However, I should have taken more time to sharpen my skills using Stretch and Challenge.

Procedure

During this lab

  1. The lab1resources.zip file was downloaded to my personal computer.
  2. The lab1resources.zip was uploaded to my DCS root directory using scp lab1resources.zip url{u2014020@login-1.dcs.warwick.ac.uk:~/.
  3. A connection to DCS was established using ssh u2014020@login-1.dcs.warwick.ac.uk.
  4. The file was unzipped using unzip lab1resources.zip.
  5. cd lab1resources && ./infotutorial was used to change directories and run the script.
  6. Using nano infotutorial the source of the script was examined.
  7. Using export MANPATH=$(man -w):~/lab1resources/man, the infotutorial man file was set and then confirmed with man infotutorial.
  8. The command mkdir ~/public_html/ was used to create a directory for my personal site.
  9. In ~/public_html/, nano index.html was used to create and edit an HTML file for my personal site.
  10. The command mkdir /cs133 && cd cs133 was used to create and navigate to a CS133 folder.
  11. index.html and background.html were created in cs133/ using nano.
  12. Using for i in {1..7}; do mkdir lab${i}; cp ~/lab1resources/weekly_entry.html ./lab${i}/index.html; cp ~/lab1resources/diary.css ./lab${i}/diary.css; done, subdirectories for each week were created.
  13. In cs133/, the name file was created using echo "Leo Riviera" > name.
  14. Permissions were set using chmod -R o+rX ~/public_html to make all assets publicly accessible and manually set permissions on the files and folders necessary to achieve Marking Point 1.1.
A terminal window showing the output of the infotutorial script

Commands

New commands used during this lab included

  • scp, used as scp {fileToCopy} {user}@{host}:{host location} to securely copy a local file to a remote host.
  • ssh, used as ssh {user}@{host}, which allows a user to access the shell on a remote server.
  • unzip, used unzip {file} to unzip a file to a directory of the same name. The -d flag can be used to specify a destination directory.
  • cd, used as cd {directory} to change directory.
  • nano, used as nano {file}, to launch the nano file editor.
  • export, used as export {value}, to update the current shell's environmental variables.
  • mkdir, used as mkdir {name}, to create a new directory.
  • chmod, used as chmod {octal} {path}, to change a file or directory's modes, or filesystem permissions. Permissions can also be set recursively, using -R.
  • ls, to list items in the current directory. Can be used with the flag -a to list hidden files and folders, or -l to list permissions.