[StuCo 98008]
GNU/Linux for Beginners
By the end of this lecture you will know
- What an operating system is
- The main components of an OS
- The history of GNU/Linux
- What GNU, Linux, distribution all mean.
- The filesystem structure of GNU/Linux
- How to explore the filesystem
An Operating System...
- Provides communication between machines and humans by:
- Knowing how devices
work (drivers)
- Managing memory and CPU
(to emulate multi-tasking)
- Accepting commands from
humans (through a UI -
user interface)
- Interpreting and passing commands to hardware.
Main Components of Operating Systems
- Kernel – provides hardware management
- User Interface
- Command Line Interface (CLI)
- Bourne Again Shell a.k.a. bash
- DOS command line
- Graphical User Interface (GUI)
- userland n. Anywhere outside the kernel*
Map of a GNU/Linux system
The Linux kernel
- Started as a fun project by Linus Torvalds in 1991
- Linux 2.4.20: 17750 files, 3,100,000 lines of code
User Interface
Command Line Interface
- The basic input/output mechanism of any UNIX system.
- Shell – the command interpreter (“command prompt” in other OSs) – bash, tcsh, csh etc.
- Terminal – a local or remote mechanism that facilitates some kind of shell.
- Console – the terminal that is provided to the user that has physical access (e.g. Ctrl-Alt-F1)
Graphical User Interface
- One layer above the CLI.
- GUI can only do what CLI can do, while the reverse is not necessarily true.
- GUI is based on a “windowing” system, called X.
- X draws basic shapes and handles fonts and colors only.
- The rest is provided by a window manager, like KDE, GNOME, WindowMaker, BusyBox etc.
A graphical depiction
- How a mouse click is received by the system...
- Translated to a shell command...
- Received by the kernel...
- Executed by the network card
Timeline
Protecting Freedom – the GNU GPL
- Project commencement 1984 – Richard Stallman
- Free Software Foundation founded 1985
- GNU General Public License (GPL)
Free as in speech, not free as in beer.
- Free to use the program
- Free to study how the program works, and adapt it to your needs
- Free to redistribute copies to anyone
- Free to improve the program and release the improvements to the community
Important Terms
- GNU: The free OS built as an alternative to UNIX
- Linux: The kernel most commonly used with GNU
- Distribution: A pre-packaged collection of software (e.g. Red Hat Linux, Debian GNU/Linux)
- Kernel space: The memory space used by the kernel (inaccessible to user applications)
- Userland (or user space): The memory space used by user applications
- Filesystem: A system to organize the files of an Operating System
The GNU/Linux Filesystem structure
Attaching removable devices to the filesystem
Removable Devices & Extra Hard Drives
Reading for next week
- “Is Open Source synonymous with Free Software?”
http://www.gnu.org/philosophy/free-software-for-freedom.html
- “The Linux Cookbook” - Shell section
http://www.tldp.org/LDP/linuxcookbook/html/cookbook_5.html#SEC48