Linux Interview Questions

Want to become an expert in cracking Linux interview questions/Linux system administrator interview questions?

Start with practicing the questions below. Whether a question involves multiple choice or live coding, we will give you hints as you go and tell you if your answers are correct or incorrect.

After that, take our timed public Linux Interview Questions Test.

To use our service for testing candidates, buy a pack of candidates.


1. Cron
Linux Scheduling Public

The output of crontab -l contains the following job definitions:

MAILTO=candidate@testdome.org,admin@testdome.org
0 0,12 1 */4 * df -h /

@hourly du -h / >> /var/log/disk_usage

0 6 1-12 * * /usr/bin/testdome_candidates

Select the statements about the job definitions and schedules that are correct.

(multiple correct answers possible)

Easy  
3min
   

2. Elif
Linux Bash Public

Select the statements about the output of the following script that are correct.

#!/bin/bash
value=$1
if [ $value -eq 100 ]
then
    echo "value is eq 100"
elif [ $value -gt 100 ]
then
    echo "value is gt 100"
else
    case $value in
    [1-3]*) echo "value is between 1 and 39 (inclusive)" ;;
    [4-5]*) echo "value is between 40 and 59 (inclusive)" ;;
    9[1-8]) echo "value is between 91 and 98 (inclusive)" ;;
    99) echo "value is $value" ;;
    *) echo "value is unknown" ;;
    esac
fi

(multiple correct answers possible)

Easy  
5min
   

3. Tar
Linux Bash Public

Select the commands that, when executed, would decompress and unpack the file file.tar.gz.

(multiple correct answers possible)

Hard  
2min
   

4. Environment
Linux Bash Environmental Variable Public New

The PATH variable is set in /etc/environment: 

PATH="/usr/local/sbin:/usr/local/bin:/usr/games:/usr/local/games"

And updated in .bash_profile:

export PATH=/usr/temp:$PATH:/usr/local/apps

Select the statements are correct.

(multiple correct answers possible)

Hard 
3min
   

If you feel ready, take one of our timed public Linux Interview Questions tests:
Not exactly what you are looking for? Go to our For Jobseekers section.