SlideShare ist ein Scribd-Unternehmen logo
1 von 60
UNIX/LINUX 
TRAINING 
Michael Olafusi 
+234-808-938-2423
DAY 1 – INTRODUCTION & INSTALLATION 
DAY 2 – LINUX DESKTOPS & ADMINISTRATION 
DAY 3 – LINUX CLI ADMINISTRATION 
DAY 4 – LINUX NETWORKING & INTERNET 
DAY 5 – LINUX SERVER & PROGRAMMING
Introducing 
UNIX/Linux
Linux and UNIX 
• Linux is an open-source clone of UNIX, the most secure 
and mature operating system. 
• The major difference between Linux and UNIX is that UNIX 
is trademarked to The Open Group, while Linux is Open-source. 
• All command line tools work the same on both. 
• Over 90% of the supercomputers in the world run Linux. 
And the 10 fastest run Linux. 
• Linux is the leading operating system on Servers 
• Linux is free and popular distributions (distros) are 
Ubuntu, Fedora/Red Hat, OpenSUSE, Mandriva, Mint, 
ArchLinux, Slackware…
Benefits of UNIX/Linux 
• Low cost and very stable (some Linux servers are 
not rebooted for over a year, try that with 
Windows server!). 
• Best multi-user, multitasking OS. 
• Most secure OS. Hence, it’s popularity as a 
server OS. 
• Best computing power and inbuilt network 
support 
• Fastest developing OS, with the most number of 
developers.
Linux Distributions 
• A Linux distribution consists of the Linux kernel (actual 
OS) and a collection of applications 
– Linux Kernel 
– X Window System 
– Graphical Desktops (GNOME, KDE…) 
– Applications 
• GNU Software is at the heart of every Linux. Besides 
the Linux Kernel, GNU software/utilities come next 
• GNOME and KDE are the most popular graphical 
desktops 
• Ubuntu, Mandriva, OpenSUSE, RoboLinux, Slackware, 
Xandros, Debian GNU, Fedora, Gentoo, Knoppix, 
Linspire
Linux 
Installation
Linux Installation 
• Similar installation process across all distros 
• Live CDs, to try the Linux without installing 
• Setting aside Space for Linux – Root folder, 
Home folder & Swap space 
• Most secure OS. Hence, it’s popularity as a 
server OS. 
• Burning the Linux ISO image on DVD or making a 
Bootable Flash Drive 
• Doing the actual installation (Ubuntu as sample)
Linux Installation 
• Best Practice requires the following on separate partitions 
– Swap 
– / 
– / boot 
– /home 
– /usr 
– /opt 
– /var 
• This type of partitioning scheme comes in handy when you have problem 
with your hard disk 
• Swap partition is used to boost your computer memory and some 
applications require it, even the hibernate feature on Linux requires it. 
Rule of Thumb is to set at 2x the RAM
Installing Ubuntu
Installing Ubuntu – Beginning
Installing Ubuntu – Linux File system
Installing Ubuntu – Creating Account
Installing Ubuntu - Completed
Linux 
Desktops
Linux Desktops 
• The most common Desktops are GNOME and 
KDE (just cosmetic differences and default 
programs) 
• Popular GNOME distros are Ubuntu & Fedora 
• Popular KDE distros are Kubuntu & OpenSUSE 
• Opening the Terminal Windows and 6 Virtual 
Consoles 
• Navigating the Linux File System 
• Linux Applications
Linux File System
Linux File Types 
• Ordinary files: These are regular files. (white/black) 
• Directories: These are files that contains other files and directories, and provide 
pointers to them. (blue) 
• Symbolic links: These special files link to another file, in a different location. 
(Cyan) 
• Block and character device files: All physical devices in Linux are represented by 
device files. e.g. /dev/sda (yellow) 
• Socket file: Provides protected inter-process networking. (Purple) 
• Named Pipe file: Like socket files but doesn’t use network socket semantics. 
(Red) 
• $ ls –l indicates all these types 
– -rw-r--r-- ordinary file 
– brw-rw---- block device file 
– crw-rw-rw- character device file 
– drwxr-xr-x directory file 
– lrwxrwxrwx symbolic file 
– srw-rw-rw- socket file 
– prw-rw-rw- named pipe file
Linux/Unix 
Administration
Linux Administration 
• Linux has become extremely easy to administer, 
compared to its early days. And can be administered 
using GUI applications (like Windows OS) or using the 
Commandline Interface (CLI) 
• As a professional Linux administrator, you’ll have to 
know how to administer the OS via the CLI 
• Linux supports multi-tasking, several users using the OS 
simultaneously. 
• By default 7 users can work simultaneously (without 
anyone logging out). 6 Commandline users and 1 GUI 
user. To switch use CTRL + ALT + F1 (F2,F3,F4,F5,F6,F7) . 
CTRL+ALT+F7 takes you to the GUI one 
• From the GUI, you can always access the commandline 
via “Terminal”
Linux Administration
Linux – User Administration 
• To show the Linux distro version: $ cat /proc/version 
• To see Linux kernel version: $ uname –r 
• To add new user: #useradd michael 
• To view the default useradd options: # useradd –D 
• The options are: 
– -g Group 
– -m Home directory 
– -f Inactive (to set password expiry date in days) 
– -e Expire (to disable the user after specified number of 
days) 
– -s Shell (user’s default login shell, usually /bin/sh) 
• To delete a user: # userdel –r michael
Linux – CLI Key Combination 
• Ctrl + A to mover the cursor to the beginning of 
command line 
• Ctrl + C to end a running program and return the 
prompt 
• Ctrl + D to log out of the current shell session, same as 
exit or logout 
• Ctrl + E to move cursor to the end of the command line 
• Ctrl + H to generate backspace character 
• Ctrl + L to clear the terminal 
• Ctrl + R to search command history 
• Ctrl + Z to suspend a program 
• Shift + PageUp or PageDown to scroll (browse buffer) 
• Tab to autocomplete command of filename 
• Tab Tab to show command completion possibilities
Linux CLI useful tips 
• If you can’t remember a command but remember the first 2 
or more letters, type them and press Tab twice. This will list 
all the commands that start with those letters. 
• If you can’t remember how to use a particular command, 
type man command e.g. man mkdir to read a comprehensive 
help file on using the command, mkdir. 
• If you need a quick help with using the options or syntax of a 
command, type command --help (double hypen). e.g. mkdir - 
-help to get a quick help guide. 
• To get an easy to read manual (easier than man) on any 
command, type info command e.g. info mkdir 
• To get a short description of what a command does, type 
whatis command e.g. whatis mkdir 
• To get a list of commands for doing a particular task, type 
apropos task e.g. apropos text to get text manipulation 
commands/applications
Linux CLI text manipulation 
• Use cat file.txt to display the content of file.txt on the 
screen 
• Use cat file.txt | more to display the content of file.txt 
one page at a time 
• Use cat file.txt | less to enable scrolling. Press q to 
exit/end. 
• Use tac file.txt to display the content of file.txt in 
reverse 
• Use cat file1.txt > file2.txt to copy content of file1 to 
file2, file duplication. 
• Use cat file1.txt >> file2.txt to append content of file1 
to file2. 
• Use tail -10 file.txt to display the last 10 lines in file.txt 
• Use head -10 file.txt to display the first 10 lines in 
file.txt
Linux CLI file permission 
• All files in Linux have permissions set (or unset) for user, group and other 
users. It’s indicated as –rwxrwxrwx or similar. 
• To display a file’s permission settings, type ls -l filename 
• The first character indicates the file type – ordinary file, directory… 
• The next 3 characters indicate the permission for the file owner (user), 
then next 3 for users in the owner’s group and the last 3 for other users. 
• r = Read w = Write x = Execute 
• Easiest way to change a file’s permission is to use chmod u/g/a +/- rwx 
filename e.g. chmod a+w file.txt to give everyone write permission on 
the file, file.txt 
• You can also use numeric arguments and common ones are – 
– chmod 400 to give only read permission to owner 
– chmod 600 to give read and write permission to owner 
– chmod 644 to give everyone read permission and the owner write permission 
– chmod 775 to give everyone read + execute, owner + group read write execute 
permission 
– chmod 777 to give everyone read write exceute permission
Linux CLI execution modes 
• By default any command you run in the command line terminal 
runs in the foreground, and locks that particular terminal session 
till it finishes executing. 
• You can also make commands run in the background, so they 
don’t lock the terminal session and you can start other commands 
while they are still running. 
• To run a command in the background, type the symbol & after the 
command (put a space in between) 
• Only run commands that do not require user interaction in the 
background. 
• Type and execute jobs to show commands running in the 
background 
• Whenever you run a command in the background, it is assigned a 
process number, n. To refer to this (command execution) process, 
use %n. 
• To move a command process to the foreground, type fg %n (n is 
the command process number)
Linux Administration - Performance 
• To a user, performance means quick execution of 
commands, while to a system administrator, it 
means ability to do much more. As the 
Administrator, you’ll have to optimize system 
performance for the whole system – users, 
programs and services. 
• Issues that can impair performance are – 
– programs that are not optimized for the system 
– problem with access to disks, controllers, display, other 
required interfaces 
– network issues affecting communication with out systems 
– amount of users working simultaneously on the system
Linux Administration - Scheduling 
• There are times you will want a command or script 
to run at a particular time of the day or run while 
you are at lunch break. 
• Basically, there are three types of scheduling – 
– Using sleep to wait fore specified seconds before running 
the command. e.g. lp file1; sleep 900; lp file2; sleep 900; 
lp file3 (this is to insert 15mins between each file print, to 
allow other users print in between) 
– Using at command to run a command at a specified time. 
– Using cron to schedule a command or script on a 
monthly, weekly, daily or hourly basis
Linux Administration – Output Redirection 
• Piping the output to another command using | 
• Redirecting output via > 
• Redirecting output via >> (to append) 
• Redirecting only errors via 2> 
• Redirecting standard input via < 
• Use tee option with | (pipe) to copy input to 
standard output (terminal) and more than one 
output files. e.g. cat original | tee copy1 copy2 
• Use tee –a to append to files. e.g. cat file.txt | tee -a 
file_all.txt
Linux Administration – Output Manipulation 
• Grep: It scans output line per line, searching for 
matching patterns. 
– All lines containing the pattern will be printed to standard 
output. e.g. cat countriesandcapitals.txt | grep Nigeria 
– This can be reversed using the –v option. 
• Sort: It allows you to sort the output lines before 
displaying. 
– Default is in alphabetical order. e.g. cat alphabets | sort 
– It can also sort by file size, when sorting ls output. e.g. ls 
~/ -la | sort -nk 5 
– And when used with uniq, it can sort and filter out double 
entries. e.g. sort itemlist | uniq
Linux Administration – Vi(m) Editor 
• vi editor is a very powerful text editor that comes pre-installed 
on nearly all Linux OS. 
• vim is variant of vi editor, basically an improved version. 
Practically, it is more error tolerant than vi. 
• There are two modes – 
– Command mode, which is the default mode. You basically 
scroll through the file content or enter commands. 
• h moves the cursor to the left, 
• l moves it to the right, 
• k to move up, and 
• j to move down 
• dd will delete current line 
• :w to save (write) the changes made 
• :q will exit the editor 
• :q! will exit the editor without saving changes
Linux Administration – Vi(m) Editor contd 
– Text input mode. You enter this mode by pressing the 
Insert key. There are some basic guidelines to note - 
• don’t attempt to scroll or change the cursor position in this 
mode, position the cursor where you want to add extra text 
before changing to the text input mode. The only exception is 
when you are using vim. 
• To change to this mode pressing - 
– a will append, move the cursor one position to the right before 
switching to the inserting mode 
– i will insert 
– o will insert a blank line under the current cursor position and 
move the cursor to that line 
• Vim is better, just not as pre-installed on Linux OSs 
as Vi. 
• Run vimtutor to start a recommended 30 minutes 
tutorial on using vim.
Linux Administration - Commands 
man any_command <To view the manual for target command> 
pwd <Print current working directory> 
ls <Show files in current directory> 
ls –a <Show maximum information about all files, including hidden> 
mv source destination <Move/rename a file or directory> 
rm target <Delete target, could be file or directory> 
cp source destination <Copy file or directory> 
mount /dev/device_name /media/device_name <Mount filesytem> 
umount /media/device_name <Unmount> 
df –h <display all mounted filesystem and available disk space in KB, MB, 
GB> 
du <display disk usage, very useful for routine maintenance> 
ps – ef <List all running processes, with full details> 
top <Standard system monitor showing a more extensive view of all 
processes and system resources> 
nohup command & <Start a process in the background and have it keep 
running after you log off> 
~/ <Current user's home directory> 
ifconfig <Configure network interfaces> 
iwconfig <Configure wireless network interfaces>
Linux Administration - Commands 
ssh username@ip_address <Connect to a remote server> 
ping ip_address <Check to see if target is online and responding> 
traceroute6 ip_address <View network route to target> 
netstat <Network Monitor> 
iptables –L <View firewall rules> 
adduser <Create a new user> 
usermod <Change user privileges (be very careful with this one)> 
deluser <Delete user> 
chmod <# Change privileges over file or directory > 
chown user_name:group_name directory_name <Change owner of a file or 
directory> 
su username <Temporarily become a different user> 
users <Print usernames of logged in users> 
Infact, you can administer your mysql database directly from the CLI 
CREATE DATABASE databasename; <New database> 
CREATE USER username@localhost IDENTIFIED BY 'password'; <Create a 
new user> 
show tables; <Show database schema>
Unix Command 
Utilities
UNIX Utilities/Commands 
awk Processes files 
cat Displays files (and is used with other tools to 
concatenate files) 
cmp Compares two files 
comm Compares sorted files, and shows differences 
cp Copies files 
cpio Copies and backs up files to an archive 
cut Selects characters or fields from input lines 
dd Copies and converts input records 
diff Compares two text files, and shows differences 
dump Backs up files 
fdformat Formats a floppy disk at a low level 
file Displays the file type 
find Finds files within file tree 
fmt Formats text very simply 
grep Matches patterns in a file 
groff Processes embedded text formatting codes
UNIX Utilities/Commands 
gzip Compresses or decompresses files 
head Displays the first part of a file (first 10 lines by default) 
ispell Checks one or more files for spelling errors 
less Displays files allowing for scrolling forward and 
backward (pauses when screen is full) 
ln Creates a link to a file 
lpr Sends a file to a printer or printer device 
ls Lists file and directory names and attributes 
man Displays documentation for commands 
mkbootdisk Creates a CD (or floppy disk on older distributions) 
from which to boot a system 
mkdir Creates a new directory 
mkfs Builds a UNIX/Linux file system 
mount Mounts file systems and devices 
mv Renames and moves files and directories 
newfs Creates a new file system (used in UNIX systems in 
particular)
UNIX Utilities/Commands 
pr Formats text files for printing and displays them 
pwd Shows the directory you are in 
rdev Queries or sets the root image device 
restore Restores files (from a dump) 
rm Removes files 
rmdir Removes directories 
sed Edits streams (noninteractive) 
sort Sorts or merges files 
tail Displays the last lines of files (last 10 lines by default) 
tar Copies and backs up files to a tape archive 
touch Changes file modification dates 
uniq Displays unique lines of a sorted file 
wc Counts lines, words, and bytes 
whereis Locates information about a specific file
UNIX Utilities/Commands 
pr Formats text files for printing and displays them 
pwd Shows the directory you are in 
rdev Queries or sets the root image device 
restore Restores files (from a dump) 
rm Removes files 
rmdir Removes directories 
sed Edits streams (non-interactive) 
sort Sorts or merges files 
tail Displays the last lines of files (last 10 lines by default) 
tar Copies and backs up files to a tape archive 
touch Changes file modification dates 
uniq Displays unique lines of a sorted file 
wc Counts lines, words, and bytes 
whereis Locates information about a specific file
UNIX Utilities/Commands 
date Sets and displays date and time 
df Displays the amount of free space remaining on disk 
du Summarizes file space usage 
file Determines file type 
finger Displays detailed information about users who are logged in 
free Displays amount of free and used memory in the system 
edquota Displays user disk quotas and enables them to be changed 
kill Terminates a running process 
ps Displays process status by process identification number and 
name 
sleep Suspends process execution for a specified time 
top Dynamically displays the status of processes in real time 
uname Shows information about the operating system 
vmstat Shows information about virtual memory use 
w Displays detailed information about the users who are l 
ogged in 
who Displays brief information about the users who are logged in
UNIX Utilities/Commands 
tp Transfers files over a network 
ifconfig Sets up a network interface 
netstat Shows network connection information 
nfsstat Shows statistics for Network File 
ping Polls another network station (using TCP/IP); great for a fast 
determination about whether your network connection is 
working 
rcp Remotely copies a file from a network computer 
rlogin Logs in to a remote computer 
route Displays routing table information, and can be used to 
configure routing 
rsh Executes commands on a remote computer 
showmount Lists clients that have mounted volumes on a server 
telnet Connects to a remote computer on a network 
traceroute Shows the route along a network between the source device 
and the destination, such as from a computer to a server 
wvdial Controls a modem dialer for dial-up connections over a phone 
line
LINUX in a Network 
• Linux has the most robust networking tools and support 
• All the possible means of connecting to the internet 
work on Linux 
– Digital Subscriber Line (DSL) 
– Cable Modem 
– Dial-up Networking 
– Wireless Internet access points 
• Works seamlessly in a Local Area Network and has 
inbuilt security tools 
• Configurable network management files/tools, located 
in the /etc directory. 
• An arsenal of Network troubleshooting tools
LINUX – Network Configuration 
• Linux network configuration files are – 
– /etc/hosts This contains addresses of hosts that can be 
contacted without using an external naming service like 
DNS. It always contains 127.0.0.1 
– /etc/resolv.conf This file configures access to a DNS 
server. It contains your domain name and the name 
server(s) to contact 
– /etc/nsswitch.conf This file defines the order in which to 
contact different name services. 
• Linux Network configuration commands include – 
– ifconfig to display and configure the network interfaces 
– ip is a newer and better command. Sample use include ip 
addr show and ip route show
LINUX – Network Troubleshooting 
• Linux network commands are – 
– host to display information on hosts or domains. e.g. host 
www.telemit.com 
– ping to check if a host is alive. You can interrupt by 
pressing Ctrl+C 
– traceroute to check the route that packets follow to a 
network host. e.g. traceroute www.telemit.com 
– whois to lookup a specific domain information 
• In addition you can install several network 
troubleshooting and optimizing tools for free on 
Linux.
Linux Internet
LINUX and your Internet needs 
• Mozilla Firefox, Konqueror, Epiphany, Chromium and 
Opera Browser to access the web 
• Mozilla Thunderbird, Evolution, Zimbra, kontact and 
Kmail to do exactly what Outlook does 
• Graphical FTP clients like gFTP, KFTPGrabber and 
even Firefox, in addition to the commandline tool 
FTP 
• Linux can be configured as a Mail server, web server, 
FTP server, call manager, CMS server or Database 
server. And all without buying a complex expensive 
software.
Linux Security
Linux Security - Security Framework 
• Determine security requirements 
• Perform risk assessments 
• Establish a security policy 
• Implement a robust software + hardware 
security solution 
• Continuously monitor and manage the 
security solution
Linux Security – Security Threats 
• Denial of Service attacks 
• Unauthorized Access 
• Unauthorized release of confidential 
information 
• Configuration loopholes 
• Network loopholes
Linux Security – Security Solutions 
• Authentication 
• Access Control 
• Encryption 
• Password policies 
• Firewalls 
• Physical security of all hardware and data 
• Intrusion Prevention systems 
• Intrusion detection systems
Linux Servers
Linux Servers 
• Web server 
• FTP server 
• Mail server 
• DNS server 
• InterNetNews (INN) server 
• DB Server 
• SIP Server
Linux Servers – File sharing 
• Network File System 
– For sharing files with other Linux/UNIX systems (or PCs 
with NFS client software) 
• Samba 
– For file sharing and print sharing Windows systems
Linux 
Programming
Linux Programming 
• Linux comes with software development 
tools pre-installed 
• Compiling source code applications 
• Shell Scripting 
– Most powerful tool of a Linux administrator 
– Used to automate routine administrative tasks 
– Used to monitor system performance and vital directories 
(especially database directories for enough free space) 
– Makes administration of lots of computers extremely 
easy and less error-prone
Linux Programming – Shell Scripting 
• Bash shell scripts are the most used 
• A simple shell script is 
#!/bin/bash 
clear 
echo "Good morning, world.“ 
# save it as morning in any folder of choice e.g. ~/Documents 
# to run the script give it the executable file permission 
# using chmod 755 ~/Documents/morning 
# to run the script, type ~/Documents/morning
Additional Online Resources 
• Introduction to Linux 
http://tille.garrels.be/training/tldp/index.html 
• Linux Newbie Administration Guide 
http://lnag.sourceforge.net/downloads/LinuxNe 
wbieAdministratorGuide.pdf 
• Bash Guide for Beginners 
http://tille.garrels.be/training/bash/ 
• Ubuntu Pocket Guide & Reference 
http://ubuntupocketguide.com/download_main 
.html
INTERESTED?
CALL: +234-808-938-2423 
E-MAIL: MICHAEL@OLAFUSIMICHAEL.COM

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Linux week 2
Linux week 2Linux week 2
Linux week 2
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-service
 
