Interview questions for Unix management
1. Define a single-user system?
A personal computer which possesses an operating system designed to operate by only one user at a given time is known as a single-user system. Single user system becomes more popular since low-cost hardware and availability of a wide range of software to perform different tasks.
2. List a few significant features of UNIX?
The following are a few features of UNIX;
• Machine independent
• Multi-user operations
• Unix Shells
• Hierarchical file system
• Pipes and filters
• Background processors
• Development tools
3. What is inode?
An inode is an entry created on a section of the disk set aside for a file system. The inode contains nearly all the information about a file. It includes the location on the disk where the file starts, the size of the file, when the file was last used when the file was last changed, what the various read, write and execute permissions are, who owns the file, and other information.
4. You have a file called tonky in the directory honky. Later you add new material to tonky. What changes take place in the directory, inode and file?
The directory entry is unchanged since the name and inode number remain unchanged. In the inode file, the file size, time of last access, and time of last modification are updated. In the file itself, the new material is added.
5. What is Shell?
The program which serves as an interface between the user and the system called a shell. It is the layer of programming that understands and executes the commands a user enters. In some systems, it’s also called a command interpreter.
6. What are the basic responsibilities of a shell?
Following are the responsibilities of a shell;
• Program Execution
• Input/ output redirection
• Filename and variable substitution
• Pipeline hookup
• Environment control
• Integrated programming language
7. What are shell variables?
Shell variables are a combination of a name ( identifier), and an assigned value, which exists within the shell. These variables may have default values, or whose values can be manually set using the appropriate assignment command. Examples of shell variable are PATH, TERM, and HOME.
8. What are the differences among a system call, a library function, and a UNIX command?
A system call is part of the programming for the kernel. A library function is a program that is not part of the kernel but which is available to users of the system. UNIX commands, however, are stand-alone programs; they may incorporate both system calls and library functions in their programming.
9. 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.
10. 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
11. What is the general format of UNIX command syntax?
Generally, UNIX shell commands follow the following pattern
Command (-argument) (-argument) (-argument) (filename)
12. Describe the usage and functionality of the command rm –r * in UNIX?
The command rm –r * erases all files in a directory with its subdirectories.
• rm is for deleting files
• -r is to delete directories and subdirectories with files within
• * is indicate all entries
13. Describe the term directory?
A directory in UNIX is a specialised form of a file that maintains a list of all the files which are included in it.
14. Differentiate between absolute and related path?
Absolute path refers to the exact path as defined from the root directory whereas, related path refers to the path related to the current locations.
15. Which UNIX command lists files/folders in alphabetical order?
The ls –l command is used to list down files and folders in alphabetical order, sorted with modified time.
16. Describe a link in UNIX.
Another name for a file is a link. It is used to assign more than just one name for a file and is not valid to assign more than one name to a directory or to link filenames on different computers.
General command ‘– ln filename1 filename2′
A symbolic link is a file that is used to contain only the name of other files included in it. Directed to the files pointed by it is the operation of the symbolic link.
17. What is pid?
Pid is short for Process ID. It is used primarily to identify every process that runs on the UNIX system, whether it runs on the foreground or runs in the background. Every pid is considered unique.
18. How does the system know where one command ends and another begins?
Normally, the newline character, which is generated by the ENTER or RETURN key, acts as the signpost. However, the semicolon and the ampersand characters can also serve as command terminators.
19. What is wild-card interpretation?
When a command line contains wild-card characters such as ‘*’ or ‘?’. They are replaced by the shell with a sorted list of files whose pattern matches the input command. Wild-card characters are used to setup a list of files for processing, instead of having it specified one at a time.