You are on page 1of 20

Introduction

Instructor: Jimmy T Mbelwa, PhD.


Introduction to System Administration
• Linux system administrator: can be anyone who has “root” access —
anyone who has root access is the system’s “superuser.”
• System administrator duties:
• Installing and configuring servers
• Installing and configuring application software
• Creating and maintaining user accounts
• Backup and restoring files
• Monitoring and tuning performance
• Using tools to monitor security
Unix
• Unix is a multi-user, multi-tasking operating system.
• You can have many users logged into a system simultaneously, each
running many programs.
• It's the kernel's job to keep each process and user separate and to
regulate access to system hardware, including cpu, memory, disk and
other I/O devices.
History of Unix
• UNIX: 1969 Thompson & Ritchie AT&T Bell Labs.
• BSD: 1978 Berkeley Software Distribution.
• Commercial Vendors: Sun, HP, IBM, SGI, DEC.
• GNU: 1984 Richard Stallman, FSF.
• POSIX: 1986 IEEE Portable Operating System unIX.
• Minix: 1987 Andy Tannenbaum.
• SVR4: 1989 AT&T and Sun.
• Linux: 1991 Linus Torvalds Intel 386 (i386).
• Open Source: GPL.
What is a Linux?
• Linux is a free Unix-type operating system originally created by Linus
Torvalds with the assistance of developers around the world.
• It originated in 1991 as a personal project of Linus Torvalds, a Finnish
graduate student.
• The Kernel version 1.0 was released in 1994 and today the most
recent stable version is 4.19.2
• Developed under the GNU General Public License , the source code
for Linux is freely available to everyone.
Basic Concepts

