1. RAJDHANI INSTITUTE OF
TECHNOLOGY
A
Presentation of Practical Training
on
Unix /Linux system
Presented By :
KULDEEP SHARMA
B.TECH(IT)
2. History Of UNIX & Linux
1957: Bell Labs found they needed an operating system
which at the time was running various batch jobs.
1965: Bell Labs create Multics (Multiplexed Information and
Computing Service)
1969: Summer 1969 UNIX was developed by AT&T
1975: Sixth edition of UNIX released May 1975
1985: GNU project started
1991: Linux is introduced by Linus Benedict Torvalds who
was a second year student of Computer Science at the
University of Helsinki
1993: NetBSD & FreeBSD released
1994: Red Hat Linux is introduced
3. Shell
• Program that interacts with kernel
• Bridge between kernel and the user
• Command interpreter
• User can type command and the command is
conveyed to the kernel and it will be executed
Softsmith Infotech
4. Linux Shellls whoami
pwd
Shell interprets the command and Bash, Tcsh, Zsh
request service from kernel
Similar to DOS but DOS has only one
set of interface while Linux can select Kernel
different shell
– Bourne Again shell (Bash), TC shell
(Tcsh), Z shell (Zsh)
Different shell has similar but different functionality
Bash is the default for Linux
Graphical user interface of Linux is in fact an application program work on the shell
5. Linux File Types
Normal - Normal file
Directories d Normal directory
Hard link -
Symbolic link l Shortcut to a file or directory
Socket s Pass data between 2 process
Named pipe p Like sockets, user can’t work directly with
Character device c Processes character hw communication
Block device b Major & minor numbers for controling dev.
6. Some of Linux Commands(1)
echo man help info ls
cat tac cp mv rm
cd touch pwd mkdir rmdir
clear alias less date logout
exit reboot halt
7. Basic Commands
Commands
• su switch user
• passwd change password
• useradd create new user account
• userdel delete user account
• mount mount file system
• umount unmount file system
• df show disk space usage
• shutdown reboot or turn off machine
8. Some of Linux Commands(3)
Create Partitions and Filesystem
fdisk, mke2fs, mkfs.*
Maintain the Integrity of Filesystem
e2fsck, fsck.*, du, df
Filesystem Mounting & Umounting
mount, umount, /etc/fstab
10. All LINUX commands start with the name of the command and
can be followed by options and arguments.
Linux text-based interface
command to show the content of current
directory
The prompt $ shows that bash
shell is using
command to show the content of current
directory with option -al
11. Some of the basic commands you should
learn are the ones that help you navigate
Commands: the file system.
/ (root directory)
/root – home directory of the user root
pwd – you can see your home directory
df – to see disk space available
cd – to change to different directory or to go back to home dir
.. - move to parent directory
ls – list the contents of a directory; Options: -l (more info)
-a (displays hidden files)
-t (sort by time)
-r (oldest first)
Example: ls –ltr : display an long list of files that are sorted by time, display the oldest ones first
12. cp : copy one file to another
rm : remove a file
man : ask for the manual (or help) of a command
e.g. man cd ask for the manual of the command cd
cat : to show the content of a text file
e.g. cat abc.txt show the content of abc.txt
whoami : to show the username of the current user
Directory is denoted by a / (slash) character
Executable program by a *
Hidden file preceded by a . (dot)
13. Permission
Command
• chmod change file mode, add or remove
permission
• chown change owner of the file
Example)
chmod a+w filename
add writable permission to all users
chmod o-x filename
remove executable permission from others
chmod a+x
Gives permission to the usser to execute a file
• u: user (owner), g: group,o: others a: all
14. Process Management
Commands
• kill Stop a program. The program is
specified by process ID.
• killall Stop a program. The program is
specified by command name.
• ps Show process status
• top Show system usage statistics
15. Foreground and Background
• Running job has two modes, “foreground” and “background”
• If program is running as “background”,
the program keeps running even after your session was closed
• If program is running as “foreground”,
Ctrl-C stop program
Ctrl-Z let program background
16. Foreground and Background
• To run programs in background mode, use “&”
[nomura@ssc-1]$ command &
• To get background job back into foreground mode, use “fg”
command.
[nomura@ssc-1]$ fg
17. Why Use Linux?
• Costs less
• Stable
• Reliable
• Extremely powerful
18. The Advantage of Linux
• Low purchase cost
• Open Source Software (OSS)
• UNIX heritage
• Multi User
• Scalability
• Vendor support
• Reliable uptime
• Security
• Logging System
• …
19. The Disadvantage of Linux
• Steep learning curve
• Hardware support
• End-user applications