4.9 KiB
4.9 KiB
Lesson 01 | Course Overview + Shell
Links
Notes
why
- there are many tools that make life easier for programmers
- lecture notes and recordings are available online
the shell
- programs are meant to be integrates with each other through the shell
- most common shell is Bourne Again Shell (bash)
shell prompt
-
typical shell prompt:
file:../_share/media/img/lecture01/ex01.png
- shells can be customized extensibly
- arguments are seperated by whitespace
-
multiple words can be passed as a single argument via:
-
quotes
echo "Hello world" -
escapes
echo Hello\ world
-
how does the shell know where programs are
-
via environment variable
-
things that are set whenever you start your shell
- where is your home directory
- what is your username
- what are the PATHs to your programs
-
- shells, and bash in particular, are programming languages
paths
PATH environment variable
- a list seperated by colons (:)
- when bash is asked to run a program bash will search through the directories in path until it finds the program
absolute vs relative path
- pwd: print working directory
- all relative paths are relative to your current working directory
- absolute path starts with '/'
special directories
- '.' current directory
- '..' parent directory
tilde (~)
- always expands to your home directory
dash (-)
-
toggles to the previous directory you were at
cd /home/ronny/programs/notes/courses cd ../../ cd - pwd
the output will be
/home/ronny/programs/notes/courses
Playlist
- 00:20 why we're doing this class
- 04:11 the shell
- 05:38 install a terminal and a shell
- 06:05 the shell prompt
- 06:51 shell prompt
- 08:42 how does the shell know what these programs are
- 11:12 paths
- 12:18 absolute path
- 12:39 relative paths
- 17:14 tilde character
- 22:16 directories
- 22:56 execute on directories
- 25:14 cp command
- 25:47 rm
- 26:30 create a new directory
- 31:52 pipe character
- 34:04 grep
- 35:45 the root user
- 37:19 kernel paramters
- 43:32 scroll lock led
- 45:06 open a file
- 47:09 lecture notes
- office hours