Linux interview questions – page 7

517 questions. Tap “Show answer” to check yourself.

Advertisement
  1. You have configured logrotate to rotate your logs weekly and keep them for eight weeks. You are running our of disk space. What should you do?Choose one:a. Quit using logrotate and manually save old logs to another location.b. Reconfigure logrotate to onl

  2. You notice that the amount of free space is getting low. When you check the contents of the /tmp directory you find several hundred files so you delete them. After deleting these temp files, you check the amount of free space, however, it has not increase

  3. You want to enter a series of commands from the command-line. What would be the quickest way to do this?Choose Onea. Press enter after entering each command and its argumentsb. Put them in a script and execute the scriptc. Separate each command with a sem

  4. You notice that your server load is exceptionally high during the hours of 10 am to 2 noon. When investigating the cause, you suspect that it may be a cron job scheduled by one of your users. What command can you use to determine if your suspicions are co

  5. Part of your /etc/lilo.conf file is as follows:boot=/dev/hdamap=/boot/mapinstall=/boot/boot.bimage=/boot/vmlinuz-2.0.36.0.7label=linuxroot=/dev/dha1You would like to start in single user mode but you do not get a boot: prompt. What changes should you make

  6. Which of the following statements is not true of LILO?Choose one:a. It can be used on a floppy to boot Linux.b. It must replace the master boot record on your hard drive.c. It will work with other operating systems such as DOS and Windows.d. It can specif

  7. When you look at the /etc/group file you see the group kmem listed. Since it does not own any files and no one is using it as a default group, can you delete this group?

  8. Which two documents should you consult before making any final purchasing recommendations?A) The overall Linux hardware compatibility listing.B) The hardware compatibility listing for the distribution you have chosen.C) The installation instructions for t

  9. When looking at the /etc/passwd file, you notice that all the password fields contain 'x'. What does this mean?Choose one:a. That the password is encrypted.b. That you are using shadow passwords.c. That all passwords are blank.d. That all password

  10. You have the file phonenos that contains telephone numbers and names separated by a comma. You want to change each comma to a semicolon. Which of the following will accomplish this.Choose one:a. cat phonenos | tr ',' ';'b. tr ',' &

  11. You need to delete the group dataproject. Which two of the following tasks should you do first before deleting the group?A. Check the /etc/passwd file to make sure no one has this group as his default group.B. Change the members of the dataproject group t

  12. 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 onea. Add the directory containing the application to your pathb. Specify the

  13. Advertisement
  14. You attempt to delete a file called sales.mem using the rm command but the command fails. What could be the problem?Choose one:a. You do not have delete rights to the file called sales.mem.b. You need to use the -i option with rm to delete a file.c. You d

  15. Why should you track the amount of free space on your disks?Choose one:a. If there is no free space, you will not be able to write to that filesystem.b. If there is no free space, you will not be able to install new applications.c. If the amount of free s

  16. If you type the command cat dog &> cat what would you see on your display?Choose one:a. Any error messages only.b. The contents of the file dog.c. The contents of the file dog and any error messages.d. Nothing as all output is saved to the file cat.

  17. You have a technician who will come in after hours to install new hardware in your system. You do not want to give him the root password, but he needs to be able to shutdown the system. How can you accomplish this?Choose one:a. You cannot do this; only ro

  18. What would be the result of issuing the command cat phonenos?Choose one:a. The file phonenos would be displayed in reverse order with the last line shown first.b. The first word of each line of the file phonenos would be displayed.c. The file phonenos wou

  19. What is meant by sticky bit?Choose one:a. When set on a directory, then only the owner of a file can delete it.b. When set on an executable, then any user can run the executable.c. When set on a file, only the owner can see the file in a directory listing

  20. Which tasks is not necessary when creating a new user by editing the /etc/passwd file?Choose one:

  21. You attempt to use shadow passwords but are unsuccessful. What characteristic of the /etc/passwd file may cause this?Choose one:a. The login command is missing.b. The username is too long.c. The password field is blank.d. The password field is prefaced by

  22. What command you execute to display the last five commands you have entered?Which partitions might you create on mail server HDDs other than the root, swap and boot partitions?Which partitioning tool is available in all distributions?Which two commands ca

  23. You have been assigned the task of determining if there are any user accounts defined on your system that have not been used during the last three months. Which log file should you examine to determine this information?Choose one:a. /var/log/wtmpb. /var/l

  24. Which of the following would improve your ability to provide user support?Choose one:a. Create a directory containing instructions for using all installed applications.b. Email your user's your office hours.c. Whenever a user has a problem, fix it and

  25. Each command has two types of output. There are standard output and standard __________.

  26. Advertisement
  27. You changed the GID of the sales group by editing the /etc/group file. All of the members can change to the group without any problem except for Joe. He cannot even login to the system. What is the problem?Choose one:a. Joe forgot the password for the gro

  28. How does single user mode differ from other runlevels?Choose one:a. init does not read the /etc/inittab fileb. Users can only log into the system across the network.c. Network services are disabled.d. All processes are stopped and the root filesystem is m

  29. The whereis command is helpful in finding the location of a command as well as its related man page. What is the disadvantage of using it?Choose one:a. Since it searches the entire directory tree, the whereis command can take an excessive amount of time.b

  30. If you type the command cat dog 1> cat 2> horse where would the output be sent?Choose one:a. Any error messages would be saved to the file horse and the standard output would be saved to the file cat.b. Any error messages would be saved to the file cat an

  31. While logged on as a regular user, your boss calls up and wants you to create a new user account immediately. How can you do this without first having to close your work, log off and logon as root?Choose one:a. Issue the command rootlog.b. Issue the comma

  32. You wish to rotate all your logs weekly except for the /var/log/wtmp log which you wish to rotate monthly. How could you accomplish this.Choose one:a. Assign a global option to rotate all logs weekly and a local option to rotate the /var/log/wtmp log mont

Advertisement