0% found this document useful (0 votes)
58 views31 pages

Module 1

Uploaded by

barackwilliam12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views31 pages

Module 1

Uploaded by

barackwilliam12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

INTRODUCTION

TO LINUX/UNIX
COURSE CODE: CS 2103
MODULE ONE
EXPECTED LEARNING OUTCOMES:
• By the end of the course unit, students should be able to:

 Explain the application of Linux commands and utilities.


 Management files and folders using Linux
 Install and configure Linux operating system.
 Install and uninstall programs on a Linux environment
 Manage the computer memory resource using Linux operating system
 Configure hardware using Linux systems
History of UNIX

• 1969: UNIX was developed at Bell Labs by Ken Thompson, Dennis Ritchie,
and others. Originally created as a simple, multi-tasking, and multi-user
operating system, UNIX was designed for portability and flexibility.
• 1970s: UNIX gained traction in academic and research institutions. Its
design inspired several derivative versions, including the Berkeley Software
Distribution (BSD) and System V, both of which added important features
and utilities.
• 1980s: The UNIX System Laboratories (USL) aimed to commercialize
UNIX, leading to the fragmentation of UNIX into various proprietary
versions. During this period, the term "UNIX" became associated with a
trademark, which complicated its use.
• 1990s: The POSIX standard was developed to promote compatibility among
UNIX variants, establishing a common set of APIs. UNIX continued to be
widely used in enterprise environments, though it faced competition from
emerging operating systems.
History of Linux

• 1991: Linus Torvalds released the first version of the Linux


kernel as a free alternative to MINIX, a small UNIX-like system
used in academia. Torvalds aimed to create a free, open-source
operating system that users could modify and improve.
• 1992-1994: The Linux kernel rapidly evolved, with
contributions from developers around the world. The first Linux
distributions began to appear, such as Slackware and Debian,
making it easier for users to install and use Linux.
• 1995-2000: The open-source movement gained momentum,
with many developers and companies contributing to Linux. Red
Hat and SuSE emerged as significant players in the commercial
Linux market. Linux started being adopted in server
environments due to its stability and performance.
Benefits of Linux
• Open Source: Linux is free to use, modify, and distribute. This
transparency fosters innovation and collaboration within the global
community of developers.
• Cost-Effective: As an open-source operating system, Linux is
available without licensing fees, making it a cost-effective choice for
both individuals and organizations.
• Stability and Reliability: Linux is known for its robustness, often
running for extended periods without crashes or reboots. This
makes it an ideal choice for servers and critical applications.
• Security: Linux has a strong security architecture, with user
permissions and a regular update cycle that addresses
vulnerabilities. Its open-source nature allows for rapid identification
and patching of security issues.
• Flexibility and Customization: Users can tailor their Linux environments
extensively, choosing different desktop environments, software packages, and system
configurations to suit their needs.
• Performance: Linux is lightweight and can run on a variety of hardware, from
powerful servers to older machines, making it a versatile choice for different use
cases.
• Large Software Repository: Many Linux distributions come with extensive
repositories, allowing users to easily install, update, and manage software through
package managers.
• Strong Community Support: A vibrant community of users and developers offers
extensive documentation, forums, and support, making it easier to troubleshoot
issues and learn.
• Multi-User Capabilities: Linux supports multiple users accessing the system
simultaneously, each with their own permissions and settings, making it suitable for
collaborative environments.
• Widely Used in Servers and Supercomputers: Linux dominates the server market
and is the operating system of choice for most supercomputers, known for handling
heavy workloads efficiently.
Main Components of Linux

• Kernel:
• The core of the Linux operating system, the kernel manages hardware
resources, system processes, and communication between software and
hardware. It is responsible for memory management, process
scheduling, and device drivers.
• System Libraries:
• These are collections of pre-written code that applications use to
interact with the kernel. They provide a standard interface for
application development and execution, allowing programs to perform
system calls without needing to communicate directly with the kernel.
• System Utilities:
• Essential tools and programs that perform basic system functions,
such as file manipulation, process management, and system monitoring.
Examples include commands like cp, mv, and ls.
• Shell:
• A command-line interface (CLI) that allows users to interact with the system by entering
commands. Common shells include Bash (Bourne Again SHell), Zsh, and Fish.
• Desktop Environment:
• The graphical user interface (GUI) that provides visual elements such as windows, icons,
and menus for user interaction. Popular desktop environments include GNOME, KDE
Plasma, and XFCE.
• File System:
• The organization of data on storage devices, determining how files and directories are
stored and accessed. Linux supports various file systems, including ext4, XFS, and Btrfs.
• Package Management System:
• Tools that facilitate the installation, updating, and removal of software packages.
Examples include APT (Advanced Package Tool) for Debian-based systems and YUM/DNF
for Red Hat-based systems.
• Applications:
• User-level programs and software that perform specific tasks, ranging from productivity
tools to development environments. Linux supports a wide variety of applications, both
open-source and proprietary.
Desktop Components of Linux

