We will utilize the open source Linux operating system. Our department runs a computing server for the use of our students.
- Visit the computer science webpage
- Read the remote account usage policy
- 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.
- Log into the CS server using PuTTY
- Change your password
We will use the text editor
to edit our source files. Editing a file in
can be daunting at first. The first file we will edit will be our
uses three modes: insert mode, command mode, and visual mode.
starts in command mode. To insert text you need to first type
to enter insert mode. Use the
key to return to command mode. The more you use
the easier it is to use.
i -- enters insert mode
ESC -- enters command mode
:wq -- write out the file and quit
:q -- quit
:q! -- force quit without saving changes
Now try out
- type the command
- add the lines from the board to your .vimrc file
- write and quit
Similar to other operating systems (windows or macOS), Linux uses files and directories. Directories contain files and other directories.
ls -- lists the contents of the current directory
ls -a -- list all the contents of the current directory including invisible files
mkdir filename -- creates a new directory named filename
cd path -- changes your current directory
cd -- changes you back to your root directory
cd .. -- move up a directory
Now, try out the new commands we have learned.
- Create a new directory named
- Change to your new directory
- List the contents of your new directory
- 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