Linux
LinuxLinux
Linux
 
Linux
Linux Linux
Linux
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
cisco
ciscocisco
cisco
 
3. intro
3. intro3. intro
3. intro
 
Linux Command Suumary
Linux Command SuumaryLinux Command Suumary
Linux Command Suumary
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Linux Training Workshop
Linux Training WorkshopLinux Training Workshop
Linux Training Workshop
 
Some basic unix commands
Some basic unix commandsSome basic unix commands
Some basic unix commands
 
Introduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics WorkshopIntroduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics Workshop
 
Linux.ppt
Linux.ppt Linux.ppt
Linux.ppt
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 
Linux in Urdu
 Linux in Urdu  Linux in Urdu
Linux in Urdu
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
 
Linux basic commands tutorial
Linux basic commands tutorialLinux basic commands tutorial
Linux basic commands tutorial
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
 

Andere mochten auch

Andere mochten auch (15)

Bs botany -3rd (e) 3058 biosoft 1
Bs  botany -3rd (e) 3058 biosoft 1Bs  botany -3rd (e) 3058 biosoft 1
Bs botany -3rd (e) 3058 biosoft 1
 
Colono seguro
Colono seguroColono seguro
Colono seguro
 
Fenahoven
FenahovenFenahoven
Fenahoven
 
