UNIX Interview Questions for Software Testers

UNIX Interview Questions for Software Testers

Which UNIX interview questions for software testers often come up when trying for a new job? Having an idea of what to expect at interview can be useful.

It’s beneficial for every software professional to have a good knowledge of different operating systems so they can work effectively in a range of situations and with different teams. In order to be proficient in performing testing in a UNIX operating environment, informative UNIX interview questions for software testers need to be asked so the most suitable candidate can be appointed to the job.

UNIX is an operating system designed and developed in 1969 at AT&T Bell Labs, NJ. It was written in C and is a stable system used to facilitate multi-tasking and multi-user functionalities. UNIX has a user-friendly GUI similar to Windows, although command knowledge is required to operate where there is no interface available.

No matter what stage you are at in your software testers career, preparing well for an interview is time well spent. Let’s take a look at the kinds of UNIX interview questions for software testers that you might be asked.

UNIX Interview Questions for Software Testers

Examples of UNIX interview questions for software testers

Q) What do you know about Kernel?

A) Kernel is considered to be the hub of UNIX. This master program controls the resources of the system and acts as an interface between an application and the hardware. The sole aim is to manage the communication between software (user application) and the hardware.

Q) What are the main tasks of Kernel?

A) Device Management, Process Management, Memory Management, Interrupt Handling, I/O Communication, File System.

Q) What is Shell, and what are its responsibilities?

A) The shell is the interface between user and system. It is a command language interpreter that executes commands from input device or file.

Responsibilities include Input/Output Redirection, Environment Control, Program Execution, Filename Substitution.

Q) What is meant by Superuser? What is the role of Super User?

A) The authorized user who has access to all files and commands within the system is known as the Superuser. The credentials of superuser are secured with the root password.

In UNIX, there are three main accounts: Root account, System account, User account. The root account is referred to as the Superuser and that user has complete access to all the files and commands on a system. This user can also be considered as a system administrator who has the ability to run any command without limitation.

Q) What do you know about the absolute path and related path?

A) The absolute path refers to a specific path as defined by the root directory. The absolute pathname addresses are system configuration files that do not change their location. The related path refers to the path defined by the user’s current working directory, i.e. present working directory (pwd).

Q) Specify the general format of UNIX command syntax.

A) We follow the pattern:

Command (-argument) (-argument) (-argument) (file name)

Q) What is FIFO?

A) UNIX has a useful feature known as ‘pipe’ which allows separate processes to communicate with each other in a separate manner. FIFO is similar to the pipe which act as a one-way flow of data. Data is read-only in the written order. This inter-process communication happens when data writes from the end of the pipe and reads from another side.

Q) Explain the command “rm –r *” in UNIX.

A) This command is used to erase all files in the directory along with subdirectories.

  • ‘rm’ use to delete files
  • ‘-r’ use to delete directories and subdirectories from within the file
  • ‘*’ indicate all the entries

Q) Name different file types available with UNIX.

A) Regular Files, Character Special Files, Directory Files, Block Special Files, FIFO, Socket, Symbolic Links.

Q) How do you kill any process in UNIX?

A) By using the syntax: kill PID

Kill command accepts process ID as a parameter.

Q) How do you determine if you have enough disk space available in UNIX server?

A) By using the command: df-kl

It will produce detail of the remaining space available in the server.

Q) What command should be used to make a new directory?

A) We use mkdir directory_name

Q) Explain ‘nohup’ in UNIX?

A) Nohup (or, no hang up) is a background process command that overrides the hup (hang up) signal, which is the conventional way a terminal is informed of a logout. Instead of being directed to a terminal, the file is redirected to a nohup.out file, if it hasn’t been redirected yet.

Q) Do you know about protection fault?

A) Protection fault occurs when a process tries to accesses a page for which it does not have permission to access.

Q) What is piping? List two commands where piping is used.

A) When two or more commands need to be combined, piping is used. The output of the first command is used for the input of the second command. Piping is represented in UNIX by this sign (|).

grep command: search file for a matching pattern
sort command: arranges lines of text alphabetically and numerically

Q) List some filename manipulation commands used in UNIX.

A) Few of them are as follows:

  • cat filename – will display the content of the file
  • mv old name new name – will move/rename an old name to the new name
  • rm filename – will remove/delete filename
  • Is –F – will display the information about the file type
  • cp source destination – is used to copy a source file into the destination

Q) Explain system call and library function?

A) In a system call, the call requests the OS to perform any task on behalf of the user programs. It is an interface which the kernel itself uses. Library functions are those common functions that are not part of the kernel but are used by the application program. Library functions are portable and perform certain tasks only in kernel mode as compared to the system call. Also, the library function takes less time to execute as compared to the system call.

Conclusion

This article lays out some frequently asked UNIX questions with their answers that are often part of software testers interviews. Although it is useful to remember the answers from the printed page, it’s recommended that learning by practice is the best way to master different commands.

Ali Imam
Author

Ali Imam

Ali is a software quality engineer having experience with eCommerce, social networking, and healthcare domains under his belt.

Receive our blog posts directly to your inbox!

Receive our software testing career blog posts directly to your inbox once a month.