UNIX in addition to Linux Interview Questions in addition to Answers
Questions from diverse UNIX operating systems e.g. Solaris, Linux, IBM AIX or whatever other UNIX operating organisation is asked on dissimilar back upward in addition to programming interviews. I select e'er seen few interview questions from Linux in addition to UNIX along alongside SQL inwards almost every Java programming interviews. You only tin non afford non to gear upward questions from UNIX in addition to Linux until your Job absolutely doesn't require whatever run inwards UNIX operating system. I select collected many UNIX ascendency interview questions in addition to already shared them but I flora that except organisation admin jobs, many programming labor interviews alone focus on full general UNIX commands e.g. chmod, find or grep in addition to fundamentals similar finding files in addition to directories, managing file space, networking commands, checking procedure condition in addition to managing file permissions.
In this article, nosotros volition meet such form of often asked interview questions in addition to answers from UNIX in addition to Linux operating System. Questions are real key inwards nature in addition to non express to Linux alone in addition to every bit applicable to other UNIX operating systems e.g. Solaris, IBM AIX etc.
Many of these UNIX questions are asked during diverse interviews on companies similar TCS, Infosys, Citibank , Wipro, Capgemini in addition to Tech Mahindra. As I said they are real key in addition to tin endure asked inwards whatever company. If you lot come upward across whatever other often asked Linux questions which are non on this listing experience complimentary to suggest.
In this article, nosotros volition meet such form of often asked interview questions in addition to answers from UNIX in addition to Linux operating System. Questions are real key inwards nature in addition to non express to Linux alone in addition to every bit applicable to other UNIX operating systems e.g. Solaris, IBM AIX etc.
Many of these UNIX questions are asked during diverse interviews on companies similar TCS, Infosys, Citibank , Wipro, Capgemini in addition to Tech Mahindra. As I said they are real key in addition to tin endure asked inwards whatever company. If you lot come upward across whatever other often asked Linux questions which are non on this listing experience complimentary to suggest.
UNIX in addition to Linux Interview Questions in addition to Answers