Sistem gerak pada manusia
Sistem gerak pada manusia Sistem gerak pada manusia
Sistem gerak pada manusia
 
Colono Seguro
Colono Seguro Colono Seguro
Colono Seguro
 
Análisis edificio-rectoría
Análisis edificio-rectoríaAnálisis edificio-rectoría
Análisis edificio-rectoría
 
defense_PPT
defense_PPTdefense_PPT
defense_PPT
 
WDDay
WDDayWDDay
WDDay
 
Puentes, resistencias, inductancias, capacitancias
Puentes, resistencias, inductancias, capacitanciasPuentes, resistencias, inductancias, capacitancias
Puentes, resistencias, inductancias, capacitancias
 
Tư Tưởng Hồ Chí Minh về văn hóa
Tư Tưởng Hồ Chí Minh về văn hóaTư Tưởng Hồ Chí Minh về văn hóa
Tư Tưởng Hồ Chí Minh về văn hóa
 
Contracts
ContractsContracts
Contracts
 
trò chơi đoán tranh
trò chơi đoán tranhtrò chơi đoán tranh
trò chơi đoán tranh
 
chương 4 - TCP/IP - mạng máy tính
chương 4 - TCP/IP - mạng máy tínhchương 4 - TCP/IP - mạng máy tính
chương 4 - TCP/IP - mạng máy tính
 