• Unix Structure
Basic Concepts
• Operating system:
• To denote the entire package consisting of the central software managing a
computer’s resources and all of the accompanying standard software tools,
such as command-line interpreters, graphical user interfaces, file utilities, and
editors.
• More narrowly, to refer to the central software that manages and allocates
computer resources (i.e., the CPU, RAM, and devices).
• Kernel: refer to the central software that manages and allocates computer
resources (i.e., the CPU, RAM, and devices).
• Kernel tasks: process scheduling (multi-tasking), memory management, provision
of file system, creation and termination of the process, access to device,
networking, provision of system call API (system calls)
Basic Concepts
• Kernel mode and user mode
• A shell: is a special-purpose program designed to read commands typed by a user and execute appropriate programs
(command interpreter) in response to those commands.
• Bourne shell (sh): This is the oldest of the widely used shells C shell (csh): The C several useful interactive features
unavailable in the Bourne shell, including command history, command-line editing, job control, and aliases.
• The C shell was not backward compatible with the Bourne shell. Although the standard interactive shell on BSD was
the C shell, shell scripts (described in a moment) were usually written for the Bourne shell, so as to be portable
across all UNIX implementations.
• Korn shell (ksh): This shell was written as the successor to the Bourne shell maintaining backward compatibility with
the Bourne shell, it also incorporated interactive features similar to those provided by the C shell.
• Bourne again shell (bash): This shell is the GNU project’s reimplementation of the Bourne shell. It supplies interactive
features similar to those available in the C and Korn shells
• User and Groups
• Every user of the system has a unique login name (username) and a corresponding numeric user ID (UID).
• For administrative purposes—in particular, for controlling access to files and other system resources— it useful to
organize users in groups
• Superuser: special privileges within the system.
Basic Concepts
• Single Directory Hierarchy, Directories, Links, and Files
• The kernel maintains a single hierarchical directory structure to organize all files in the system.
• root directory, named / (slash).
• Hierarchical file structure
Basic Concepts-Single Directory Hierarchy,
Directories, Links, and Files
• File types: regular and plain
• Directory and Links: A directory is a special file whose contents take the form of a table of filenames coupled
with references to the corresponding files; This filename-plus-reference association is called a link, and files
may have multiple links, and thus multiple names, in the same or in different directories.
• Every directory contains at least two entries: . (dot), which is a link to the directory itself, and .. (dot-dot),
which is a link to its parent directory, the directory above it in the hierarchy. Every directory, except the root
directory, has a parent.
• Symbolic links: Like a normal link, a symbolic link provides an alternative name for a file.
• Filenames: On most Linux file systems, filenames can be up to 255 characters long
• Pathnames: A pathname is a string consisting of an optional initial slash (/) followed by a series of filenames
separated by slashes.
• Current working directory: Each process has a current working directory (sometimes just referred to as the
process’s working directory or current directory).
• File ownership and permissions: Each file has an associated user ID and group ID that define the owner of
the file and the group to which it belongs. The ownership of a file is used to determine the access rights
available to users of the file.
Basic Concepts-Single Directory Hierarchy,
Directories, Links, and Files
• The ancestor of all directories on the system; all other directories are subdirectories of this
directory, either directly or through other subdirectories.
• /bin Essential tools and other programs (or binaries).
• /dev Files representing the system's various hardware devices. For example, you use the file
`/dev/cdrom' to access the CD−ROM drive.
• /etc Miscellaneous system configuration files, startup files, etc.
• /home The home directories for all of the system's users.
• /lib Essential system library files used by tools in `/bin’.
• /proc Files that give information about current system processes.
• /root The superuser's home directory, whose username is root. (In the past, the home
directory for the superuser was simply `/'; later, `/root' was adopted for this purpose to
reduce clutter in `/’.)
• /sbin Essential system administrator tools, or system binaries.
• /tmp Temporary files.
• /usr Subdirectories with files related to user tools and applications.
Basic Concepts
• Access permission
• There are three permissions for any file, directory or application program.
• The following lists the symbols used to denote each, along with a brief description : r — read a file, w —
write to a file and x — execute the file.
• Each of the three permissions are assigned to three defined categories of users.
• The categories are: owner — The owner of the file or application, group — The group that owns the file
or application and others — All users with access to the system.
• One can easily view the permissions for a file by invoking a long format listing using the command ls -l.
• For instance, if the user juan creates an executable file named test, the output of the command ls -l test
would look like this:
• -rwxrwxr-x 1 juan student 0 Sep 26 12:25 test
• The permissions for this file are listed are listed at the start of the line, starting with rwx.
• This first set of symbols define owner access; The next set of rwx symbols define group access and The last
set of symbols defining access permitted for all other users.
Basic Concepts
• Listing files
• You are back at the mysequences directory under your home directory. Your instructor asked
you to list the files in the directory:
• georgios@biotin ~/mysequences $ ls
• seqdocs v2.3_admin.pdf xlrhodop.fasta
• georgios@biotin ~/mysequences $
• The ls command lists all the directory contents and is
• the equivalent of the dir command in DOS/Windows
• Locating files in the directory tree
• find [starting point] -name filename -print
• 'starting point' indicates the directory tree position that we wish to start searching.
'Filename' could be an approximation of the file name
Basic Concepts
• File permissions
• The ownership of the file or directory can be changed using the command
chown <owner> <file/directory name>
• The group of the file or directory can be changed using the command
chgrp <group> <file/directory name>
• The permissions of the file can be changed using chmod command
chmod -R ### <filename or directory>
• -R is optional and when used with directories will traverse all the sub-directories of the target directory
changing ALL the permissions to ###.
• The #'s can be:
0 = Nothing
1 = Execute
2 = Write
3 = Execute & Write (2 + 1)
4 = Read
5 = Execute & Read (4 + 1)
6 = Read & Write (4 + 2)
7 = Execute & Read & Write (4 + 2 + 1
Basic Concepts
• Moving directories
• cd try_it
Changes the directory to try_it pwd
Prints present working directory (e.g. /home/smith/try_it)
• cd .. Move to superior directory
pwd : Prints /home/smith
• cd /home The absolute path
pwd : Prints /home
• cd The system is returned to the user home directory
pwd : Print /home/smith
• Make a directory
• The command mkdir my_dir : makes new directory my_dir (the path is given relative) as a subdirectory
of the current directory
• Remove a directory
• The command rmdir your_dir removes directory your_dir if it is empty
Basic Linux Concepts
• Copy File
• The command cp file_1 file_2
• copies file_1 to file_2. The both files must be in the same working directory. If they are in various
directories, the path must be given.
• Rename and/or Move the File
• The command mv file_1 file_2
moves file_1 to file_2
• The both files must be in the same working directory.
• If they are in different directories, the path must be given.
• The file_1 is removed from the disk.
• Remove the file
• The command rm file_a removes the file_a from the system
• If you use wildcard. For example
rm h*c you will remove all files beginning with h and ending with c which are in working directory.
• If you write rm * you will erase all files from your working directory.
Selecting and Installing Linux Systems
• Why Should I choose Linux?
• Best price/performance ratio
• Reliable
• User friendly
• Ubiquitous (from your mobile phone to a supercomputer)
• Scientific software is developed mostly in Linux today.
• Linux distributions
• Often referred to as 'distros'.
• The Linux kernel with a set of programs/applications (text editors, compilers, office suites, web
browsers, etc) that make the
• system usable.
• Slackware was one of the first Linux distributions.
• Debian, RedHat (Fedora, RHEL) and Canonical (Ubuntu) are some of the most popular ones today.
Selecting and Installing Linux Systems
• Distros
• Generic distros:
• Redhat based: Fedora, RHEL, CentOS, Scientific Linux
• Debian based: Debian, Ubuntu
• Or task-specific ones (tailored distributions):
• BioLinux
• BioKnoppix
• BioSLAX
• And many others
Selecting and Installing Linux Systems
• How to choose a Linux distro
• Try more than one to get a feeling.
• What do your colleagues/team members use?
• Do the package repositories have the applications you wish to use?
• How long the distro authors will keep maintaining it?
• Do you have a less common laptop/desktop that might have hardware
compatibility problems with that distro? (rare but it happens)
Selecting and Installing Linux Systems
• Interacting with Linux
• Using it via a Graphical User Interface (GUI) (aka Like Windows/Mac, your
smartphone/tablet) Using it via the command line (like the
• PowerShell on Windows, or your Terminal window on your Mac)
• Pros and cons in each approach
• How to install Linux?
• Without affecting your current computer setup:
• Use a Live CD (boot your computer from it)
• Do a full installation of Linux on a virtual machine
• Links to distro Live CDs:
• http://fedoraproject.org/wiki/FedoraLiveCD
• http://www.debian.org/CD/live/
• Link to a video (install a Linux OS on Windows using VirtualBox):
• https://www.youtube.com/watch?v=7jOnscRjaFs

You might also like