1) How to uncovering all the links inwards a folder inwards UNIX or Linux ?
This is a tricky UNIX question as in that place is no specific ascendency to uncovering all symbolic links. Though you lot select ln ascendency for creating in addition to updating soft links but nada which gives you lot all the links inwards a directory. You demand to purpose ls ascendency which lists everything inwards the directory in addition to hence you lot demand to listing all the links, as they start alongside "l" as get-go characters, as shown inwards in a higher identify article .
here is the actual UNIX ascendency to uncovering all links inwards a directory :
linux@nyj872: ls -lrt total 2.0K -rw-r--r-- 1 Linux Domain Users 0 December six 2011 a drwxr-xr-x+ 1 Linux Domain Users 0 Sep 19 12:30 java/ lrwxrwxrwx 1 Linux Domain Users 4 Sep 19 12:31 version_1.0 -> java/ linux@nyj872: ls -lrt | grep '^l' lrwxrwxrwx 1 Linux Domain Users 4 Sep 19 12:31 version_1.0 -> java/
2) How to uncovering a procedure in addition to kill that?
Another classic UNIX interview questions. Answer of this enquiry is unproblematic if you lot are familiar alongside ps, grep in addition to kill command. past times using "ps -ef" you lot tin acquire a listing of all procedure in addition to hence purpose grep to uncovering your procedure in addition to acquire the PID of that process. Once you lot got PID you lot tin purpose the kill ascendency to kill that procedure as shown inwards this example of kill ascendency inwards UNIX.
3) How to run a computer program inwards the background inwards UNIX or Linux ?
an slowly UNIX or Linux interview question, alone when you lot know. You tin purpose & to run whatever procedure inwards the background in addition to hence you lot tin purpose jobs to uncovering the labor id for that procedure in addition to tin purpose fg in addition to bg ascendency to convey that procedure into foreground in addition to background. See how Linux works to acquire to a greater extent than nearly running a procedure inwards the background.
4) How to sort the output of a ascendency inwards opposite guild inwards Linux or UNIX ?
One to a greater extent than Linux commands interview enquiry which checks cognition of often used command. you lot tin purpose sort ascendency inwards UNIX to sort the output of whatever ascendency past times using PIPE. By using -r selection alongside sort ascendency you lot tin sort the output of whatever ascendency inwards opposite order. See these sort ascendency examples for to a greater extent than details.
5) How to practise an archive file inwards UNIX or Linux Operating System ?
Another interview enquiry based on cognition of UNIX or Linux command. you lot tin purpose the tar command to slap-up archives inwards UNIX or Linux. you lot tin fifty-fifty combine tar in addition to gzip to practise a compressed archive inwards UNIX.
6) What is the pregnant of a file has 644 permission ?
To respond this UNIX or Linux interview question, you lot must know basics of files in addition to directories inwards UNIX. The 644 represents permission 110 for the owner, permission 100 for grouping in addition to 100 for others which way read + write for an possessor who creates that file in addition to read alone permission for grouping in addition to others.
You tin besides meet The Linux Command Line: H5N1 Complete Introduction, a mass to acquire to a greater extent than nearly essential compaction commands inwards Linux.
You tin besides meet The Linux Command Line: H5N1 Complete Introduction, a mass to acquire to a greater extent than nearly essential compaction commands inwards Linux.
7) How volition you lot withdraw empty files or directories from /tmp ?
You tin purpose the find ascendency to uncovering all the empty files in addition to directory in addition to hence combine the output alongside xargs ascendency to withdraw all empty files from /tmp or whatever other directory inwards UNIX. See how to delete empty directory in addition to files inwards UNIX for exact ascendency in addition to to respond this UNIX ascendency interview questions inwards detail.
8) I select read permission on a directory but I am non able to acquire inwards it why ?
One to a greater extent than tricky UNIX questions. In guild to acquire into a directory, you lot demand to execute permission. if your directory does non select to execute permission hence you lot tin non become into that directory past times using the cd command. read UNIX files in addition to directory permissions for to a greater extent than information.
9) How practise you lot uncovering all files which are modified 10 minutes earlier ?
This is some other the Linux interview questions from often used ascendency e.g. uncovering in addition to grep. you lot tin use -mtime option of the uncovering ascendency to listing all the files which are modified 10 or m minutes before. meet these find ascendency examples for to a greater extent than details.
10) How to practise you lot uncovering the size of directory inwards UNIX or Linux ?
This is some other tricky in addition to fighting tough Linux interview enquiry as pop ls ascendency doesn't demonstrate the consummate size of directories inwards UNIX. you lot demand to purpose du ascendency to acquire a total size of directories including all subdirectories inwards UNIX. See How to uncovering directory size inwards UNIX for exact ascendency in addition to detailed explanation.
You tin besides depository fiscal establishment jibe out Practical Guide to Linux Commands, Editors, in addition to Shell Programming to acquire to a greater extent than nearly essential Linux commands. One of the best mass on Linux.
You tin besides depository fiscal establishment jibe out Practical Guide to Linux Commands, Editors, in addition to Shell Programming to acquire to a greater extent than nearly essential Linux commands. One of the best mass on Linux.
11) How practise you uncovering all the procedure listening on a exceptional port inwards Linux?
You tin purpose the netstat ascendency to uncovering all the procedure which are listening on a exceptional port as shown below:
$ netstat -nap | grep 8084 (Not all processes could endure identified, non-owned procedure information volition not endure shown, you lot would select to endure source to meet it all.) tcp 0 0 0.0.0.0:8084 0.0.0.0:* LISTEN 25314/java
Here 25314 is the procedure id of a tomcat server running on Linux. Since tomcat is a Java spider web application it started alongside coffee ascendency in addition to that's why you lot meet 25314/java. See here to acquire to a greater extent than nearly netstat ascendency inwards UNIX.
12) How to you lot uncovering all the procedure which has opened a file inwards Linux?
You tin purpose the lsof (list opened upward files) ascendency to uncovering out the procedure which has a file handgrip on the exceptional file. It's real useful ascendency to depository fiscal establishment jibe which procedure are reading a file. You tin purpose lsof ascendency as shown below to uncovering out all the process:
$ lsof /home/someuser/somefile
will listing all the procedure which has opened this file. you lot tin meet the command, PID, user in addition to total file path to uncovering out the process. See here to acquire to a greater extent than nearly the lsof ascendency inwards Linux.
13) How to mail HTTP asking from a Linux server?
You tin purpose either wget or scroll ascendency to mail HTTP request, both GET in addition to POST from a Linux auto as shown below:
$ scroll http://api.openweathermap.org/data/2.5/weather?q=London,uk&appid=bd82977b86bf27fb59a04b61b657fb6f {"coord":{"lon":-0.13,"lat":51.51},"weather":[{"id":804,"main":"Clouds", "description":"overcast clouds","icon":"04n"}],"base":"stations", "main":{"temp":282,"pressure":1022,"humidity":87,"temp_min":277.15, "temp_max":285.15},"visibility":10000,"wind":{"speed":1.5}, "clouds":{"all":90},"dt":1445577409,"sys":{"type":1,"id":5093, "message":0.0201,"country":"GB","sunrise":1445582275,"sunset":1445619056}, "id":2643743,"name":"London","cod":200}
14) How practise you lot practise a total directory construction e.g. /parent/child/grandchild inwards UNIX?
Well, you lot tin purpose the mkdir ascendency alongside option -p to practise all raise directories inwards 1 become as shown below:
[# ]$ mkdir -p software/java/app/config [# ]$ [# ]$ pwd /home/john [# ]$ cd software/java/app/config/ [# /software/java/app/config]$
You tin meet hither software/java/app/config directory is created inwards only 1 command. See here to acquire to a greater extent than about mkdir ascendency inwards UNIX
15) How practise you lot edit a large text file inwards UNIX without opening it?
You tin purpose the sed command to edit a large file inwards UNIX without opening it. The sed stands for flow editor in addition to you lot tin practise uncovering supplant inwards a file as shown below:
This ascendency volition uncovering "Apple" inwards line in addition to supplant it alongside "Microsoft" string inwards the file bestphone.txt.
These were some of the frequently asked UNIX in addition to Linux ascendency interview questions in addition to answers which look inwards many information technology Job interview which requires cognition of UNIX operating system, Including programming labor interviews e.g. core Java in addition to J2EE interviews. Questions from UNIX in addition to Linux is besides real pop during C in addition to C++ programming interviews.
Further Learning
Linux Command Line Basics
Linux Command Line Interface (CLI) Fundamentals
Learn Linux inwards v Days in addition to Level Up Your Career
15) How practise you lot edit a large text file inwards UNIX without opening it?
You tin purpose the sed command to edit a large file inwards UNIX without opening it. The sed stands for flow editor in addition to you lot tin practise uncovering supplant inwards a file as shown below:
$ sed 's/Apple/Microsoft/' bestphone.txt
This ascendency volition uncovering "Apple" inwards line in addition to supplant it alongside "Microsoft" string inwards the file bestphone.txt.
These were some of the frequently asked UNIX in addition to Linux ascendency interview questions in addition to answers which look inwards many information technology Job interview which requires cognition of UNIX operating system, Including programming labor interviews e.g. core Java in addition to J2EE interviews. Questions from UNIX in addition to Linux is besides real pop during C in addition to C++ programming interviews.
Further Learning
Linux Command Line Basics
Linux Command Line Interface (CLI) Fundamentals
Learn Linux inwards v Days in addition to Level Up Your Career
No comments:
Post a Comment