Advertisement

Linux Technical Interview Questions Part-2

Linux Technical Interview  Questions Part-2


51. What is the difference between memory, virtual memory and cache?

Search online

52. Which of the following is correct?

a. Hardware  Operating System  Users

b. Operating System  Users  Hardware

c. Database  Hardware  Users

53. Which of the following is a communication command?

o grep

o mail

o touch

o cd

54. How to rename a file or directory?

mv

55. How to change a hostname in Linux?

Search online

56. How to check network interfaces in Linux?

ifconfig

57. Why is “tail –f logfilename” command used most often and what

does it do?

It will output all incoming logs in real time

58. What type of hardware have you worked on?

You should get yourself familiar with Dell, HP and UCS hardware

by going online and check the vendor websites

59. How to sort a file in reverse order?

cat filename | sort –r

60. What is the name of operating system that runs Unix?

Solaris, HP-UX etc.

61. List all byte sizes from smallest to largest?

Search online

62. How to check the total number of partition in Linux?

fdisk -l

63. How to access a linux system from a linux system?

ssh

64. Explain the procedure of bonding 2 NICs or interfaces together?

Search online

65. What is the exact command syntax to list the 5th column of a file

and cut the first 3 letters?

cat filename | awk ‘{print $5}’ | cut –c1-3

66. What is /etc/hosts file used for?

To resolve hostnames with IP address

67. List any 3 options of ‘df’ command and what they are used for?

Search online

68. What is the command to change file/directory permissions?

chmod

69. What is the purpose of pipe (|)?

To combine multiple commands

70. What is /etc directory used for?

For configuration files

71. Which command is used to list files in a directory?

ls –l

72. There is a command which gives you information about other

commands, please explain that command and what is it used for?

man

73. How to delete a file and a directory?

rm filename and rmdir dirname

74. What is the difference between “tail” and “tail -10”?

None

75. List 4 commands to display or read a file contents?

cat, more, less, vi

76. Which command is used to read the top 5 lines of a file?

head -5 filename

77. What are the different commands or methods to write to a file?

echo > filename and vi filename

78. What is swap space and how to check swap space?

Search online

79. What is inode and how to find an inode of a file?

Search online

80. Which file to edit for kernel tuning?

Search online

81. What is the latest version of Redhat?

Search online

82. Name the command to find specific word from a file?

grep word filename

83. You have scheduled a job using crontab but it does not run at the

time you specified, what could be the reason and how would you

troubleshoot?

Check your system time

Check your crontab entry

Check /var/log/messages

84. How to check system hardware information?

dmidecode

85. How to check network interface MAC address?

ifconfig

86. If I don’t want others to read my file1, how to do that?

Remove r from the last 3 bits of file permission

87. What is the purpose of “uniq” and “sed” command?

Search online

88. Which command is used to list the contents of a directory in the

most recent time and in reverse order, meaning the most updated

file should be listed on the bottom?

ls –ltr

89. What is the difference between tar, gzip and gunzip?

Search online

90. What are the different ways to install and OS?

DVD, DVD iso and network boot

91. How to view difference between two files?

diff file1 and file2

92. You noticed that one of the Linux servers has no disk space left,

how would you troubleshoot that issue?

If running LVM then add more disk and extend LVM

If not running LVM then add more disk, create a new partition and

link the new partition to an existing filesystem

93. How to check Redhat version release?

uname –a or /etc/redhat-release

94. What is the difference between TCP and UDP?

Search online

95. What is a zombie process?

Search online

96. How do you search for a pattern/word in a file and then replace

it in an entire file?

sed command

97. Explain the purpose of “touch” command?

To create an empty file

98. If a command hangs, how to stop it and get the prompt back?

Ctrl C

99. Which command is used to count words or lines?

wc

100. How to check the number of users logged in?

who

Post a Comment

0 Comments