Unix Interview Questions

Unix interview questions

When you are preparing for an interview it is important to know about the basics of the industry and also the company if you have specified any company. This habit will make your stay not scared before the interviews and will definitely give you more power and confidence. The below-stated information has the common answers of UNIX Interview Questions.

About Unix

Another name of good news for the software developers is UNIX. It is an operating system which is easy vaccine because it is portable. It supports multitasking as well as allowed multiple users. The most attractive feature of this operating system is that it works under the users and can be customised according to the user’s choice. It is not like the other operating systems which are rigid and have their own limits. UNIX gives you a widespread area to find out your zone. It is flexible and has no such disturbing limits. Basically, it runs through three parts which are the kernel, the shell and the programs. It is a great hub for running multifunctional software and provide enough support to get the work done smoothly.

Best Unix Interview Questions of 2020

1. What is Unix?

UNIX is a portable operating system that is designed for efficient multitasking and multi-user functions. Since it is a portable operating system, it can run on different hardware platforms. It is written in C language. It was developed by Ken Thompson, Dennis Ritchie, Douglas McIlroy, and Joe Ossanna.

2. List the distributions of UNIX.

UNIX has many distributions including Solaris UNIX, AIX, HP UNIX and BSD and many more.

3. List some features of UNIX.

UNIX includes the following features:

UNIX supports the multiuser system: In UNIX it is possible that many users can use the system with their separate workspace and logins i.e.it has full support for the multiuser environment.

UNIX supports the multitasking environment: In UNIX many apps can run at a single instance of time this is also known as a multitasking environment.

4. What are the core concepts of UNIX.

The core concepts of UNIX are given below.

  • Kernel- The kernel is also known as the heart of the operating system. Its fundamental role is to interact with the hardware and also monitor major processes like memory management, file management, and task scheduling.
  • Shell- It is also called command prompt, it connects the user to the operating system, whatever is typed by the user is translated into the language understood by the command prompt, and then the corresponding actions are performed.
  • Commands and Utilities- Many built-in commands help the user perform day to day activities.mv,cat,cp,and grep etc. Some of the examples
  • Directories- Every bit of data is stored in files, and these files are stored in directories, these directories combine to form a tree-like structure.

5. What is a UNIX shell?

 The UNIX shell is a program which is used as an interface between the user and the UNIX operating system. It is not a part of the kernel, but it can communicate directly with the server.

6. What is filter?

A filter is a program that takes input from standard inputs and performs some operation on that input to produce a result as standard output.

7. What are the devices represented in UNIX?

All devices in UNIX are represented by particular files that are located in /dev directory.

8. Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

Yes, you should use "rm-r*" command for this purpose.

Here, the "rm" command is used for deleting files, the -r option will erase directories and subdirectories with their internal data and * is used for selecting all entries.

9. What is necessary before running a shell script from the terminal?

You must make the shell script executable by using the UNIX "chmod" command.

10. How to terminate a shell script if statement?

A shell script if statement can be terminated by using "fi."

11. Write down some common shells with their indicators?

  • sh - Bourne shell
  • csh - C Shell
  • bash - Bourne Again Shell
  • tcsh - enhanced C Shell
  • zsh - Z Shell
  • ksh - Korn Shell

12. What are the main features of Korn Shell?

  • Arrays
  • Job control
  • Command Aliasing
  • String manipulation ability
  • Built-in integer arithmetic

13. What is the difference between cat command and more command?   

The cat command is used to display the file contents on the terminal, whereas more command is used like a pager which displays the screen page by page If the file is large and you have to scroll off the screen before you view it.

14. Which command is used to restrict incoming messages?

The "mesg" command is used to restrict incoming messages.

15. Which command is used to kill the last background job?

The "kill $!" Command is used to kill the last background job.

16. Which data structure is used to maintain the file identification?

The "inode" data structure is used to maintain the file identification. Each file has a separate inode and a unique inode number.

17. What a pipe? 

A pipe is used to join two or more commands by using a pipe "I" character. The output of the first command is propagated to the second command through the pipe.

18. What are the links and symbolic links in a UNIX file system?

A link is a second name for a file. Links are used to assign more than one name to a file, but cannot be used to designate a directory more than one name or link filenames on different computers.

Symbolic links are the files that only contain the name of another file. The operations on the symbolic link are directed to the file pointed by it. Both the limitations of connections are eliminated in symbolic links.

19. Explain system bootup in UNIX.

System bootup is the first thing that takes place when the power button is pressed in UNIX. Whenever the power button is pressed, BIOS is fired up and checks if all the hardware connected to the system are working correctly, after being successful the system asks the user to provide authentication.

20. How to change the password in UNIX operating system?

To change the password in UNIX operating system :

  1. Type in the command passwd.
  2. You will get a screen which prompts to enter your default(current) password, type your current password.
  3. if the current password is verified, then the terminal will prompt you to enter the new password.
  4. Enter the new password twice, and your password will be updated.

21. What is Bash Shell?

It is a free shell designed to work on the UNIX system. Being the default shell for most UNIX-based systems, it combines features that are available both in the C and Korn Shell.

22. Enumerate some of the most commonly used network commands in UNIX 

  • telnet – used for remote login
  • ping – an echo request for testing connectivity
  • su – user switching command
  • ftp – file transfer protocol used for copying files
  • finger – information gathering command

23. Differentiate cmp command from diff command.

The cmp command is used mainly to compare two files byte by byte, after which the first encountered mismatch is shown. On the other hand, the diff command is used to indicate the changes that is to be made in order to make the two files identical to each other.

24. What is the use of -l when listing a directory?

-l, which is normally used in listing command like ls, is used to show files in a long format, one file per line. Long format refers to additional information that is associated with the file, such as ownership, permissions, data, and filesize.

25. What is a superuser? 

A superuser is a special type user who has open access to all files and commands on a system. Note that the superuser's login is usually root, and is protected by a so-called root password.

26. How do you determine and set the path in UNIX?

Each time you enter a command, a variable named PATH or path will define in which directory the shell will search for that command. In cases wherein an error message was returned, the reason maybe that the command was not in your path, or that the command itself does not exist. You can also manually set the path using the "set path = [directory path]" command.

27. Is it possible to see information about a process while it is being executed?

Every process is uniquely identified by a process identifier. It is possible to view details and status regarding a process by using the ps command.

28. What is the standard convention being followed when naming files in UNIX? 

One important rule when naming files is that characters that have special meaning are not allowed, such as * / & and %. A directory, being a special type of file, follows the same naming convention as that of files. Letters and numbers are used, along with characters like underscore and dot characters.

29. Why is it that it is not advisable to use root as the default login?

The root account is very important, and with abusive usage, can easily lead to system damage. That's because safeguards that normally apply to user accounts are not applicable to the root account.

30. What is the use of the tee command? 

The tee command does two things: one is to get data from the standard input and send it to standard output; the second is that it redirects a copy of that input data into a file that was specified.

Career scopes and salary scale

When you are looking after a career taking the power of UNIX in hand then you should not worry about your career. It is one of the preferred operating systems for all. Even if you are not intending to do a job you can make your own start-up with UNIX. Generally, most of the freelancers use this operating system because of its portable nature. The standard income in this field is 20$per hour.

Conclusion

The launch of UNIX is not very recent but now the modern minds are using this portable operating system tremendously. The multifunctional behaviours make it more attractive and a focused choice of most of the software developers.

Intellinuts Terms : A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z