Polio
PolioPolio
Polio
 
Brain tumor
Brain tumorBrain tumor
Brain tumor
 

Ähnlich wie Linuxtraining 130710022121-phpapp01

Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxRajesh Kumar
 
Online Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadOnline Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadRavikumar Nandigam
 
PowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPriyadarshini648418
 
ITCP PRACTICAL-1.pptx
ITCP PRACTICAL-1.pptxITCP PRACTICAL-1.pptx
ITCP PRACTICAL-1.pptxHemantJadhao3
 
Linux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsLinux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsQUONTRASOLUTIONS
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfIxtiyorTeshaboyev
 
How to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MNHow to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MNGene Kartavtsev
 
INTRODUCTION TO LINUX
INTRODUCTION TO LINUXINTRODUCTION TO LINUX
INTRODUCTION TO LINUXhafees4
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginnersNitesh Nayal
 
Presentation for RHCE in linux
Presentation  for  RHCE in linux Presentation  for  RHCE in linux
Presentation for RHCE in linux Kuldeep Tiwari
 

Ähnlich wie Linuxtraining 130710022121-phpapp01 (20)

redhat_by_Cbitss.ppt
redhat_by_Cbitss.pptredhat_by_Cbitss.ppt
redhat_by_Cbitss.ppt
 
Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptx
 
