Question: Default shell of the logged in User
Answer: There are many ways to find the default shell.
a)
By checking the last column in the /etc/passwd file ( grep –i
username /etc/passwd )
Eg:
[vjsujay@cheetah:/home/vjsujay]#grep -i vjsujay /etc/passwd
vjsujay:x:48153:63002:Sujay-kumar:/home/vjsujay:/bin/ksh
b)
By displaying the value of global environment variable SHELL
( echo $SHELL )
Eg: [vjsujay@cheetah:/home/vjsujay]#echo
$SHELL
/bin/ksh
NOTE: This will give
correct default shell name as output as long as your current shell is your
default shell
c)
By using the command echo $0
Eg: [vjsujay@cheetah:/home/st39422]#echo $0
-ksh
3 comments:
thanx for the post. its very useful for basic knowledge.
hi..fnds. can u plz post linux related information.
Networking Projects for Final Year CSE Students
The IEEE Network projects Networking Projects for Final Year CSE Students has direct impact on undergraduate and graduate student education and training. Final Year Engineering Students who are software developers can structure a project around building a network firewall application Final Year Project Centers in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai
Post a Comment