Lecture 02
Lecture 02
1
Administrivia
▪HW 1 will release Monday
▪Class webpage coming later today
▪Class discussion board available
▪Linux accounts will be available later this afternoon
- Username = uwnetid
- Password = tempPassword
▪Meet some of your TAs!
- Dixon
- Andres
- Tom
- Leah
Bash Java
Interpreted Compiled
Esoteric variable access Highly structured & strongly typed
everything is a string Strings have library processing
easy access to files and programs Data structures and libraries
good for quick & interactive programs good for large complex programs
5
Meet the Linux Shell
▪ Text based interface for Linux
operating system
▪ We will be using the “Bash” shell
- There are different versions, but for this
course we will only be using bash
Basic Interactions:
▪You can use copy and paste with with your usual short cuts
▪You can navigate through your executed commands by using the up and down arrows
- Convenient way to rerun commands or to fix small errors in previous command
▪The history command will print the commands you’ve used this session to the terminal
▪To run a program in the current directory you need to give the path
- ./local_program
- Running local_program by itself will not work because it’s not globally visible
▪All commands are bash files that are executed when you hit “enter” on a terminal line
- You can write and execute your own! More on that later
contents of a directory.
reading ls -l
▪ _rw_rw_rw = owner, group and all users have read & write
permissions
▪ first character is either a - or a d : d means “directory”, “-” means file
chmod <group>+||-<permission> <file>
▪ chmod a-rw file1 : remove read and write permissions on
file1 for all users
▪ chmod a+rw file1 : add read and write permissions on file1
for all users
https://www.linux.com/training-tutorials/understanding-linux-file-permissions/ 15
File System
▪Files contain other files, branching out from the
root “/” forming a tree-like hierarchy
▪Files are located with a path of folders separated
by “/” this is called the “file path”
▪Paths starting with “/” are called absolute paths
- Start searching from the root of the file system
- EX: /usr/documents/myFiles/myFile.txt