Operating Systems: Shell, Linux and Types

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which component of an operating system acts as the primary interface between applications and hardware?

  • Shell
  • Kernel (correct)
  • CLI
  • GUI

What is the primary function of the 'Shell' in an operating system?

  • To manage interaction between the user and the operating system. (correct)
  • To manage the hardware resources directly.
  • To provide a graphical interface for users.
  • To compile the source code of applications.

Which of the following is NOT a fundamental freedom associated with open-source operating systems like Linux?

  • Freedom to study and modify the program's source code.
  • Freedom to run the program for any purpose.
  • Freedom to restrict others from using the program. (correct)
  • Freedom to share copies of the program with others.

In the context of Linux file systems, what is the significance of the root directory ('/')?

<p>It is the highest-level directory in the file system hierarchy. (A)</p> Signup and view all the answers

Which command is used to display the contents of a file one page at a time in Linux?

<p>less (B)</p> Signup and view all the answers

What is the purpose of the /dev directory in Linux?

<p>It contains file representations of hardware components. (C)</p> Signup and view all the answers

Which directory in Linux is typically used for storing temporary files that are cleared upon system reboot?

<p>/tmp (B)</p> Signup and view all the answers

What is the purpose of the command sudo?

<p>To execute a command with superuser privileges. (A)</p> Signup and view all the answers

Which command will recursively delete a directory and all its contents without prompting for confirmation?

<p>rm -r (B)</p> Signup and view all the answers

What information does the lastb command provide?

<p>Failed login attempts (C)</p> Signup and view all the answers

Flashcards

Operating System (OS)

Manages all software and hardware on the computer.

Shell

The outermost layer of the OS; manages interaction between user and operating system.

Multitasking OS

Also known as time-sharing OS; each task gets some time so all work efficiently.

Network Operating Systems

Runs on a server; Manages all the networking functions.

Signup and view all the flashcards

Mobile OS

An operating system for smartphones, tablets and PDA’s.

Signup and view all the flashcards

Linux

An open-source operating system based on UNIX that can be installed in PCs

Signup and view all the flashcards

Linus Benedict Torvalds

A Finnish-American software engineer, creator and principal developer of the Linux kernel.

Signup and view all the flashcards

Man Pages

An abbreviation of the manual or man page

Signup and view all the flashcards

Root Directory ('/')

The highest layer of the file system tree. The partition on which the /directory is located is the first one mounted on system boot up.

Signup and view all the flashcards

Device Files (/dev)

Each hardware component in the system is represented as a file in this directory.

Signup and view all the flashcards

Study Notes

  • Shell is the outermost layer of the Operating System
  • The shell manages the interaction between the user and the operating system

Operating System Management

  • The shell prompts the user to give input
  • The shell interprets the input for the operating system
  • The shell handles the output from the operating system

Types of Operating Systems

  • Multitasking OS, also known as time-sharing operating systems, work efficiently by allocating time slots for each task
  • Network operating systems run on a server, managing all networking functions
  • Examples of Network operating systems include Microsoft Windows Server 2008 and Linux.
  • Mobile OS is an operating system designed for smartphones, tablets, and PDAs

Linux

  • Linux is an open-source and freely distributable operating system based on UNIX that can be installed on PCs

Linux Freedoms

  • Linux provides the freedom to run the program for any purpose
  • Linux provides freedom to study and change the program with access to the underlying source code
  • Linux provides freedom to share copies with others
  • Linux provides freedom to distribute copies of modified versions to others

Creator of Linux

  • Linus Benedict Torvalds, a Finnish-American software engineer, is the creator and principal developer of the Linux kernel
  • The Linux kernel serves as the foundation for Linux operating systems (distributions)
  • The Linux kernel also provides services for other operating systems like Android and Chrome OS
  • Linus Benedict Torvalds was born on December 28, 1969

Linux History

  • Linux began in 1991 as a personal project by Finnish student Linus Torvalds.
  • Torvalds created a new free operating system kernel.