Online Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadOnline Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in Hyderabad
 
Linux
LinuxLinux
Linux
 
PowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programming
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
Daemons
DaemonsDaemons
Daemons
 
LinuxCommands (1).pdf
LinuxCommands (1).pdfLinuxCommands (1).pdf
LinuxCommands (1).pdf
 
Linux Basics.pptx
Linux Basics.pptxLinux Basics.pptx
Linux Basics.pptx
 
Linux introduction (eng)
Linux introduction (eng)Linux introduction (eng)
Linux introduction (eng)
 
ITCP PRACTICAL-1.pptx
ITCP PRACTICAL-1.pptxITCP PRACTICAL-1.pptx
ITCP PRACTICAL-1.pptx
 
Linux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsLinux operating system by Quontra Solutions
Linux operating system by Quontra Solutions
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdf
 
Linux basic
Linux basicLinux basic
Linux basic
 
How to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MNHow to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MN
 
INTRODUCTION TO LINUX
INTRODUCTION TO LINUXINTRODUCTION TO LINUX
INTRODUCTION TO LINUX
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Unix cmc
Unix cmcUnix cmc
Unix cmc
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginners
 
Presentation for RHCE in linux
Presentation  for  RHCE in linux Presentation  for  RHCE in linux
Presentation for RHCE in linux
 

