To give a pointer to the source file called as a link.
- In unix/Linux two types of links.
(a) Soft links
(b) Hard links.
à The inode number of the source file, link file are different.
- It can be created across the file system.
- Editing of original file will be replicate in the link files.
- Size of soft link file equals to number of characters in original file path.
- If source file is deleted the link file will not be accessible.
- It is also be called as shortcut link
Syn: $ ln -s <source file> <link file>
Ex: $ ln -s /backup/linux /root/desktop/linux
à Source file, link file has same inode numbers.
- It can’t be created across file system.
- Editing of original file will replicate in the link files.
- Size of hard link file is same as original file.
- The source file is deleted the link file we can access.
- It is a backup link.
Syn: $/n <source file> <link file>
Ex: $ /n /root/ backup /root/ desktop/ backup
*Shell concept: Shell is a command line interpreter. The shell access request from user and the checks command existence, if the command exist then it converts into kernel understandable language (Machine language) and it send the given request to kernel.
- The shell access interface b/w user and kernel
Types of shells:
|Shell name||Developed By||Prompt||Interpreter name|
|Bourne shell||Stephen Bourne||$||sh|
|Korn Shell||David korn||$||ksh|
|C shell||Bill joy||%||csh|
|Bash shell||Stephen Bourne||$||bash|
|Z shell||paul||$||z sh|
Note: The advanced version of Bourne shell is bash shell.
- Bash means “Bourne again shell”
- Bash shell is default in linux.
Default shell name Flavour name
Bash Shell Linux
Bourne Shell SCo_Unix, Solaries, HP_UX
Korn Shell IBM_AIX
C shell IRIX (Silicon Graphics)
|Default shell name||Flavour name|
|Bourne Shell||SCo_Unix, Solaries, HP_UX|
|C shell||IRIX (Silicon Graphics)|
Features of shells:
--- Word completion
--- Command History.
--- Command alias.
- To check the shells:
#cat / etc/shells
- To check parent shell of current user:
# echo $ SHELL
- To view the available shells:
#ls * sh
- To shift from bash shell to sh shell:
- To shift from sh shell to k shell:
- To check current working shell:
- To exist the shell:
Interested in mastering Linux? Learn more about Linux Tutorial in this blog post.
Command completion: Linux automatic command completion is a tool or program that can identify what you are typing in the linux command line terminal and can complete that command, words or sentence for you. This is really cool feature in linux
- When <TAB> key is pressed, any command starting with the given string will be completed by the system automatically.
- For multiple commands that starting with the given string, pressing <TAB> key twice will list down all those matched files or commands.
- If there are no matched of any command, files or folders, then, the automatic word completion will not shown, a ‘ting’ sound will buzzed.
EX: $cd /var/ l<tab>
Lib/ lock / log /
Command History: The history command performs one of several operations related to recently – executed commands recorded in a history list. Each of these recorded commands is referred to as an ‘event’, when specifying an event to the history command.
$history –c Lock the history.
$history –r Unlock the history.
$rm.bash_history Removes the history
- Alias is a built in shell command in linux/unix operating systems.
- It can save you a lot of typing by assigning a name to long commands.
- The alias command can be useful if you want to create a ‘shortcut’ to a command.
Syn: Alias name=’command’
EX: $alias U= user add
$alias C= Clear
$alias Display alias list
$unalias U Disable alias
$Vim . bashrc Permanent alias names
For indepth understanding of Linux click on