Main directories (https://help.ubuntu.com/community/LinuxFilesystemTreeOverview)
Here, only the most important directories in the system will be presented:
/bin is a place for most commonly used terminal commands, like ls, mount, rm, etc.
/dev contains all device files, which are not regular files but instead refer to various hardware devices on the system, including hard drives.
/etc contains system-global configuration files, which affect the system’s behavior for all users.
/home home sweet home, this is the place for users’ home directories.
/lib contains very important dynamic libraries and kernel modules
/media is intended as a mount point for external devices, such as hard drives or removable media (floppies, CDs, DVDs).
/mnt is also a place for mount points, but dedicated specifically to “temporarily mounted” devices, such as network filesystems.
/opt can be used to store addition software for your system, which is not handled by the package manager.
/proc is a virtual filesystem that provides a mechanism for kernel to send information to processes.
/root is the superuser‘s home directory, not in /home/ to allow for booting the system even if /home/ is not available.
/sbin contains important administrative commands that should generally only be employed by the superuser.
/srv can contain data directories of services such as HTTP (/srv/www/) or FTP.
/sys is a virtual filesystem that can be accessed to set or obtain information about the kernel’s view of the system.
/tmp is a place for temporary files used by applications.
/usr contains the majority of user utilities and applications, and partly replicates the root directory structure, containing for instance, among others, /usr/bin/ and /usr/lib.
/var is dedicated variable data that potentially changes rapidly; a notable directory it contains is /var/log where system log files are kept.
What is the kernel ?
The kernel is the software that directly manages your hardware, allowing application libraries and software like GNOME and Firefox to run on many types of hardware without much difficulty. Because the Linux kernel is the core component of a GNU/Linux system, when it is upgraded, a full restart is required.
Ubuntu packages the Linux kernel for a variety of architectures, including several variants of the x86 architecture. These include a 386 version, a 686 version, and versions for the AMD k6 and k7 processors. While most software for x86 processors in Ubuntu is compiled for 386 or better instruction sets, the kernel and a few other packages are specifically compiled for certain processors for speed reasons. Check the package documentation to determine what type of kernel will perform best for your processor.
GRUB is more than just a boot loader, it is also the worlds best boot manager, meaning it is best installed to the Master Boot Record of the first hard disk. That way GRUB will be the first thing that loads when the computer starts. It allows you to boot Linux directly or boot another boot loader which can then load its own operating system(s). You can have different operating systems, and versions of them, on the same or different hard drives. For example, if you have both Windows and Linux installed on a computer, GRUB would load before either of these and let you choose which one to boot.
You can also create a boot floppy with GRUB to use in case of emergency, GrubHowto/BootFloppy (https://help.ubuntu.com/community/GrubHowto/BootFloppy)
A master boot record (MBR), or partition sector, is the 512-byte boot sector that is the first sector (“LBA Sector 0″) of a partitioned data storage device such as a hard disk. (The boot sector of a non-partitioned device is a Volume Boot Record. These are usually different, although it is possible to create a record that acts as both; it is called a multi boot record.) The MBR may be used for one or more of the following:
- Holding a disk’s primary partition table.
- Bootstrapping operating systems, after the computer’s BIOS passes execution to machine code instructions contained within the MBR.
- Uniquely identifying individual disk media, with a 32-bit disk signature; even though it may never be used by the machine the disk is running on.
The BIOS is boot firmware, designed to be the first code run by a PC when powered on. The initial function of the BIOS is to identify, test, and initialize system devices such as the video display card, hard disk, floppy disk and other hardware. The BIOS sets the machine hardware into a known state, so that software stored on compatible media can be loaded, executed, and given control of the PC. This process is known as booting, or booting up, which is short for bootstrapping.
BIOS programs are stored on a chip and are built to work with various devices that make up the complementary chipset of the system. They provide a small library of basic input/output functions that can be called to operate and control the peripherals such as the keyboard, text display functions and so forth. In the IBM PC and AT, certain peripheral cards such as hard-drive controllers and video display adapters carried their own BIOS extension ROM, which provided additional functionality. Operating systems and executive software, designed to supersede this basic firmware functionality, will provide replacement software interfaces to applications
Disk partitioning is the act or practice of dividing the storage space of a hard disk drive into separate data areas known as partitions. A partition editor program can be used to create, delete or modify these partitions. Once a disk is divided into several partitions, directories and files of different categories may be stored in different partitions. More partitions provide more control, but too many may become cumbersome. The way that space management, access permissions and directory searching are implemented depends upon the type of file system installed on a partition. Careful consideration of the size of the partition is necessary as the ability to change the size depends on the file system installed on the partition.
A Volume Boot Record (also known as a volume boot sector or a partition boot sector, although the latter is not strictly correct) is a type of boot sector, stored in a disc volume on a hard disk, floppy disk, or similar data storage device, that contains code for booting programs (usually, but not necessarily, operating systems) stored in other parts of the volume. On non-partitioned storage devices, it is the first sector of the device. On partitioned devices, it is the first sector of an individual partition on the device, with the first sector of the entire device instead being a Master Boot Record (MBR).
The code in volume boot records is invoked either directly by the machine’s firmware or indirectly by an MBR or a boot manager.
Invoking a VBR via a boot manager is known as chain loading. Some dual boot systems, such as NTLDR (the boot loader for all releases of Microsoft’s Windows NT-derived operating systems up to and including Windows XP and Windows Server 2003), take copies of the bootstrap code that individual operating systems install into a single partition’s VBR and store them in disc files, loading the relevant VBR content from file after the boot loader has asked the user which operating system to bootstrap. (Note that, in Windows Vista, Windows Server 2008 and newer versions, NTLDR was replaced; the boot loader functionality is instead provided by two new components: winload.exe and the Windows Boot Manager.)
In certain file system formats, in addition to bootstrap code the VBR contains a BIOS parameter block that specifies the location and layout of the principal on-disc data structures for the file system.