Advertisement

Linux Technical Interview Questions Part-1

 Linux Technical Interview Questions Part-1


1. When you login you get “$” prompt, what is the prompt for root?

#

2. Explain the difference between grep and egrep?

Search online

3. What is the port # for DNS, NTP and NFS?

53,123 and 111/2049

4. What is the configuration file name of DNS and where is it

located?

/etc/named.conf

5. How many new directories will be created after running the

following command

mkdir {a..c}{1..3}

9

6. Your PC is configured with a DNS server address but not the

default gateway. Can the PC access internet?

No

7. What is the difference between IP and Gateway?

Search online

8. Can you assign one static IP to 2 computers, if not then why?

No because it will create IP conflict

9. How to change IPs address to static?

ifconfig x.x.x.x

10. You are trying to ping a server by hostname and you get an error

message, “ping: unknown host …”. What could be the reason and

how to solve the problem so you can ping it by hostname?

Check for /etc/hosts or DNS to see if it has hostname to IP entry

11. Explain the difference between relative and absolute path?

Absolute path starts from / where relative path is your current

directory

12. List 3 different methods of adding user?

Search online

13. What is the command to change file/directory ownership and group?

chown and chgrp

14. List any 3 type of filesystem?

ext4,NTFS and FAT

15. When you login you get a message on the screen. What is the name

of that file and where is it located?

/etc/motd

16. What is /bin directory used for?

Search online

17. What are the different types of DNS Server

Master and secondary

18. How to change a user password?

passwd username

19. What is the version of Redhat Linux you have experience with?

7.4

20. List any 4 linux distributions?

Redhat, CentOS, Ubuntu and SUSE

21. How to logoff from the system?

exit

22. Give any 3 examples of operating systems?

Windows, Linux and MAC

23. How to create a directory?

mkdir

24. Where are the zone files located for DNS service?

/var/named/zonefiles

25. How to check kernel version?

uname –a

26. Which directory has all the configuration files?

/etc

27. How to become root user from a regular user?

su –

28. How many mega bytes in 1 giga bytes?

Search online

29. What is the purpose of having different network ports?

So the communication of each application goes through a dedicated

port

30. How to display first column of a file?

cat filename | awk ‘{print $1}’

31. What is the name of DNS rpm package?

bind

32. What is the difference between nslookup and dig commands?

Search online

33. How to check your user id and group id?

id

34. How to check a file’s permission?

ls –l

35. What is the difference between “kill” and “kill -9” command?

Search online

36. What is subnet?

Search online

37. You are troubleshooting an issue with Redhat support and they

have asked you to send the contents of /etc directory. How and

which method you will use to transfer the contents?

tar (compress) the entire /etc directory and ftp

38. What is root home directory?

/root

39. What is rsyslogd deamon and its purpose?

Search online

40. Your company has terminated a server administrator. What is first

thing as an administrator you should do to enhance the security?

Change root password

41. How to check the computer name or host name in Linux?

hostname

42. Which permission allows a user to run an executable with the

permissions of the owner of that file?

First 3 bits should have x

43. What is the command to untar a tarred file?

untar

44. What is /proc directory used for?

Search online

45. What is the purpose of nsswitch.conf file

It tells the system where to go to resolve hostnames

46. List 3 basic commands to navigate the filesystem?

cd, pwd and ls

47. Which service/daemon should be running on the server that allows

you to connect remotely?

sshd

48. What is the purpose of firewall?

Search online

49. List any 3 IT components?

Hardware, OS and Applications

50. Which directory has all the commands we use, e.g. ls, cd etc.?

/usr/bin or /bin

Post a Comment

0 Comments