Kürzlich hochgeladen

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Linuxtraining 130710022121-phpapp01

  • 1. UNIX/LINUX TRAINING Michael Olafusi +234-808-938-2423
  • 2. DAY 1 – INTRODUCTION & INSTALLATION DAY 2 – LINUX DESKTOPS & ADMINISTRATION DAY 3 – LINUX CLI ADMINISTRATION DAY 4 – LINUX NETWORKING & INTERNET DAY 5 – LINUX SERVER & PROGRAMMING
  • 4. Linux and UNIX • Linux is an open-source clone of UNIX, the most secure and mature operating system. • The major difference between Linux and UNIX is that UNIX is trademarked to The Open Group, while Linux is Open-source. • All command line tools work the same on both. • Over 90% of the supercomputers in the world run Linux. And the 10 fastest run Linux. • Linux is the leading operating system on Servers • Linux is free and popular distributions (distros) are Ubuntu, Fedora/Red Hat, OpenSUSE, Mandriva, Mint, ArchLinux, Slackware…
  • 5. Benefits of UNIX/Linux • Low cost and very stable (some Linux servers are not rebooted for over a year, try that with Windows server!). • Best multi-user, multitasking OS. • Most secure OS. Hence, it’s popularity as a server OS. • Best computing power and inbuilt network support • Fastest developing OS, with the most number of developers.
  • 6. Linux Distributions • A Linux distribution consists of the Linux kernel (actual OS) and a collection of applications – Linux Kernel – X Window System – Graphical Desktops (GNOME, KDE…) – Applications • GNU Software is at the heart of every Linux. Besides the Linux Kernel, GNU software/utilities come next • GNOME and KDE are the most popular graphical desktops • Ubuntu, Mandriva, OpenSUSE, RoboLinux, Slackware, Xandros, Debian GNU, Fedora, Gentoo, Knoppix, Linspire
  • 8. Linux Installation • Similar installation process across all distros • Live CDs, to try the Linux without installing • Setting aside Space for Linux – Root folder, Home folder & Swap space • Most secure OS. Hence, it’s popularity as a server OS. • Burning the Linux ISO image on DVD or making a Bootable Flash Drive • Doing the actual installation (Ubuntu as sample)
  • 9. Linux Installation • Best Practice requires the following on separate partitions – Swap – / – / boot – /home – /usr – /opt – /var • This type of partitioning scheme comes in handy when you have problem with your hard disk • Swap partition is used to boost your computer memory and some applications require it, even the hibernate feature on Linux requires it. Rule of Thumb is to set at 2x the RAM
  • 12. Installing Ubuntu – Linux File system
  • 13. Installing Ubuntu – Creating Account
  • 14. Installing Ubuntu - Completed
  • 16. Linux Desktops • The most common Desktops are GNOME and KDE (just cosmetic differences and default programs) • Popular GNOME distros are Ubuntu & Fedora • Popular KDE distros are Kubuntu & OpenSUSE • Opening the Terminal Windows and 6 Virtual Consoles • Navigating the Linux File System • Linux Applications
  • 18. Linux File Types • Ordinary files: These are regular files. (white/black) • Directories: These are files that contains other files and directories, and provide pointers to them. (blue) • Symbolic links: These special files link to another file, in a different location. (Cyan) • Block and character device files: All physical devices in Linux are represented by device files. e.g. /dev/sda (yellow) • Socket file: Provides protected inter-process networking. (Purple) • Named Pipe file: Like socket files but doesn’t use network socket semantics. (Red) • $ ls –l indicates all these types – -rw-r--r-- ordinary file – brw-rw---- block device file – crw-rw-rw- character device file – drwxr-xr-x directory file – lrwxrwxrwx symbolic file – srw-rw-rw- socket file – prw-rw-rw- named pipe file
  • 20. Linux Administration • Linux has become extremely easy to administer, compared to its early days. And can be administered using GUI applications (like Windows OS) or using the Commandline Interface (CLI) • As a professional Linux administrator, you’ll have to know how to administer the OS via the CLI • Linux supports multi-tasking, several users using the OS simultaneously. • By default 7 users can work simultaneously (without anyone logging out). 6 Commandline users and 1 GUI user. To switch use CTRL + ALT + F1 (F2,F3,F4,F5,F6,F7) . CTRL+ALT+F7 takes you to the GUI one • From the GUI, you can always access the commandline via “Terminal”
  • 22. Linux – User Administration • To show the Linux distro version: $ cat /proc/version • To see Linux kernel version: $ uname –r • To add new user: #useradd michael • To view the default useradd options: # useradd –D • The options are: – -g Group – -m Home directory – -f Inactive (to set password expiry date in days) – -e Expire (to disable the user after specified number of days) – -s Shell (user’s default login shell, usually /bin/sh) • To delete a user: # userdel –r michael
  • 23. Linux – CLI Key Combination • Ctrl + A to mover the cursor to the beginning of command line • Ctrl + C to end a running program and return the prompt • Ctrl + D to log out of the current shell session, same as exit or logout • Ctrl + E to move cursor to the end of the command line • Ctrl + H to generate backspace character • Ctrl + L to clear the terminal • Ctrl + R to search command history • Ctrl + Z to suspend a program • Shift + PageUp or PageDown to scroll (browse buffer) • Tab to autocomplete command of filename • Tab Tab to show command completion possibilities
  • 24. Linux CLI useful tips • If you can’t remember a command but remember the first 2 or more letters, type them and press Tab twice. This will list all the commands that start with those letters. • If you can’t remember how to use a particular command, type man command e.g. man mkdir to read a comprehensive help file on using the command, mkdir. • If you need a quick help with using the options or syntax of a command, type command --help (double hypen). e.g. mkdir - -help to get a quick help guide. • To get an easy to read manual (easier than man) on any command, type info command e.g. info mkdir • To get a short description of what a command does, type whatis command e.g. whatis mkdir • To get a list of commands for doing a particular task, type apropos task e.g. apropos text to get text manipulation commands/applications
  • 25. Linux CLI text manipulation • Use cat file.txt to display the content of file.txt on the screen • Use cat file.txt | more to display the content of file.txt one page at a time • Use cat file.txt | less to enable scrolling. Press q to exit/end. • Use tac file.txt to display the content of file.txt in reverse • Use cat file1.txt > file2.txt to copy content of file1 to file2, file duplication. • Use cat file1.txt >> file2.txt to append content of file1 to file2. • Use tail -10 file.txt to display the last 10 lines in file.txt • Use head -10 file.txt to display the first 10 lines in file.txt
  • 26. Linux CLI file permission • All files in Linux have permissions set (or unset) for user, group and other users. It’s indicated as –rwxrwxrwx or similar. • To display a file’s permission settings, type ls -l filename • The first character indicates the file type – ordinary file, directory… • The next 3 characters indicate the permission for the file owner (user), then next 3 for users in the owner’s group and the last 3 for other users. • r = Read w = Write x = Execute • Easiest way to change a file’s permission is to use chmod u/g/a +/- rwx filename e.g. chmod a+w file.txt to give everyone write permission on the file, file.txt • You can also use numeric arguments and common ones are – – chmod 400 to give only read permission to owner – chmod 600 to give read and write permission to owner – chmod 644 to give everyone read permission and the owner write permission – chmod 775 to give everyone read + execute, owner + group read write execute permission – chmod 777 to give everyone read write exceute permission
  • 27. Linux CLI execution modes • By default any command you run in the command line terminal runs in the foreground, and locks that particular terminal session till it finishes executing. • You can also make commands run in the background, so they don’t lock the terminal session and you can start other commands while they are still running. • To run a command in the background, type the symbol & after the command (put a space in between) • Only run commands that do not require user interaction in the background. • Type and execute jobs to show commands running in the background • Whenever you run a command in the background, it is assigned a process number, n. To refer to this (command execution) process, use %n. • To move a command process to the foreground, type fg %n (n is the command process number)
  • 28. Linux Administration - Performance • To a user, performance means quick execution of commands, while to a system administrator, it means ability to do much more. As the Administrator, you’ll have to optimize system performance for the whole system – users, programs and services. • Issues that can impair performance are – – programs that are not optimized for the system – problem with access to disks, controllers, display, other required interfaces – network issues affecting communication with out systems – amount of users working simultaneously on the system
  • 29. Linux Administration - Scheduling • There are times you will want a command or script to run at a particular time of the day or run while you are at lunch break. • Basically, there are three types of scheduling – – Using sleep to wait fore specified seconds before running the command. e.g. lp file1; sleep 900; lp file2; sleep 900; lp file3 (this is to insert 15mins between each file print, to allow other users print in between) – Using at command to run a command at a specified time. – Using cron to schedule a command or script on a monthly, weekly, daily or hourly basis
  • 30. Linux Administration – Output Redirection • Piping the output to another command using | • Redirecting output via > • Redirecting output via >> (to append) • Redirecting only errors via 2> • Redirecting standard input via < • Use tee option with | (pipe) to copy input to standard output (terminal) and more than one output files. e.g. cat original | tee copy1 copy2 • Use tee –a to append to files. e.g. cat file.txt | tee -a file_all.txt
  • 31. Linux Administration – Output Manipulation • Grep: It scans output line per line, searching for matching patterns. – All lines containing the pattern will be printed to standard output. e.g. cat countriesandcapitals.txt | grep Nigeria – This can be reversed using the –v option. • Sort: It allows you to sort the output lines before displaying. – Default is in alphabetical order. e.g. cat alphabets | sort – It can also sort by file size, when sorting ls output. e.g. ls ~/ -la | sort -nk 5 – And when used with uniq, it can sort and filter out double entries. e.g. sort itemlist | uniq
  • 32. Linux Administration – Vi(m) Editor • vi editor is a very powerful text editor that comes pre-installed on nearly all Linux OS. • vim is variant of vi editor, basically an improved version. Practically, it is more error tolerant than vi. • There are two modes – – Command mode, which is the default mode. You basically scroll through the file content or enter commands. • h moves the cursor to the left, • l moves it to the right, • k to move up, and • j to move down • dd will delete current line • :w to save (write) the changes made • :q will exit the editor • :q! will exit the editor without saving changes
  • 33. Linux Administration – Vi(m) Editor contd – Text input mode. You enter this mode by pressing the Insert key. There are some basic guidelines to note - • don’t attempt to scroll or change the cursor position in this mode, position the cursor where you want to add extra text before changing to the text input mode. The only exception is when you are using vim. • To change to this mode pressing - – a will append, move the cursor one position to the right before switching to the inserting mode – i will insert – o will insert a blank line under the current cursor position and move the cursor to that line • Vim is better, just not as pre-installed on Linux OSs as Vi. • Run vimtutor to start a recommended 30 minutes tutorial on using vim.
  • 34. Linux Administration - Commands man any_command <To view the manual for target command> pwd <Print current working directory> ls <Show files in current directory> ls –a <Show maximum information about all files, including hidden> mv source destination <Move/rename a file or directory> rm target <Delete target, could be file or directory> cp source destination <Copy file or directory> mount /dev/device_name /media/device_name <Mount filesytem> umount /media/device_name <Unmount> df –h <display all mounted filesystem and available disk space in KB, MB, GB> du <display disk usage, very useful for routine maintenance> ps – ef <List all running processes, with full details> top <Standard system monitor showing a more extensive view of all processes and system resources> nohup command & <Start a process in the background and have it keep running after you log off> ~/ <Current user's home directory> ifconfig <Configure network interfaces> iwconfig <Configure wireless network interfaces>
  • 35. Linux Administration - Commands ssh username@ip_address <Connect to a remote server> ping ip_address <Check to see if target is online and responding> traceroute6 ip_address <View network route to target> netstat <Network Monitor> iptables –L <View firewall rules> adduser <Create a new user> usermod <Change user privileges (be very careful with this one)> deluser <Delete user> chmod <# Change privileges over file or directory > chown user_name:group_name directory_name <Change owner of a file or directory> su username <Temporarily become a different user> users <Print usernames of logged in users> Infact, you can administer your mysql database directly from the CLI CREATE DATABASE databasename; <New database> CREATE USER username@localhost IDENTIFIED BY 'password'; <Create a new user> show tables; <Show database schema>
  • 37. UNIX Utilities/Commands awk Processes files cat Displays files (and is used with other tools to concatenate files) cmp Compares two files comm Compares sorted files, and shows differences cp Copies files cpio Copies and backs up files to an archive cut Selects characters or fields from input lines dd Copies and converts input records diff Compares two text files, and shows differences dump Backs up files fdformat Formats a floppy disk at a low level file Displays the file type find Finds files within file tree fmt Formats text very simply grep Matches patterns in a file groff Processes embedded text formatting codes
  • 38. UNIX Utilities/Commands gzip Compresses or decompresses files head Displays the first part of a file (first 10 lines by default) ispell Checks one or more files for spelling errors less Displays files allowing for scrolling forward and backward (pauses when screen is full) ln Creates a link to a file lpr Sends a file to a printer or printer device ls Lists file and directory names and attributes man Displays documentation for commands mkbootdisk Creates a CD (or floppy disk on older distributions) from which to boot a system mkdir Creates a new directory mkfs Builds a UNIX/Linux file system mount Mounts file systems and devices mv Renames and moves files and directories newfs Creates a new file system (used in UNIX systems in particular)
  • 39. UNIX Utilities/Commands pr Formats text files for printing and displays them pwd Shows the directory you are in rdev Queries or sets the root image device restore Restores files (from a dump) rm Removes files rmdir Removes directories sed Edits streams (noninteractive) sort Sorts or merges files tail Displays the last lines of files (last 10 lines by default) tar Copies and backs up files to a tape archive touch Changes file modification dates uniq Displays unique lines of a sorted file wc Counts lines, words, and bytes whereis Locates information about a specific file
  • 40. UNIX Utilities/Commands pr Formats text files for printing and displays them pwd Shows the directory you are in rdev Queries or sets the root image device restore Restores files (from a dump) rm Removes files rmdir Removes directories sed Edits streams (non-interactive) sort Sorts or merges files tail Displays the last lines of files (last 10 lines by default) tar Copies and backs up files to a tape archive touch Changes file modification dates uniq Displays unique lines of a sorted file wc Counts lines, words, and bytes whereis Locates information about a specific file
  • 41. UNIX Utilities/Commands date Sets and displays date and time df Displays the amount of free space remaining on disk du Summarizes file space usage file Determines file type finger Displays detailed information about users who are logged in free Displays amount of free and used memory in the system edquota Displays user disk quotas and enables them to be changed kill Terminates a running process ps Displays process status by process identification number and name sleep Suspends process execution for a specified time top Dynamically displays the status of processes in real time uname Shows information about the operating system vmstat Shows information about virtual memory use w Displays detailed information about the users who are l ogged in who Displays brief information about the users who are logged in
  • 42. UNIX Utilities/Commands tp Transfers files over a network ifconfig Sets up a network interface netstat Shows network connection information nfsstat Shows statistics for Network File ping Polls another network station (using TCP/IP); great for a fast determination about whether your network connection is working rcp Remotely copies a file from a network computer rlogin Logs in to a remote computer route Displays routing table information, and can be used to configure routing rsh Executes commands on a remote computer showmount Lists clients that have mounted volumes on a server telnet Connects to a remote computer on a network traceroute Shows the route along a network between the source device and the destination, such as from a computer to a server wvdial Controls a modem dialer for dial-up connections over a phone line
  • 43. LINUX in a Network • Linux has the most robust networking tools and support • All the possible means of connecting to the internet work on Linux – Digital Subscriber Line (DSL) – Cable Modem – Dial-up Networking – Wireless Internet access points • Works seamlessly in a Local Area Network and has inbuilt security tools • Configurable network management files/tools, located in the /etc directory. • An arsenal of Network troubleshooting tools
  • 44. LINUX – Network Configuration • Linux network configuration files are – – /etc/hosts This contains addresses of hosts that can be contacted without using an external naming service like DNS. It always contains 127.0.0.1 – /etc/resolv.conf This file configures access to a DNS server. It contains your domain name and the name server(s) to contact – /etc/nsswitch.conf This file defines the order in which to contact different name services. • Linux Network configuration commands include – – ifconfig to display and configure the network interfaces – ip is a newer and better command. Sample use include ip addr show and ip route show
  • 45. LINUX – Network Troubleshooting • Linux network commands are – – host to display information on hosts or domains. e.g. host www.telemit.com – ping to check if a host is alive. You can interrupt by pressing Ctrl+C – traceroute to check the route that packets follow to a network host. e.g. traceroute www.telemit.com – whois to lookup a specific domain information • In addition you can install several network troubleshooting and optimizing tools for free on Linux.
  • 47. LINUX and your Internet needs • Mozilla Firefox, Konqueror, Epiphany, Chromium and Opera Browser to access the web • Mozilla Thunderbird, Evolution, Zimbra, kontact and Kmail to do exactly what Outlook does • Graphical FTP clients like gFTP, KFTPGrabber and even Firefox, in addition to the commandline tool FTP • Linux can be configured as a Mail server, web server, FTP server, call manager, CMS server or Database server. And all without buying a complex expensive software.
  • 49. Linux Security - Security Framework • Determine security requirements • Perform risk assessments • Establish a security policy • Implement a robust software + hardware security solution • Continuously monitor and manage the security solution
  • 50. Linux Security – Security Threats • Denial of Service attacks • Unauthorized Access • Unauthorized release of confidential information • Configuration loopholes • Network loopholes
  • 51. Linux Security – Security Solutions • Authentication • Access Control • Encryption • Password policies • Firewalls • Physical security of all hardware and data • Intrusion Prevention systems • Intrusion detection systems
  • 53. Linux Servers • Web server • FTP server • Mail server • DNS server • InterNetNews (INN) server • DB Server • SIP Server
  • 54. Linux Servers – File sharing • Network File System – For sharing files with other Linux/UNIX systems (or PCs with NFS client software) • Samba – For file sharing and print sharing Windows systems
  • 56. Linux Programming • Linux comes with software development tools pre-installed • Compiling source code applications • Shell Scripting – Most powerful tool of a Linux administrator – Used to automate routine administrative tasks – Used to monitor system performance and vital directories (especially database directories for enough free space) – Makes administration of lots of computers extremely easy and less error-prone
  • 57. Linux Programming – Shell Scripting • Bash shell scripts are the most used • A simple shell script is #!/bin/bash clear echo "Good morning, world.“ # save it as morning in any folder of choice e.g. ~/Documents # to run the script give it the executable file permission # using chmod 755 ~/Documents/morning # to run the script, type ~/Documents/morning
  • 58. Additional Online Resources • Introduction to Linux http://tille.garrels.be/training/tldp/index.html • Linux Newbie Administration Guide http://lnag.sourceforge.net/downloads/LinuxNe wbieAdministratorGuide.pdf • Bash Guide for Beginners http://tille.garrels.be/training/bash/ • Ubuntu Pocket Guide & Reference http://ubuntupocketguide.com/download_main .html
  • 60. CALL: +234-808-938-2423 E-MAIL: MICHAEL@OLAFUSIMICHAEL.COM

Hinweis der Redaktion

  1. Microsoft Confidential
  2. Microsoft Confidential
  3. Microsoft Confidential