Friday, March 5, 2010

Top Linux Admin Interview Questions asked in TOP IT industries : Question Bank 3

Linux Admin Interview Questions and Answers

Questions consists of Linux Admin Interview Questions and Answers, Linux Administration questions, Linux Networking questions, MYSQL questions, bash, postfix questions, sendmail questions, ftp server questions

Questions BANK 03


# When typing at the command line, the default editor is the _____________ library.

# You typed the following at the command line ls -al /home/ hadden. What key strokes would you enter to remove the space between the ‘/’ and ‘hadden’ without having to retype the entire line? Choose one
a. Ctrl-B, Del
b. Esc-b, Del
c. Esc-Del, Del
d. Ctrl-b, Del

# You would like to temporarily change your command line editor to be vi. What command should you type to change it?

# After experimenting with vi as your command line editor, you decide that you want to have vi your default editor every time you log in. What would be the appropriate way to do this? Choose one
a. Change the /etc/inputrc file
b. Change the /etc/profile file
c. Change the ~/.inputrc file
d. Change the ~/.profile file

# You have to type your name and title frequently throughout the day and would like to decrease the number of key strokes you use to type this. Which one of your configuration files would you edit to bind this information to one of the function keys?

# In your present working directory, you have the files maryletter memo1 MyTelephoneandAddressBook What is the fewest number of keys you can type to open the file MyTelephoneandAddressBook with vi? Choose one
a. 6
b. 28
c. 25
d. 4

# A variable that you can name and assign a value to is called a _____________ variable.

# You have installed a new application but when you type in the command to start it you get the error message Command not found. What do you need to do to fix this problem? Choose one
a. Add the directory containing the application to your path
b. Specify the directory’s name whenever you run the application
c. Verify that the execute permission has been applied to the command.
d. Give everyone read, write and execute permission to the application’s directory.

# You telnet into several of your servers simultaneously. During the day, you sometimes get confused as to which telnet session is connected to which server. Which of the following commands in your .profile file would make it obvious to which server you are attached? Choose one
a. PS1=’\h: \w>’
b. PS1=’\s: \W>’
c. PS1=’\!: \t>’
d. PS1=’\a: \n>’

# Which of the following environment variables determines your working directory at the completion of a successful login? Choose one
a. HOME
b. BASH_ENV
c. PWD
d. BLENDERDIR

# Every time you attempt to delete a file using the rm utility, the operating system prompts you for confirmation. You know that this is not the customary behavior for the rm command. What is wrong? Choose one
a. rm has been aliased as rm -i
b. The version of rm installed on your system is incorrect.
c. This is the normal behavior of the newest version of rm.
d. There is an incorrect link on your system.

# You are running out of space in your home directory. While looking for files to delete or compress you find a large file called .bash_history and delete it. A few days later, it is back and as large as before. What do you need to do to ensure that its size is smaller? Choose one
a. Set the HISTFILESIZE variable to a smaller number.
b. Set the HISTSIZE to a smaller number.
c. Set the NOHISTFILE variable to true.
d. Set the HISTAPPEND variable to true.

# In order to display the last five commands you have entered using the history command, you would type ___________.

# In order to display the last five commands you have entered using the fc command, you would type ___________.

# You previously ran the find command to locate a particular file. You want to run that command again. What would be the quickest way to do this? Choose one
a. fc -l find fc n
b. history -l find history n
c. Retype the command
d. fc -n find

# Using command substitution, how would you display the value of the present working directory? Choose one
a. echo $(pwd)
b. echo pwd
c. $pwd
d. pwd | echo

# You need to search the entire directory structure to locate a specific file. How could you do this and still be able to run other commands while the find command is still searching for your file? Choose one
a. find / -name filename &
b. find / -name filename
c. bg find / -name filename
d. &find / -name filename &

# In order to create a file called DirContents containing the contents of the /etc directory you would type ____________.

# What would be displayed as the result of issuing the command ps ef? Choose one
a. A listing of the user’s running processes formatted as a tree.
b. A listing of the stopped processes
c. A listing of all the running processes formatted as a tree.
d. A listing of all system processes formatted as a tree.

# What utility can you use to show a dynamic listing of running processes? __________

# The top utility can be used to change the priority of a running process? Another utility that can also be used to change priority is ___________?

# What key combination can you press to suspend a running job and place it in the background?

# You issue the command jobs and receive the following output: [1]- Stopped (tty output) pine [2]+ Stopped (tty output) MyScript How would you bring the MyScript process to the foreground? Choose one:
a. fg %2
b. ctrl-c
c. fg MyScript
d. ctrl-z

1 comment: