CMSC 160 -- Lab 1

Lab 1

We will utilize the open source Linux operating system. Our department runs a computing server for the use of our students.
  1. Visit the computer science webpage
  2. Read the remote account usage policy
  3. Read the basic remote login instructions
The command line interface (CLI) allows you to interact remotely with the CS server. The CLI takes in text commands and returns text feedback. We will learn a few commands to get you started.
  1. Log into the CS server using PuTTY
  2. Change your password
We will use the text editor vim to edit our source files. Editing a file in vim can be daunting at first. The first file we will edit will be our vim preferences file. Vim uses three modes: insert mode, command mode, and visual mode. Vim starts in command mode. To insert text you need to first type i to enter insert mode. Use the ESC key to return to command mode. The more you use vim the easier it is to use.
  1. i -- enters insert mode
  2. ESC -- enters command mode
  3. :wq -- write out the file and quit
  4. :q -- quit
  5. :q! -- force quit without saving changes
Now try out vim.
  1. type the command vim .vimrc
  2. add the lines from the board to your .vimrc file
  3. write and quit vim
Similar to other operating systems (windows or macOS), Linux uses files and directories. Directories contain files and other directories.
  1. ls -- lists the contents of the current directory
  2. ls -a -- list all the contents of the current directory including invisible files
  3. mkdir filename -- creates a new directory named filename
  4. cd path -- changes your current directory
  5. cd -- changes you back to your root directory
  6. cd .. -- move up a directory
Now, try out the new commands we have learned.
  1. Create a new directory named lab1
  2. Change to your new directory
  3. List the contents of your new directory
  4. Create a new file and describe your computer science background. Do you have experience coding?
When you are done you need to hand in your lab. You will to change to the directory which contains the directory You wish to hand in. We will use the handin cmsc160-1 assignment directory command. In this case you will type: handin cmsc160-1 lab1 lab1