• Desktop Environment:
The graphical interface that provides the overall look and feel of
the desktop, including window management, icons, and menus.
Common desktop environments include:
 GNOME
 KDE Plasma
 XFCE
 LXDE
 Cinnamon
• Window Manager:
Manages the placement and appearance of windows on the
screen. It controls how windows open, close, resize, and interact
with each other.
• File Manager:
• A graphical tool for managing files and directories, allowing users to
navigate the file system, copy, move, and delete files. Examples
include:
 Nautilus (GNOME Files)
 Dolphin (KDE)
 Thunar (XFCE)
• Panel:
• A taskbar or toolbar that displays application launchers, system
notifications, and system status (like network and battery indicators).
Panels often allow for quick access to commonly used applications.
• Application Menu:
• A menu that provides access to installed applications and system
settings, typically found in the panel or as a standalone component.
• Notification Area:
• A section of the panel that displays notifications from
applications, such as system updates, messaging apps, or
volume controls.
• System Settings:
• A control center that allows users to configure various system
and desktop environment settings, including display
preferences, user accounts, and hardware settings.
• Terminal Emulator:
• A graphical application that allows users to access the command
line interface (CLI) within the desktop environment, enabling
the execution of shell commands.
• Desktop Widgets:
• Small applications or tools that provide information or
functionality, such as clocks, weather updates, or system
monitors, often placed directly on the desktop.
• Session Manager:
• Manages user sessions, including login/logout processes and the
restoration of applications and windows upon session start.
Updating, Installing, and Removing Software in Linux

• Managing software in Linux is typically done using package


management systems, which vary depending on the distribution.
Here’s a general overview of how to update, install, and remove
software using common package managers.
• 1. Updating Software
• Debian-based Systems (e.g., Ubuntu):
• To update the list of available packages:
• sudo apt update
• To upgrade installed packages to their latest versions:
• sudo apt upgrade

• Red Hat-based Systems (e.g., Fedora, CentOS):


• To update the system and installed packages:
• sudo dnf update
• 2. Installing Software
• Debian-based Systems:
• To install a specific package:
• sudo apt install package-name
• Red Hat-based Systems:
• To install a specific package:
• sudo dnf install package-name

• Arch-based Systems:
• To install a package using pacman:
• sudo pacman -S package-name

• 3. Removing Software
• Debian-based Systems:
• To remove a package:
• sudo apt remove package-name

• To remove a package along with its configuration files:


• sudo apt purge package-name
• Red Hat-based Systems:
• To remove a package:
• sudo dnf remove package-name

• Arch-based Systems:
• To remove a package:
• sudo pacman -R package-name

• To remove a package and its dependencies that are no longer


needed:
• sudo pacman -Rns package-name
Where to Find Help and
Documentation for Linux
• Linux provides a wealth of resources for help and documentation, catering to both new
users and experienced administrators. Here are some of the most common sources:

• Man Pages:
• The built-in manual pages provide detailed documentation on commands and system
calls. To access a manual page, use the command:

• man command-name

• For example, man ls will show the manual for the ls command.
• Help Command:

• Many command-line utilities come with a built-in help option. You can
typically access this with:
• command-name --help

• For example, ls --help will display usage information for the ls command.

• Online Documentation:
• Many distributions have extensive online documentation. Popular
resources include:
• Ubuntu Documentation: help.ubuntu.com
• Arch Wiki: wiki.archlinux.org
• Debian Documentation: www.debian.org/doc
• Forums and Community Support:
• Many distributions have community forums where users can
ask questions and share solutions. Examples include:
• Ubuntu Forums: ubuntuforums.org
• Red Hat Forums: access.redhat.com
• Stack Overflow: Useful for programming-related questions.

• Books and Guides:


