Linux Interview Questions

Practice for Linux interviews by solving TestDome questions. Our interview questions are used by more than 7,000 companies and 450,000 individual test takers.

Jobseekers: Certify Your Knowledge

Take a Certification Test

Companies: Use Our Tests for Screening

Buy a Pack Of Candidates

Need to practice your Linux skills for an upcoming job interview? Try solving these Linux interview questions that test knowledge of Linux concepts such as Bash scripting, scheduling, environmental variables, and other skills. We’ll provide feedback on your answers, and you can use a hint if you get stuck.

These Linux interview questions are examples of real tasks used by employers to screen job candidates such as system administrators, network administrators, back-end developers, and others that require knowledge of the Linux operating system and it’s command line utilities.

1. Tar

Linux Bash Public

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

(Select all acceptable answers.)

Solve Question

2. Environment

Linux Bash Environmental Variable Public

The PATH variable is set in /etc/environment: 


And updated in .bash_profile:

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

Select the statements are correct.

(Select all acceptable answers.)

Solve Question

3. Elif

Linux Bash Public

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

if [ $value -eq 100 ]
    echo "value is eq 100"
elif [ $value -gt 100 ]
    echo "value is gt 100"
    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" ;;

(Select all acceptable answers.)

Solve Question

4. Cron

Linux Scheduling Public

The output of crontab -l contains the following job definitions:,
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.

(Select all acceptable answers.)

Solve Question

If you feel ready, take one of our timed public Linux Interview Questions tests:

Linux Online Test (Easy / Hard)

Not exactly what you are looking for? Go to our For Jobseekers section.
Dashboard Start Trial Sign In Home Tour Tests Questions Pricing For Jobseekers