Linux Flashcards
What is Linux?
Linux is an OS based on Unix, which is a collection of software that manages hardware resources and provides an environment where applications run.
Linux has 3 important components:
kernel
system library
system utility
What is Linux Distribution?
It is a collection of software and different applications bundled together and distributed as a single operating system.
For eg, one Linux distribution might come with one particular web browser while another one might support different one.
What is Linux kernel?
Linux Kernel is the core of Linux OS and a layer that sits between system’s hardware and its processes. It communicates between the two, managing the resources.
Kernel has 4 jobs:
- Memory management
- Process management
- Device drivers
- System calls and security
It uses Linux Kernel API through which user programs interact with kernel.
What is SSH?
Secure SHell (SSH) is a network protocol and it allows us to connect from one system to another securely over network.
It provides a secure channel over an unsecured network by using client-server architecture, connecting an SSH client application with an SSH server.
Standard port for SSH is 22.
What is PuTTY?
PuTTY is an open-source terminal emulator, console and network file transfer application. Originally written for Windows, it is now a popular client for SSH connections.
What is ‘/’?
Also known as root directory, it is the top of the entire file system hierarchy in Linux.
In Windows, we have multiple root directories such as C:, D: etc but Linux allows only one root directory.
What is /bin?
It is the directory where essential command binary and other executable programs are kept for all users.
For eg. cat, ls, cp.
What is /boot?
It is the directory where bootloader files are kept.
For eg. kernel, initrd
What is /dev?
It is the directory where device files are kept.
For eg. /dev/disk0, /dev/sda1
What is /etc?
It is the directory where host specific system-wide configuration files are kept. These configuration files control how the OS/application should behave.
What is /home?
It is users’ home directory and contains saved files, personal settings etc.
What is /lib?
It is the library folder for binaries in /bin and /sbin.
What is /media?
It is the mount point for removable media such as CD-ROM.
What is /mnt?
It is the directory where temporarily mounted filesystems are stored.
What is /opt?
It is the directory where optional/ third party application software packages, not provided by distro by default, are kept.
For eg. Google Earth
What is /proc?
This directory contains virtual filesystem providing process and kernel information as files. This directory is generally automatically generated and populated by the system, on the fly.
What is /root?
It is the home directory for root user.
What is /sbin?
It contains essential system binaries that require root permissions.
For eg. fsck, init, route.
What is /usr?
User System Resources (usr) is the secondary hierarchy for read-only user data and contains the majority of user utilities and applications.
What is /usr/bin?
It contains non-essential command binaries for all users.
What is /usr/sbin?
It contains non-essential system binaries that require root permission.
For eg. daemons for various network-services.
What is /var?
This directory contains variable files, files whose content is expected to change continually during normal operation of the system.
For eg, log files, spool files, temporary email files
What is the difference between
/bin
/sbin
/usr/bin
/usr/sbin?
/bin contains binaries usable before /usr partition is mounted. Hence this is used for trivial binaries need to be available in booting single-user mode, such as cat, ls etc.
/sbin is same as /bin but for binaries with root permission required, such as fsck, init.
/usr/bin is same as /bin but for general system-wide binaries.
/usr/sbin is same as /usr/bin but for binaries with root permission required.
What is the difference between / and /root?
/ is the root directory where the file hierarchy starts.
/root is the home directory for root user and is inside the root directory ( / ).