Assignment 1 (ch2-3)
Assignment 1 (ch2-3)
An operating system is software that runs on a computing device and manages the hardware and
software components that make up a functional computing system.
Modern operating systems also can schedule programs to run in a multi-tasking manner (sharing
the processor so that multiple tasks can occur apparently simultaneously), provide standard
services that allow users and programs to request something happen (for example a print job)
from the operating system, and provided it’s properly requested, the operating system will accept
the request and perform the function needed.
There are two types of interfaces for interacting with operating systems: graphical user
interface (GUI) and command line interface (CLI).
GUI is the most familiar to typical computer users, while the CLI relies on keyboard input and
is celebrated in the Linux community for its power, speed, and automation capabilities.
Operating systems manage hardware and software resources and provide standard services for
programs and users to request.
Desktop and server operating systems are more complex than single-purpose device operating
systems.
Users have a choice between three major operating systems: Microsoft Windows, Apple macOS,
and Linux. Of the three major operating systems listed only Microsoft Windows is unique in its
underlying code. Only Microsoft Windows is based on a proprietary code base that isn’t either
UNIX- or Linux-based. Apple’s macOS is a fully-qualified UNIX distribution based on BSD
Unix (an operating system distributed until 1995), complemented by a large amount of
proprietary code. It runs on hardware specifically optimized to work with Apple software. Linux
can be any one of hundreds of distribution packages designed or optimized for whatever task is
required.
A user can easily interact with any of these systems by pointing and clicking their way through
everyday productivity tasks that all behave similarly regardless of the underlying operating
system. Except for Windows, which is mostly administered via the GUI, most system
administration tasks are performed using typed commands in a terminal. An administrator that is
familiar with UNIX can typically perform tasks on a Linux system and vice versa. Many Linux
command line functions also have Microsoft equivalents that administrators use to do their work
efficiently.
In graphical mode (GUI), users can have several different windows with terminal
applications (shells) open, which is very helpful when performing tasks on multiple remote
computers. Administrators and users can log-in with their username and password through a
graphical interface.
The second type of interface, the CLI, is a text-based interface to the computer, where the user
types in a command and the computer then executes it. The CLI environment is provided by
an application on the computer known as a terminal. The terminal accepts what the user types
and passes to a shell. The shell interprets what the user has typed into instructions that can be
executed by the operating system. If output is produced by the command, then this text is
displayed in the terminal. If problems with the command are encountered, then an error message
is displayed.
The CLI starts with a text-based login as shown below. In a successful login, after being
prompted for a username and password, you are taken to a CLI shell customized for the
particular user.
ubuntu 18.04 ubuntu tty2
ubuntu login:
In CLI mode there are no windows to move around. Text editors, web browsers, and email
clients are all presented in text format only. This is how UNIX operated before graphical
environments were the norm. Most servers run in this mode too, since people don’t log into them
directly, making a graphical interface a waste of resources.
The original login prompt is at the top, with newer text added below. During login there may be
some text displayed called the message of the day (MOTD). This is an opportunity for the
systems administrator to pass information to users, or just make a silly joke. Following the
MOTD is the command prompt, in the example above, the user has entered the w command
which shows who is logged in. As new commands are entered and processed, the window scrolls
up and older text is lost across the top. The terminal itself is responsible for keeping any history,
such as to allow the user to scroll up and see previously entered commands. As far as Linux is
concerned, what is on the screen is all that there is. There’s nothing to move around.
The first decision when specifying any computer system is the machine’s role: whether it will be
a desktop or a server.
Servers typically sit in a rack and share a keyboard and monitor with many other computers.
Servers generally run as a CLI, while desktop systems primarily run a GUI.
The functions of the machine, specific software needed to run, and the skill set of the team
managing the computer and software need to be determined.
The service lifetime and risk tolerance of the server also needs to be determined.
Maintenance and release cycles are critical considerations in an enterprise server environment.
Virtualization has decreased the need for physical hardware upgrades and provides automation of
many tasks previously done manually by system administrators.
Production servers typically use stable software unless needed features are not available.
Compatibility is a concern when upgrading an operating system, but an application software
upgrade is not possible.
Cost is always a factor when specifying new systems.
Interface options for computer systems have evolved from switches and plugboards to punch
cards, text-based terminals, and finally graphical user interfaces (GUIs).
-Microsoft offers different versions of its operating system for desktop and server machines. The
current desktop version of Windows is Windows 11. New versions of Windows are released
only every few years. There have been 16 versions of Windows since 1985. Backward
compatibility is a priority for Microsoft, and it bundles virtual machine technology for running
older software. Windows Server is currently at version 2019. Microsoft has made incredible
strides in its command line scripting capabilities through PowerShell and WSL.
-Apple makes the macOS operating system, which is based on software from the FreeBSD
project and has undergone UNIX certification. macOS is favored by users with limited access to
IT resources, such as schools and small businesses, and is popular with programmers due to its
robust UNIX underpinnings. macOS Server is aimed at smaller organizations and allows users
to collaborate and administrators to control access to shared resources. Some large corporate IT
departments allow users to choose macOS since users often require less support than standard
Microsoft productivity deployments. macOS is popular in the creative industries such as graphics
and video production. Apple hardware is integrated closely with the operating system, and their
insistence on adherence to standards in application programming gives creative professionals a
stable platform for computing-intensive functions.
-Linux is an open-source operating system that has evolved to encompass many tasks that
businesses, educational institutions or government organizations might use in their daily
operations. Linux is actually a combination of software called GNU/Linux, with GNU being the
free software that provides open source equivalents of many common UNIX commands, and
Linux being the core of the operating system. The Linux kernel is loaded at boot time and stays
running to manage every aspect of the functioning system. Linux has grown to be the dominant
operating system on the Internet, and arguably the most important computer program of any
kind.
Linux distributions include tools that take care of setting up the storage, installing the kernel,
and installing the rest of the software, as well as tools to manage the system and a package
manager to help add and remove software after installation.
Different distributions have different versions of key libraries, and it is difficult for a company to
support all these different versions. Most distributions have both major and minor update cycles
to introduce new features and fix existing bugs. Linux distributions can be broadly classed in two
main categories: enthusiast and enterprise. Enterprise distributions offer stable and consistent
software with enterprise-grade support for extended periods. Application software may be
written such that it only supports a specific release of a distribution. Some Linux releases are
considered to have long-term support (LTS) of 5 years or more while others are only supported
for two years or less. Some distributions offer stable, testing, and unstable releases, with different
risks and benefits associated with each. Enthusiast Linux distributions are often geared towards
users who want to stay on the cutting edge of software development, and they typically have a
fast update cycle.
SUSE is a comprehensive Linux distribution that was originally derived from Slackware. The
original company was purchased by Novell in 2003, which was then purchased by the
Attachmate Group in 2011. The Attachmate group merged with Micro Focus International in
2014, and in 2018, SUSE announced plans to go forward as an independent business. SUSE
Linux Enterprise contains proprietary code and is sold as a server product. OpenSUSE is a
completely open and free version of SUSE, with multiple desktop packages. SUSE has managed
to continue and grow through mergers and acquisitions.
Debian is a community effort that promotes the use of open source software and adherence to
standards. Debian has its own package management system based on the .deb file format. Debian
supports many non-Intel and AMD platforms directly. Ubuntu is the most popular Debian-
derived distribution.
Canonical is the company that created Ubuntu and makes money by providing support.
Ubuntu has different variants for desktop, server, and specialized applications. Ubuntu offers an
LTS version that is kept up-to-date for 3 years on desktops and 5 years on servers.
Linux Mint was started as a fork of Ubuntu Linux and relies upon the Ubuntu repositories.
Linux Mint has various versions, some of which include proprietary codecs that cannot be
distributed without license restrictions in certain countries.
Linux is a kernel and GNU is a package of software utilities commonly used with Linux.
Android is a Linux distribution sponsored by Google. Android uses the Dalvik virtual machine
with Linux and is primarily designed for mobile devices. Android lacks traditional packages
commonly distributed with desktop Linux distributions such as GNU and Xorg. Android is
generally incompatible with desktop Linux distributions, meaning users cannot download
software from the Google Play store. A terminal emulator in Android lacks many of the
commands found in traditional Linux counterparts. BusyBox can be used with Android to enable
most commands to work.
Raspbian is a Linux distribution optimized for Raspberry Pi hardware, and it is popular in
education and physical computing.
Linux From Scratch is a project that provides instructions for building a custom Linux
distribution from source code and is more of a learning tool than a working distribution.
There are hundreds, if not thousands, of Linux distributions available beyond those explicitly
mentioned in the Linux Essentials objectives. Many programs and commands remain the same or
are very similar across different Linux distributions.
Linux started out as a computer operating system that would only run on a specific hardware
configuration. Due to its open-source nature, Linux eventually started supporting other chips
with an emphasis on small size and low power consumption. Linux has become a popular choice
for operating systems in embedded systems because of its flexibility. Embedded systems are
designed to perform a specific task on hardware optimized for that purpose.
Linux has been used as an operating system for a wide range of devices, from cell phones to
smart TVs to remote monitoring systems for pipelines and factories.
The rise of cheap, small, adaptable single-board computers like the Raspberry Pi has given
experimenters and entrepreneurs tools to quickly build custom solutions powered by Linux.
The internet of things (IoT) is just ramping up with cheap, ubiquitous devices being deployed on
everything from oil wells to solar generating farms.
Networks of smart sensors and controllers enable engineers to adjust critical processes in real
time while monitoring and reporting back to central control stations. More processes are being
monitored, and more data is being integrated with machine learning and artificial intelligence
(AI), leading to anticipated gains in efficiency, safety, and productivity.
The kernel of an operating system functions like an air traffic controller at an airport, managing
applications like airplanes. The kernel decides which program gets which blocks of memory,
starts and kills applications, and handles text or graphics display on a monitor. Applications
make requests to the kernel and receive resources such as memory, CPU, and disk space in
return. The kernel abstracts complicated details away from the application, and applications need
to follow the kernel's Application Programming Interface (API). The kernel maintains an illusion
that each application behaves as if it has a large block of memory on the system. The kernel
handles the switching of applications, a process known as multitasking. The kernel takes care of
running the processes and handing out system resources. Linux can run a wide variety of
software across many hardware platforms, and it can simulate almost all aspects of a production
environment, from development to testing to verification on scaled-down hardware. Linux
software generally falls into three categories: server applications, desktop applications, and tools.
Linux excels at running server applications due to its reliability and efficiency, and it allows
administrators to do more with less.
Console Tools
The development of UNIX shows considerable overlap between the skills of software
development and systems administration. The tools for managing systems have features of
computer languages such as loops, and some computer programming languages are used
extensively in automating systems administration tasks. Basic familiarity with programming is
required for competent systems administrators. Users interact with a Linux system through a
shell, whether connecting to the system remotely or from an attached keyboard.
The Linux shell provides a rich language for iterating over files and customizing the
environment, all without leaving the shell. Linux offers a variety of shells to choose from, mostly
differing in how and what can be customized, and the syntax of the built-in scripting language.
The two main families of shells are the Bourne shell and the C shell, with modern versions being
Bash and tcsh.
Programmers have created other shells based on favorite features from Bash and tcsh, such as the
Korn shell and the Z shell.
Linux systems provide a choice of text editors which are commonly used at the console to edit
configuration files.
The two main text editors are Vi (or the more modern Vim) and Emacs, with plugins that can
range from syntax highlighting to integrated calendars.
Pico and Nano are available on most systems and provide very basic text editing. Nano was
developed as a completely open-source editor loosely based on Pico. Vi offers more advanced
editing and key binding features than Nano. Administrators should strive to gain some basic
familiarity with Vi, as it is available on almost every Linux system in existence and can be a
critical tool for restoring a broken system in recovery mode.
Lab work 1:
Install ubuntu on a virtual machine https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-
a-virtual-machine-using-virtualbox#1-overview -10 points without it
1. List Command: Your first task is to use the "ls" command to list the files and directories
in a particular directory. Choose any directory on your system and use the "ls" command
to display the files and directories. Pay attention to the various options available, such as
"-l" and "-a", and experiment with them to understand their effects.
2. Navigation Command: The next task is to use the "cd" command to navigate through
different directories on your system. Start in your home directory and use the "cd"
command to navigate to various subdirectories. Also, use the "cd .." command to navigate
to the parent directory. Make sure you understand the difference between relative and
absolute paths and experiment with both.
3. File Management Command: Your third task is to use the "touch" command to create a
new file in a particular directory. Choose any directory on your system and use the
"touch" command to create a new file. Then use the "cp" command to copy the file to
another directory, and the "mv" command to move the file to a different location.
4. Text Editing Command: The next task is to use the "nano" command to create and edit a
text file. Use the "nano" command to create a new text file in any directory of your
choice. Then add some text to the file and save it. Finally, use the "cat" command to
display the contents of the file and verify that your changes were saved.
5. Process Management Command: Your final task is to use the "ps" and "kill" commands
to manage processes running on your system. Use the "ps" command to list all the
processes currently running on your system. Then use the "kill" command to terminate a
particular process that you choose.