The assessment test is an excellent way to test yourself before starting to study. It gives you an idea of where you should start and why.
In an assessment test, test your current skills from beginning to advance lever for any subject or topic to check “what do you know and from where you should start learning?”
Here I have put some basic questions for Linux assessment, so you can test your Linux skill and choose right path for Linux Learning.
1. Which of the following commands is implemented as an internal command in bash?
2. How does man display information by default on most Linux systems?
- Using a custom X-based application
- Using the Mozilla web browser
- Using the less pager
- Using the Vi editor
3. You want to store the standard output of the ifconfig command in a text file (file.txt) for future reference, and you want to wipe out any existing data in the file. How would you do so?
- ifconfig < file.txt
- ifconfig >> file.txt
- ifconfig > file.txt
- ifconfig | file.txt
4. You type echo $PROC and the computer replies Go away. What does this mean?
- No currently running processes are associated with your shell, so you may log out without terminating them.
- The remote computer PROC is not accepting connections; you should contact its administrator to correct the problem.
- Your computer is handling too many processes; you must kill some of them to regain control of the computer.
- You, one of your configuration files, or a program you’ve run has set the $PROC environment variable to Go away.
5. You type a command into bash and pass a long filename to it, but after you enter the command, you receive a File not found error message because of a typo in the filename. How might you proceed?
- Retype the command and be sure you type the filename correctly, letter by letter.
- Retype the command, but press the Tab key after typing a few letters of the long filename to ensure that the filename is entered correctly.
- Press the up arrow key and use bash’s editing features to correct the typo.
- Any of the above.
6. Which of the following commands will print lines from the file test.txt that matches to changes and changed?
- grep change[ds] test.txt
- sed change[d-s] test.txt
- od “change’d|s'” test.txt
- cat test.txt changes changed
7. What programs might you use to learn what your system’s load average is? [select all that apply.]
8. What program would you use to display the end of a configuration file?
9. Which of the following commands will number the lines in example.txt? [Select all that apply.]
- fmt example.txt
- nl example.txt
- cat -b example.txt
- cat -n example.txt
10. How would you remove two lines of text from a file using Vi?
- In command mode, position the cursor on the first line and type 2dd
- In command mode, position the cursor on the last line and type 2yy
- In insert mode, position the cursor at the start of the first line, hold the Shift key down while pressing the down arrow key twice, and hit the Delete key on the keyboard.
- In insert mode, position the cursor at the start of the first line and press Ctrl+K twice.
11. Which of the following regular expression will match the string dig and dug but not dog?
12. Which of the following commands creates a display of processes, showing the parent/child relationship through links between their names?
- ps –forest
- ps aux
- ps -e
- All of the above
13. What is the effect of the following command?
$ myprog &> input.txt
- Standard error to myprog is taken from input.txt.
- Standard input to myprog is taken from input.txt.
- Standard input and standard error from myprog are written to input.txt.
- All of the above.
14. How many commands can you pipe together at once?
- An arbitrary number
15. Which of the following commads will change all occurrences of dog in the file pets.txt
- sed -s “dog” “mutt” pets.txt
- grep -s “dog||mutt” pets.txt
- sed ‘s/dog/mutt/’ pets.txt
- cat pets.txt | grep -c “dog” “mutt”
16. You use top to examine the CPU time being consumed by various processes on your system. You discover that one process, dfcomp, is consuming over 90 percent of your system’s CPU time. What can you conclude?
- Very little; dfcomp could be legitimately consuming that much CPU time or it could be an unauthorized or malfunctioning program.
- No program should consume 90 percent of a variable CPU time; dfcomp is clearly malfunctioning and should be terminated.
- This is normal; dfcomp is the kernel’s main scheduling process, and it consumes any unused CPU time.
- This behavior is normal if your CPU is less powerful than a 1.5 GHz Pentium 4, but on newer system, no program should consume 90 percent of CPU time.
17. Which two of the following commands are equivalent to one another? [Select two.]
- nice –value 10 crunch
- nice -n -10 crunch
- nice -10 crunch
- nice crunch
18. Which of the following are restrictions on ordinary user’s abilities to run renice ? [Select all that apply.]
- Users may not modify the priorities of processes that are already running.
- Users may not modify the priorities of other user’s processes.
- Users may not decrease the priority (that is, increase the priority value) of their own processes.
- Users may not increase the priority (that is , decrease the priority value) of their own processes.
19. What is the effect of the following command?
$ pr example.txt | lpr
- The file example.txt is formatted for printing and sent to the lpr program.
- The files example.txt and lpr are combined together into one file and sent to standard output.
- Tabs are converted to spaces in example.txt and the result is saved in lpr.
- None of the above.
20. A user types kill -9 12345 at a bash prompt. What is the probable intent, assuming the user typed the correct command?
- To cut off a network connection using TCP port 12345
- To display the number of processes that have been killed with signal 12345 in the last nine days.
- To cause a server with process ID 12345 to reload its configuration file
- To terminate a misbehaving or hung program with process ID 12345
7. c, d
9. b, c, d
17. c, d
18. b, d