• There are numerous books available on Linux, covering
everything from beginner to advanced topics. Titles like "The
Linux Command Line" and "Linux Pocket Guide" are popular.
• YouTube and Video Tutorials:
• Many users create tutorials and walkthroughs on platforms like
YouTube. Searching for specific commands or topics can yield
helpful video content.
• Linux User Groups (LUGs):
• Local user groups often meet to discuss Linux and can be a
great way to connect with experienced users who can offer
assistance.
Logging In Procedures in Linux
• Logging into a Linux system can vary slightly depending on
whether you are using a graphical user interface (GUI) or a
command-line interface (CLI). Here’s an overview of both
methods:

• 1. Graphical Login
• When using a Linux distribution with a desktop environment
(like GNOME, KDE, or XFCE), the login process typically follows
these steps:
• Boot Up the System: When the computer starts, the display
manager (like GDM, LightDM, or SDDM) presents a login
screen.
• Enter Username: You will be prompted to enter your username.
Type your username and press Enter.

• Enter Password: After entering your username, you will be


prompted to enter your password. Type your password (note that it
will not be displayed for security reasons) and press Enter.

• Session Selection (Optional): Some login screens allow you to


choose which desktop environment to use. Select your preferred
environment if this option is available.

• Access the Desktop: Upon successful authentication, the desktop


environment loads, granting you access to your user account.
• 2. Command-Line Login
• When using a terminal or a non-graphical interface (like a virtual console),
the login process is slightly different:

• Boot Up the System: After the system boots, you will see a command
prompt requesting your login credentials.

• Enter Username: Type your username and press Enter.

• Enter Password: You will be prompted for your password. Type your
password and press Enter. Again, the password will not be displayed.

• Access the Shell: Upon successful login, you will be presented with a
command-line interface (shell), where you can enter commands.
• 3. Remote Login via SSH
• If you are accessing a Linux system remotely, the process
typically involves using SSH (Secure Shell):

• Open Terminal on Local Machine: Use a terminal application


on your local machine.

• Connect to the Remote Server: Enter the SSH command:


• ssh username@hostname_or_IP

• Replace username with your username and hostname_or_IP


with the server's address.
• Enter Password: After executing the command, you will be
prompted to enter your password. Type your password and
press Enter.

• Access the Shell: Once authenticated, you will have access to


the remote server’s command line.
Using the Command Line in Linux

• The command line is a powerful interface for interacting with


the Linux operating system. It allows users to execute
commands, manage files, and control system processes. Here’s
a guide on how to effectively use the command line.

• 1. Opening the Terminal


• In a GUI Environment: Look for a terminal emulator (often
called "Terminal" or "Console") in your applications menu.
• Using a Keyboard Shortcut: Common shortcuts include Ctrl
+ Alt + T in many desktop environments.
• 2. Basic Commands
• Here are some essential commands to get started:
• Navigating Directories:
 pwd – Print the current working directory.
 ls – List files and directories in the current directory.
 cd directory-name – Change to a specified directory (use cd .. to go up one
level).

• Managing Files and Directories:


 mkdir directory-name – Create a new directory.
 touch file-name – Create a new empty file.
 cp source destination – Copy files or directories.
 mv source destination – Move or rename files or directories.
 rm file-name – Remove a file (use rm -r directory-name to remove a directory
and its contents).
• Viewing File Contents:
 cat file-name – Display the contents of a file.
 less file-name – View file contents page by page.
 head file-name – Show the first few lines of a file.
 tail file-name – Show the last few lines of a file.

• Searching and Finding Files:


 find /path -name "file-name" – Search for a file by name.
 grep "search-term" file-name – Search for a specific string
within a file.
• 3. Using Command Options and Arguments
• Many commands support options and arguments to modify their
behavior. Options usually start with a dash (-) or double dash (--). For
example:

 ls -l – Lists files in long format, showing permissions and


ownership.
 rm -i file-name – Removes a file but prompts for confirmation.

• 4. Combining Commands
• You can chain commands using semicolons (;) or run commands in
the background using &. For example:
 command1; command2 – Executes command1, then command2.
 command & – Runs command in the background.
• 5. Using Pipes
• Pipes (|) allow you to use the output of one command as the
input for another. For example:

• ls -l | grep ".txt" – Lists all files and filters the results to


show only .txt files.

• 7. Exiting the Terminal


• Type exit or press Ctrl + D to close the terminal session.
THANK YOU!

You might also like