Introduction To Linux
- Operating System ⇒ manages computer resources (i.e. software and hardware)
- It is an interface between computer programs (software) and physical devices (hardware)
- Hardware = CPU, RAM, H/SDD, GPU, …
- Software = computer programs are processes or tasks that run inside the OS
- End-user applications (e.g. browser, Words, …)
- Window Manager (OS-mediated access to resources via a GUI)
- CLI or shell which is a text interface between the user and the OS
- UNIX = OS designed to be multi-task and multi-user
- Why a shell?
- Some programs (i.e. on remote computers such as the HPC) do not provide a GUI or are not amenable to GUIs
- Keeping track of what you do
- Possible to solve complex tasks by combining simple commands
- Unix File System
- Hierarchical structure (i.e. inverted tree) where files are places in directories and the top of the hierarchy is “/”
- Helpful text-file commands
head [FILE]
→ read the first lines of a filetail [FILE]
→ read the last lines of a fileless [FILE]
→ dosed viewing of a file- Use
q
to quit - Use
<space>
to go to next page - Use
h
for help >
pipes output to a file
>>
appends to an existing file- Helpful commands for packing/unpacking groups of file
gzip FILE
→ compress file into gzip filegunzip FILE
→ decompress file from gzip filezip F1 F2 ... FN
→ creates a zip file for all appended fileszip -r FILE.zip DIR
→ creates a zip file with all files contained withinDIR
unzip FILE
→ extracts the contents of a zip file to the current directory