Linux interview questions – page 16
517 questions. Tap “Show answer” to check yourself.
-
Which tasks is not necessary when creating a new user by editing the /etc/passwd file?
-
What can you type at a command line to determine which shell you are using?
-
Which file defines all users on your system?
-
Which of the following environment variables determines your working directory at the completion of a successful login?Choose onea. HOMEb. BASH_ENVc. PWDd. BLENDERDIR
-
Which of the following commands will show a list of the files in your home directory including hidden files and the contents of all subdirectories?
-
Which of the following cannot be accomplished with the cat command?Choose one:a. Create a new fileb. Display the contents of a filec. Append information to another filed. Change the contents of a file
-
You wish to create a link to the /data directory in bob's home directory so you issue the command ln /data /home/bob/datalink but the command fails. What option should you use in this command line to be successful.
-
What is contained in the directory /proc?Choose one:a. System informationb. Administrative proceduresc. Boot proceduresd. Documentation on your system
-
After copying a file to a floppy disk, what should you do before removing the disk?
-
You have three files in the /home/ben/memos directory called letters, tom, betty. How could you determine each file's type by issuing only one command?
-
What does the apropos command do?Choose one:a. It is the same as the man -f command.b. It is the same as the man -K command.c. It searches the short descriptions from the man pages.d. It uses the locatedb database to answer your query.
-
Which of the following commands will make your home directory your working directory.Choose one:a. cdb. cd homec. cd ..d. cd home/username
- Advertisement
-
You want to find how to set the manpath variable so you type man man. What would you type while displaying the page to find the location where manpath is discussed?Choose one:a. grep manpathb. find manpathc. /manpathd. locate manpath
-
When typing at the command line, the default editor is the _____________ library.
-
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?
-
A variable that you can name and assign a value to is called a _____________ variable.
-
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 onea. fc -l find <enter> fc nb. history -l find <enter> history nc. Retype the commandd. fc -n find
-
You want to know how many lines in the kickoff file contains 'prize'. Which of the following commands will produce the desired results?Choose one:a. grep -n prize kickoffb. grep -c prize kickoffc. grep -v prize kickoffd. grep prize kickoff
-
Which of the following interprets your actions when typing at the command line for the operating system? Choose Onea. Utilityb. Applicationc. Shelld. Command
-
What are seven fields in the /etc/passwd file.
-
In order to improve your system's security you decide to implement shadow passwords. What command should you use?
-
Which of the following commands will display a file one screen at a time?Choose one:a. lessb. pagec. trd. cat
-
What command must you run to update the database used by the whatis command?Choose one:a. makewhatisb. updatedbc. make whatisdbd. The database is updated automatically.
-
You need to locate a file called salesdata that one of your user's created in his home directory but you do not know which one. How could you use the find command to locate this file?
- Advertisement
-
What command should you use to check the number of files and disk space used and each user's defined quotas?
-
What key combination can you press to suspend a running job and place it in the background?
-
You need to update your HOWTOs. Where should you go to acquire the latest versions?Choose one:a. Linux Mall and order a new CD.b. Your local Linux Users Group should have a copy.c. The web site for your distribution.d. Linux Documentation Project
-
You know that the info utility provides easier to understand documentation but you have never used it. How can you access a tutorial on using info?Choose one:a. man infob. infoc. info infod. info help
-
You want to search for sale and sales. What regular expression should you use?Choose one:a. sale*b. sale?c. ^saled. sale$
-
Major Focus on Linux and DNS