Linux Distributions

  • Fedora (Red Hat)
  • OpenSUSE (SUSE)
  • Ubuntu (Canonical Ltd.)
  • Debian
  • Slackware
  • Gentoo
  • Arch Linux
  • CentOS

Debian Based Distributions

  • MX Linux
  • Linux Mint
  • Ubuntu
  • Deepin
  • AntiX
  • PureOS
  • Kali Linux
  • Parrot OS
  • Devuan
  • Knoppix
  • AV Linux

Redhat Based Distributions

  • Rocky Linux
  • Alma Linux
  • CentOS

Locate and Help Resources

  • man pages an abbreviation of the manual or man page
  • info pagesare used for programs without manual pages

Parts of a man Page

  • NAME is the short description of the command
  • SYNOPSIS describes syntax.
  • DESCRIPTON provides detailed explanation
  • OPTION explains all available options
  • COMMANDS provides instructions that can be given to the program while it is running
  • FILES defines the files connected in some way to the command.
  • SEE ALSO provides hints on related commands
  • DIAGNOSTICS explains the possible error messages of the program
  • EXAMPLES provides examples of calling up a command.
  • BUGS notes known errors and problems with the command.

GUI and CLI commands

  • cd Change directory
  • ls List directory contents
  • pwd Print working directory

Create and View Files

  • touch Create an empty file / change file time stamp
  • cat Display file contents
  • less Display file contents one page at a time
  • head Display first 10 lines of a file
  • tail Display last 10 lines of a file

Files and Directories

  • mv Move files and directories
  • cp Copy files and directories
  • mkdir Create directories
  • rm Delete files and directories
  • rmdir Delete empty directories
  • rm -i will ask before deleting each file
  • Using rm -I instead will only ask once and if you are trying to delete three or more files.
  • rm -r will recursively delete a directory and all its contents
  • W it display the log-in session information of the user
  • whoami it display the current user being use
  • pwd is the Print working directory (current location)
  • last used to display a list of users who have previously logged in to the system
  • lastb used to display information pertaining to failed login attempts
  • sudo is a command-line utility for Unix and Unix-based operating systems such as Linux and macOS

Linux Directories

  • Essential Binaries for Use by All Users (/bin)
  • /bin/bash - Bash shell
  • /bin/cat - Displaying files
  • /bin/cp - Copying files
  • /bin/dd - Copying files byte-wise
  • /bin/gzip - Compressing files
  • /bin/mount - Mounting file systems
  • /bin/rm - Deleting files
  • /bin/vi - Vi editor

Hierarchical Structure of The File System

  • The hierarchical structure of the file system May be depicted as an inverted tree
  • Separation is with is slash "/"
  • Relative path Starts from the current directory
  • Absolute path Starts from the root of the entire file system tree
  • Always begin with a slash "/"

Root Directory

  • The highest layer of the file system tree
  • Upon system boot up, the partition on which this directory is located is the first one mounted
  • There must always be /bin, /dev, ect, lib, /sbin

Device Files

  • Each hardware component in the system is represented as a file in /dev directory Hardware components are addressed via these files by writing or reading from one of these files
  • The two device files are Character-oriented and Block-oriented

Other Partitions

  • If YaST finds other , it creates mount points for each partition labeled

Boot Directory

  • Contains static files of the boot loader GRUB
  • Contains the kernel
  • Also contains backed up information for the Master Boot Record (MBR) and system map files.

Important Device Files - devices and device file directories

  • Terminals /dev/console OR /dev/tty1
  • Serial Ports /dev/ttys0... /dev/ttys*
  • Parallel Ports /dev/lp0... /dev/lp*
  • Floppy disk drives /dev/fd0 /dev/fd*
  • IDE Hard drives /dev/hda... /dev/hd*
  • IDE CD-ROM drives /dev/hd*
  • SCSI Hard drives /dev/sda... /dev/sd*
  • SATA Hard drives /dev/sda /dev/sd*
  • SCSI CD-ROM drives /dev/scd0... /dev/scd*

