Faster Learning Tutorials

~/ home  / technology  / linux essentials  / quiz 2b

Linux Quiz 2b covering mkdir, wc, find, diff, join, and...

This is the second quiz covering the second set of 20 commands. The YouTube video that accompanies this page is more difficult because it covers 25 questions in 6 1/2 minutes. Give it a try too.


The point of having multiple learning modes, meaning text and video, is that you'll learn faster. It's like cross-training for your brain. And when you use the linux tutorials try typing everything, that way your hands will be involved too. Both video and text here cover the same 25 questions. If you haven't heard the mellow music in the video, give it a try. Jeez, you could even make it a game, like a pub quiz game. The possibilities are endless. Enjoy.

Video and quiz by Paul Alan Davis, CFA, December 17, 2016
Updated: August 1, 2017

Linux Command Line Quiz | 2b


Linux Command Line Quiz for Beginners | 2b (6:28)

Videos can also be accessed from the YouTube Playlist.

The Quiz

Click the box to show the answer. It's easy and free.

You may need to upgrade from Internet Explorer to use this functionality.


How do you count the number of words in all files in a directory?

$ wc -w *


How do you print the last 10 lines (the default) of your .bashrc file?

$ tail .bashrc


How do you show the help screen for the sdiff command?

$ sdiff --help


How do you remove dir1 directory and its 8 files with a confirmation?

$ rm -vr dir1


How do you delete file1.txt with a confirmation message?

$ rm -v file1.txt


How do you show the unique lines in the sorted file1.txt?

$ uniq file1.txt


How do you join file1.txt and file2.txt on the second field?

$ join -1 2 -2 2 file1.txt file2.txt


How do you show all lines and numbers for pwd in bash history?

$ grep -n "pwd" .bash_history


How do you show the first 8 lines of your .bash_history file?

$ head -n 8 .bash_history


How do you view help on the diff command?

$ diff --help


How do you show programs with grep in the title or description?

$ apropos grep


How do you show characters 1 to 5 from all rows in bash history?

$ cut -c 1-5 .bash_history


How do you backup file1.txt as file1.bak with a confirmation?

$ cp -v file1.txt file1.bak


How do you create a directory called bin with a confirmation?

$ mkdir -v bin


How do you paste file1.txt and file2.txt together with a ; delimiter?

$ paste -d ";" file1.txt file2.txt


How do you create a hard link to file1.txt contents called f1?

$ ln file1.txt f1


How do you sort the bash history file in reverse order?

$ sort -r .bash_history


How do you view the help screen for making links to files?

$ ln --help


How do you view corrected spelling of appel as apple in file1.txt?

$ sed 's/appel/apple/' file1.txt


How do you find files ending in .txt in the current and sub-directories?

$ find . -name "*.txt"


How do you compare all lines in file1.txt and file2.txt?

$ comm file1.txt file2.txt


How do you move file1.txt to an existing directory called files?

$ mv file1.txt files


How do you locate commands associated with the word sort?

$ apropos sort


How do you duplicate the .bashrc file with a .bak extension?

$ cp .bashrc .bashrc.bak


How do you show the last 200 bytes of file1.txt?

$ tail -c 200 file1.txt

Learn More About The Series

For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:

Linux Essentials Home

What's Next?

We'd love to have you join our growing community of Linux and data science lovers on YouTube, click here to subscribe for more free content.

  • Click Outline to see all content including other quizzes
  • Click Back for Linux Essentials
  • Click Next to take another Quiz

Outline Back Next

~/ home  / technology  / linux essentials  / quiz 2b

Linux quiz online
Linux command line
Linux shell
trivia quiz
pub quiz questions
free quiz