Welcome to Section 12
Linux Operating System Management
By: Imran Afzal
www.utclisolutions.com
Linux Distributions
Redhat
By: Imran Afzal
Download and Install Linux Server
• Create new VM on Oracle VirtualBox
• Download the Linux CentOS 7
• Install Linux
By: Imran Afzal
www.utclisolutions.com
Access to Linux System
Each operating system has a different protocol or client that is used to
access the system
Example:
Windows = Remote Desktop (RDP)
VMware ESX = vSphere client
Linux = Putty, SecureCRT
SSH from Linux to Linux
By: Imran Afzal
Access to Linux System
By: Imran Afzal
Download and Install Putty
By: Imran Afzal
Access to Linux VM via Putty
By: Imran Afzal
Access to Linux from MAC
• Openup a terminal on your MAC
• Run the following command
• # ssh –l iafzal 192.168.56.101
By: Imran Afzal
File System Structure
By: Imran Afzal
File System Structure and its Description
/boot Contains file that is used by the boot loader (grub.cfg)
/root root user home directory. It is not same as /
/dev System devices (e.g. disk, cdrom, speakers, flashdrive, keyboard etc.)
/etc Configuration files
/bin → /usr/bin Everyday user commands
/sbin → /usr/sbin System/filesystem commands
/opt Optional add-on applications (Not part of OS apps)
/proc Running processes (Only exist in Memory)
/lib → usr/lib C programming library files needed by commands and apps
strace -e open pwd
/tmp Directory for temporary files
/home Directory for user
/var System logs
/run System daemons that start very early (e.g. systemd and udev) to store
temporary runtime files like PID files
/mnt To mount external filesystem. (e.g. NFS)
/media For cdrom mounts.
By: Imran Afzal
Navigating File System
• When navigating a UNIX filesystem, there are a few important commands:
"cd”
"pwd”
"ls“
• "cd" stands for change directory. It is the primary command for moving you around the filesystem.
• “pwd” stands for print working directory. It tells you where you current location is.
• “ls” stands for list. It lists all the directories/files within a current working directory
• Using of TAB key to auto-complete
By: Imran Afzal
Directory Listing Attributes
Total columns = 9
Type # of Links Owner Group Size Month Day Time Name
drwxr-xr-x. 21 root root 4096 Feb 27 13:33 var
lrwxrwxrwx. 1 root root 7 Feb 27 13:15 bin
-rw-r—r-- 1 root root 0 Mar 2 11:15 testfile
The second column is the number of hard links to the file. For a
directory, the number of hard links is the number of immediate
subdirectories it has plus its parent directory and itself
By: Imran Afzal
Creating Files and Directories
• Creating Files
✓touch
✓cp
✓vi
• Creating Directories
✓mkdir
By: Imran Afzal
System Utility Commands
• date
• uptime
• hostname
• uname
• which
• cal
• bc
By: Imran Afzal
System Monitoring
• top
• df
• dmesg
• iostat 1
• netstat
• free
• cat /proc/cpuinfo
• cat /proc/meminfo
By: Imran Afzal
System Maintenance Commands
• shutdown
• init 0-7
• reboot
• halt
By: Imran Afzal