Configuration Files

  • /etc/SuSE-release
  • /etc/passwd
  • /etc/inittab
  • /etc/shadow
  • /etc/init.d/*
  • /etc/group
  • /etc/modprobe.conf
  • /etc/cups/*
  • /etc/DIR COLORS
  • /etc/hosts
  • /etc/X11/xorg.conf
  • /etc/motd
  • /etc/fstab
  • /etc/issue
  • /etc/profile
  • /etc/sysconfig/*

User Directories

  • .profile - Private login script of the user
  • .bashrc -Configuration file for bash
  • .bash history - List of command previously run in bash

Libraries

  • Contains the libraries that are used by programs in the /bin and /sbin directories
  • Kernel modules are located in /lib/modules directory.
  • Additional libraries may be found in the /usr directory

Mount Points for Removable Media

  • /media/floppy/
  • /media/cdrom/
  • /media/cdrecorder/
  • /media/dvd/
  • /media/usbdisk/
  • /media/media name

Application Directory

  • Installed programs can store their static files in this directory First, a directory with the name of the application is created The files are then stored in that address
    • For GNOME: /opt/gnome
    • For KDE: /opt/kde3

Root's Home Directory

  • The home directory of the system administrator
  • Not located in /home
  • Preferably, it should be in the same partition as the root directory ("/")

System Binaries

  • /sbin/SuSEconfig
  • /sbin/fsck*
  • /sbin/conf.d/*
  • /sbin/init
  • /sbin/yast
  • /sbin/mkfs*
  • /sbin/fdisk
  • /sbin/shutdown

Data Directories for Services

  • Contains subdirectories designed for containing data for various services
    • For Apache web server: /srv/www/
    • For FTP server: /srv/ftp/

Temporary Area

  • Various programs create temporary files that are stored in /tmp/until they are deleted

The Hierarchy Below

  • /usr - Unix Specific Resources OR Unix System
  • /usr/X11R6/ -> Files for the X Window System
  • /usr/bin/ -> Almost all executable programs
  • /usr/lib/ -> Libraries
  • /usr/local/ -> Locally-installed programs
  • /usr/sbin/ -> Programs for system administration
  • /usr/share/doc/ -> Documentation
  • /usr/share/man/ -> The manual pages
  • /usr/src/ -> Source files of all programs and the kernel

Variable Files

  • /var/lib/ -Variable libraries
  • /var/log/ -Log files for most services
  • /var/run/ -Files with information on running processes
  • /var/spool/ -Directory for queues
  • /var/lock/ -Lock files to protect devices from multiple use

Windows Partitions

  • If YaST finds any partitions with a Microsoft file system it creates a /windows directory automatically Inside this directory there are subdirectories labeled with Windows drive characters

Process Files

  • /proc/cpuinfo
  • /proc/mounts
  • /proc/dma
  • /proc/net/*
  • /proc/interrupts
  • /proc/partitions
  • /proc/ioports
  • /proc/bus/pci
  • /proc/filesystems
  • /proc/bus/scsi/
  • /proc/modules
  • /proc/sys/*
  • /proc/version
  • /sys

System Information Directory

  • provides information in the form of a tree structure on:
  • various hardware buses;
  • hardware devices;
  • active devices;
  • and their drivers

Mount Point for Temporarily Mounted File Systems

  • The standard directory for integrating file systems is /mnt .It should only be used for temporary purposes To mount the partition to unmount the partition: umount

Locally-available File Systems

  • /bin
  • /boot
  • /dev
  • /etc
  • /lib
  • /sbin

Filesystem Hierarchy Standard

  • Describes the standard structure of a file system.
  • Defines a two-layered hierarchy: The directories in the top layer A second layer, the directories under /usr and /var
  • More information may found over the Internet at http://www.pathname.com/fhs/ The Hierarchical Structure of the File System
  • May be depicted as an inverted tree
  • The separation character between individual directory names is a slash "/"
  • Relative path starts from the current directory
  • Absolute path starts from the root of the entire file system tree
  • Always begin with a slash "/"

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Linux Operating System Quiz
5 questions
Linux Operating System Overview
6 questions
Use Quizgecko on...
Browser
Browser