Thursday, October 15, 2015

Linux Interview Questions and Answers part3

1.A technician is going to install Linux on a workstation. The technician wants to customize the installation. What type of installation will the technician use to customize the installation?
Ans:- Only a custom installation can be used to customize what is installed during an installation. A custom installation will allow you to choose what packages you want to install and what packages you don’t want to install.

2.Where is the default location of passwd file in linux?
Ans:- The password file for Linux is located by default in the /etc/passwd location.

3.Which program is mostly used for remote login securely in Linux?
Ans:- SSH is used for secure login. SSH is the replacement of old unsecure services like telnet.

4.What command should you use to activate a swap partition?
Ans:- swapon command is used to activate the swap partition.

5. What command should you use to activate a swap partition?
Ans:- swapon command is used to activate the swap partition.

6. A technician is verifying the network configuration of a Linux server. Which command he should used to accomplish this?
Ans:- ifconfig is the proper command to examine network configuration.

7. A technician wants to assign IP addresses to all the systems that will connect to the server automatically. What type of server he should set up?
Ans:- He should set up DHCP Server which assigns IP address to client automatically on start up.

8. A technician wants to add a new user to the current domain. What command will the technician use to accomplish this?
Ans:- He should use useradd command followed by the username will create a new user or update default new user information. You need to specify the password separately with the passwd command.

9. What option a technician can use with usermod command to unlock to user’s password?
Ans:- The -U option is used with usermod command to unlock the user’s password.

10. What option of the mkfs command should you use to check the device for bad blocks before building the file system?
Ans:- The –c option when used with the mkfs command will check the device for bad blocks before building the file system.

11. What at command argument will send mail to the user when the job has completed, even if there was no output?
Ans:- -m argument with at command will send mail to the users when the job has completed even if there was no output.

12. A user wants to verify the current active shell. Which command will he use?
Ans:- He should use the env command to verify the current active shell

13.What command can a technician use to search for a specific file?
Ans:- He can use either find or locate command to search for a specific file.

14.How can you send the output of a file to another file?
Ans:- The > option is used to send the output of a file to another file.

15.What is the -t option with fsck command used for?
Ans:- The –t option used with fsck is used to specify the type of filesystem to be checked.

16.Which utility should you use to display the CPU processes?
Ans:- top utility lets you see all on one screen how much memory and CPU usage that you are currently using, and also the resource usage by each program and process.

17. A technician wants to delete the a user account. Which command should he use?
Ans:- The userdel command is used to delete a user from the system.

18.Which command is used to change from one directory to another?
Ans:- cd command is used to navigate the Linux hierarchical file system structure, use the cd command to change from one directory to another.

19. A user wants to copy a file from the /tmp directory to the his home directory. Which command would he use?
Ans:- He can use cp command to copy the files from one directory other directory.

20. What is the file extension of Red Hat Package manager?
Ans:- RPM extension is associated with the Red Hat Package manager

21. What command can you use to mount a CD-ROM drive?
Ans:- mount command will mount the CD-ROM.
mount -t iso9660 /dev/cdrom /media/

22. Which command a user can use to exit a login shell?
Ans:- The logout or exit command will exit him from a login shell.

23. A technician is having problems connecting to a mail server. What command can he use to test if the mail server is on the network?

Ans:- He can use ping command to test connectivity between local system and remote server.

No comments:

Post a Comment