
- Unix / Linux for Beginners
- Unix / Linux - Home
- Unix / Linux - Getting Started
- Unix / Linux - File Management
- Unix / Linux - Directories
- Unix / Linux - File Permission
- Unix / Linux - Environment
- Unix / Linux - Basic Utilities
- Unix / Linux - Pipes & Filters
- Unix / Linux - Processes
- Unix / Linux - Communication
- Unix / Linux - The vi Editor
- Unix / Linux Shell Programming
- Unix / Linux - Shell Scripting
- Unix / Linux - What is Shell?
- Unix / Linux - Using Variables
- Unix / Linux - Special Variables
- Unix / Linux - Using Arrays
- Unix / Linux - Basic Operators
- Unix / Linux - Decision Making
- Unix / Linux - Shell Loops
- Unix / Linux - Loop Control
- Unix / Linux - Shell Substitutions
- Unix / Linux - Quoting Mechanisms
- Unix / Linux - IO Redirections
- Unix / Linux - Shell Functions
- Unix / Linux - Manpage Help
- Advanced Unix / Linux
- Unix / Linux - Regular Expressions
- Unix / Linux - File System Basics
- Unix / Linux - User Administration
- Unix / Linux - System Performance
- Unix / Linux - System Logging
- Unix / Linux - Signals and Traps
- Unix / Linux Useful Resources
- Unix / Linux - Questions & Answers
- Unix / Linux - Useful Commands
- Unix / Linux - Quick Guide
- Unix / Linux - Builtin Functions
- Unix / Linux - System Calls
- Unix / Linux - Commands List
- Unix / Linux - Useful Resources
- Unix / Linux - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Unix / Linux Interview Questions
Dear readers, these Unix Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Unix. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer −
Shell is an interpreter. It interprets the commands and submits for execution.
Bsh, csh, ksh and bash.
It is a short cut to the file or directory. ln is the command used for the same.
Solaris.
It interacts with hardware and most of the tasks like memory management, tash scheduling and file management.
Login program.
passwd.
Link count.
Command − logout / ctrl+d / command − exit
shutdown.
Yes.
reboot.
No, Linux is open source.
Redhat, Cent OS, Debian, Ubuntu and Fedora.
First.
A file/directory name beginning with. (dot) is considered as hidden one.
Ken Thompson
C
AT & T Bell labs.
The terminal associated with the respective login.
man
which
* And ?
0
A pathname is absolute if it is described in relation to root, so absolute pathnames always begin with a /. A pathname if it is relative to your current working directory is called as relative path. Relative pathnames never begin with /
Having an execute permission on a directory means to have traverse permission.
PS1
lp/lpr
A running instance of a program is called as a process.
vi − R
k, j, h and l
Yanking is the process of holding the cut or copied text into the buffer which can pasted.
:set nu
A first line in the shell script which tells which shell need to be used to execute the following commands in the shell script.
chmod
By prefixing the dollar ($) symbol for the shell variable.
unset.
$0
0
$?
expr
−f
Enclose the command in back quotes and assign it to a variable.
A here document is used to redirect input into an interactive shell script or program.
return
No, it is a convention.
sh <file>
Globally search for regular expression.
cut
Concatenation of files text.
OS assigns an unique process identification number for the currently executing processes is called as process-id (PID).
useradd
To connect to remote UNIX/Linux machine.
kill
To search for a file/files.
head.
UNIX
It give the process to have the privileges of the owner of the file during the instance of the program.
The process is dead but have not been removed from the process table.
Yes
It contains a program called MBR (Master boot record) which load the kernel as the part of the system booting.
alias
echo −e “text”. Option –e places the cursor on the same line
‘diff’ shows all the differences from two file whereas ‘cmp’ shows the only the first occurring difference. The said is applicable only if differences between the files do exist.
Place the commands connected with pipes (|).
Still the current working directory would be /
It the directory through which date I/O happen on to/from a device.
HOME.
ls −a
df
To execute a command/commands at a specific time.
Will receive the mail of the same.
LILO means linux loader, which loads the kernel into memory and starts the OS.
Double the RAM size.
ls −l|grep “^d”
uname
grep −c “pattern” <file>
To keep the command running even after the user who issues the command has logged out.
For UNIX/Linux every device is a file and are typically located in the directory /dev.
A file is given a unique number by OS and is called as inode.
Crontab
chmod
mv
4, 2 & 1 respectively for r, w & x.
Ampersand (&)
ps −e
tty
Shell built in commands are called as internal commands.
init s
write
UMASK is a Unix environment variable, which automatically sets file permissions created files.
022
UNIX File system.
Journal File System
Linus Torvalds
head −<n> file.txt | tail −1
while, until & for.
/home
/root
root
What is Next ?
Further you can go through your past assignments you have done with the subject and make sure you are able to speak confidently on them. If you are fresher then interviewer does not expect you will answer very complex questions, rather you have to make your basics concepts very strong.
Second it really doesn't matter much if you could not answer few questions but it matters that whatever you answered, you must have answered with confidence. So just feel confident during your interview. We at tutorialspoint wish you best luck to have a good interviewer and all the very best for your future endeavor. Cheers :-)