Continuing the Interview Series, we are giving 10 Questions here, in this article. These questions and the questions in the future articles doesn’t necessarily means they were asked in any interview. We are presenting you an interactive learning platform through these kind of posts, which surely will be helpful.
Upon the analysis of comments in different forums on last article 11 Basic Linux Interview Questions of this series, it is important to mention here that to bring up a quality article to our readers. We give our time and money, and in return what we expect from you? Nothing. If you can’t praise our work, please don’t demoralize us from your negative comments.
If you find nothing new in a post, don’t forget that for someone it was helpful, and for that he/she was thankful. We can’t make everyone happy in each of our article. Hope you readers would take pain to understand this.
Q.1: Which command is used to record a user login session in a file?
- macro
- read
- script
- record
- sessionrecord
Answer : The ‘script’ command is used to record a user’s login session in a file. Script command can be implemented in a shell script or can directly be used in terminal. Here is an example which records everything between script and exit.
Let’s record the user’s login session with script command as shown.
Q.2: The kernel log message can be viewed using which of the following command?
- dmesg
- kernel
- ls -i
- uname
- None of the above
Answer : The kernel log message can be viewed by executing ‘dmesg’ command. In the list kernel is not a valid Linux command, ‘ls -i’ lists the file with inode within the working directory and ‘uname’ command shows os.
Q.3: Which command is used to display the release of Linux Kernel?
- uname -v
- uname -r
- uname -m
- uname -n
- uname -o
Answer : The command ‘uname -r’ display the kernel release information. The switch ‘-v’ , ‘-m’ , ‘-n’ , ‘o’ display kernel version, machine hardware name, network node, hostname and operating system, respectively.
Q.4: Which command is used to identify the types of file?
- type
- info
- file
- which
- ls
Answer : The ‘file’ command is used to identify the types of file. The syntax is ‘file [option] File_name’.
Q.5: Which command locate the binary, source and man page of a command?
Answer : The ‘whereis’ command comes to rescue here. The ‘whereis’ command locate the binary, source, and manual page files for a command.
Q.6: When a user login, which files are called for user profile, by default??
Answer : The ‘.profile’ and ‘.bashrc’ present under home directory are called for user profile by default.
Q.7: The ‘resolv.conf’ file is a configuration file for?
Answer : The ‘/etc/resolv.conf’ is the configuration file for DNS at client side.
Q.8: Which command is used to create soft link of a file?
- ln
- ln -s
- link
- link -soft
- None of the above
Answer : The ‘ln -s’ command is used to create soft link of a file in Linux Environment.
Q.9: The command ‘pwd’ is an alias of command ‘passwd’ in Linux?
Answer : No! The command ‘pwd’ is not an alias of command ‘passwd’ by default. ‘pwd’ stands for ‘print working directory’, which shows current directory and ‘passwd is used to change the password of user account in Linux.
Q.10: How will you check pci devices vendor and version on a Linux?
Answer : The Linux command ‘lspci’ comes to rescue here.
That’s all for now. I hope these above questions might be very helpful to you. In our next weekend we again come-up with some new set of questions. Till then stay healthy, tuned and connected to Tecmint.
Sign up here with your email
EmoticonEmoticon