Linux interview Questions
1).What is the difference between hard and softlink
in linux os
hardlink :
ln filename
softlink :ln -s filename
2)..
How to check no.of hardlinks are created for file?
ll -li command
Inthis we can check it out how many hardlnks are careted
for this file ..
3)..
How to find the location of hardlink of the file?
find . / -xdev -samefile filename
In this way we find the locations of hardlink of the file
4).
What is the port number of DHCP and DNS?
DHCP - 67,68
DNS -53
5).
What is the difference between tcp and udp:
tansmission control protcol:
Its reabile protocol
its connection oriented protocol
data tranfser is slow
udp :
user datagram protocol:
its non-realible protocol
its connectionless protocol
data transfer is very speed
6)..
explain the files of /ect/passwd?
Its stores the user account information's .
when i am going to creating the one user this user is going
to store under /etc/passwd file
we have 7 enries are there
every enteries are separated by colons..
username ,password ,user_id ,goup_id, user_id info,
shell ,home directory
7)..
How to enforce a user to reset passwords at next login?
chage -l username
using this command we can check it out the rest the passwords
at next login/..
8)...
How to change the shell of the user?
usermod -s /bi/bash root
so this the command we can change
or else we can execute the command like as the,
vi /etc/user add/default command
here default loginshell are there.
we can change it as per needs
9)..
How to change default home directory of users going to
be create in future?
vi /etc/default/user add command
her only we can see the default homed rectory
maybe if you want to change the home directory to new one
we can change it ..
the am going to create the oen user ==user add nandhini
then execute the command like as the,
whether its tail -n1 /etc/passwd or cat /etc/passwd
in this way we can check it out the home directory changing
or not
10).
what are the common issues you have faced while doing
ssh into a server?
username mismatched , port number ,
tcp wrapper , no keys, ssh block for server side
key file permissions ..
11)..
How to change the home directory for existing user?
usermod -d newhome/user root
Comments
Post a Comment