Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Online Linux Bash Test

Topics Covered

  • Environmental Variables
  • Arguments
  • Awk
  • Subshells
  • Searching for strings
  • Redirection
  • Bash design

Useful for hiring

  • Linux Bash Developer
  • Bash Programmer
  • System Programmer-Linux

Start hiring job-fit candidates using this assessment


"Our recruitment team loves Interview Mocha especially for their skill assessments, simulators, and friendly support. Since using Interview Mocha, we interview only relevant candidates, and this has reduced our time to hire. Recruitment is no longer an hassle for us."

Christoph, e-Zest GmbH

Assume that you have a log file ‘entries.log’ with timestamps included for each log entry. You need a file that includes the log entries without the timestamps using bash noting that this is a sample for the log entry: 2018-01-01 12:56:42 status unpacked dpkg:amd64 1.18.4ubuntu1.3

Which of the following can you use to do this?

    • awk '{ print substr(index($0, ($0,$3)) }' entries.log

    • awk '{ print substr($0, index($0,$3)) }' entries.log

    • awk '{ print substr($0, index($1,$3)) }' entries.log

    • awk '{ print substr($1, index($0,$3)) }' entries.log


You are gathering information about a system using a script. You need to identify the number of defined variables in the OS globally, how can you achieve this?

    • lsenv|wc -l

    • listenv |wc -l

    • getenv|wc -l

    • printenv|wc -l


Assume that you need to delete all empty files in the current directory how can you achieve this through bash?

    • find . -empty -type f -delete

    • find . -empty -delete

    • find . -empty -type f -rm

    • find . -empty -type f -rm -rf

Test details:

Linux Bash aptitude test enables employers and recruiters to identify potential hires by evaluating their working skills and job readiness. For this reason, the emphasis is laid upon evaluating the knowledge of applied skills gained through real work experience, rather than theoretical knowledge. 

Linux Bash pre-employment test may contain MCQ's (Multiple Choice Questions), MAQ's (Multiple Answer Questions), Fill in the Blank, Descriptive, Whiteboard Questions, Audio / Video Questions, True or False.

Test Duration: 20 minutes

10 Application Questions

Test description:

A Bash script is a plain text file which contains a series of commands. These commands are a mixture of commands we would normally type ourselves on the command line (such as ls or cp for example). Bash is a command processor that typically runs in a text window where the user types command that cause actions. Bash can also read and execute commands from a file, called a shell script. 

Online Linux Bash test helps technical recruiters and hiring managers to assess candidate’s ability to perform complex tasks by writing and implementing programs with Bash scripts. Linux Bash online test is created & validated by experienced industry experts to assess & hire Linux Bash developer as per the industry standards.
Linux Bash Shell programming test helps to screen the candidates who possess traits as follows: 

1.  Excellent knowledge of developing and debugging using BASH
2.  Strong experience in Linux/Unix and scripting in bash
3.  Ability to work on various Linux distributions
4.  Excellent knowledge in Bash and Shell commands
Interview Mocha’s Linux Bash online test has a unique set of questions. You can also create or ask us to create a customized test that includes questions which are specific to your job-requirement.
Interview Mocha’s powerful reporting feature helps you to analyze section wise performance of candidate in Linux Bash Shell programming test. It will also assist you to gauge his strengths and weaknesses in each section. Moreover, you can always use our candidate ranking tool to screen best performing candidate amongst others.

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates