Quiz #1 Review
Quiz is Wednesday June 1st
When I describe a command below, the bits in <> are required arguments and the bits in  are optional arguments. For example, touch requires a path argument, rm has two optional arguments and requires a path, and su has one optional argument (just a '-') and an optional username argument. You should know the arguments I've listed and the general format of the command.
To make your life a bit easier, I've marked a few things which will be on the test with .
Six characters long, mix of case, numbers, letters, symbols
'$' to access. For example:
echo $PATH prints the contents of PATH
touch $HOSTNAME creates a file named after your computer
'set' to list all environment variables
'export' to set a new variable. For example:
export MYVAR=cs3040 sets the environment variable 'MYVAR' to contain 'cs3040'
echo $MYVAR prints "cs3040"
What PATH and HOSTNAME contain and are used for.
Inline Command Execution
Use the back-tick `. For example:
touch `pwd` updates the access time on the current directory
ping `hostname` pings the local host
ls [-l, -a, -R] [path]
rm [-r, -f] <path>
who [ am i, -a]
ps [-e, -a]
script [-a] [path]
chmod <permissions> <path>
chown <username> <path>
chgrp <groupname> <path>
head [-# where # is a decimal number] <path>
tail [-# where # is a decimal number, -f] <path>
su [-] [username]
Unix Commands for Users and Groups
useradd [-c,-d,-m,-s] <username>
userdel [-r] <username>
User and Group Files
/etc/passwd: Contains all user account information except the password
/etc/shadow: Contains user account passwords
/etc/group: Contains group account information and group membership information
Access Control Lists
setfacl [-m, -x] <entity_type>:<entity>:<permissions> For example:
setfacl u:cartman:rwx /secret makes cartman a user on /secret with read, write, and execute privileges
setfacl g:fourthgrade:x /secret makes fourthgrade a group on /secret with execute privileges
General filesystem concept:
Filesystem more abstract than Microsoft Windows
Filesystems not associated with a hardware device (no C: or D:)
Filesystems can be mounted anywhere
mount [<device> <path>] (Note: The device and path are both optional, but if you give a device you must give a path)
df [-h] [path]
Swap partitions: What they are, why we have them.