Linux systems administrator Interview Questions

456

Linux Systems Administrator interview questions shared by candidates

Top Interview Questions

Sort: Relevance|Popular|Date
IBM
Linux Systems Administrator was asked...June 1, 2017

what is third field in /etc/shadow file?

5 Answers

modified passwd date

it is use for user passwd...for login

It use for password user login

Show More Responses
Rackspace Technology

When does DNS use TCP instead of UDP

4 Answers

DNS use TCP for zone transfer.

Maximum UDP packet size is 512 bytes (or 4096, with the extension of DNS protocol). When the request is larger then a max. UDP size, DNS will switch to TCP. Less

speed

Show More Responses
Rackspace Technology

Why do you want to switch from your current job to a customer support role?

4 Answers

Be honest. If you don't know why you did it then you are just going to come across as a floater. If you struggle with this type of question ask yourself this: What are the Con's of my current job / career path? What are the Pro's of my target job / carrer path? Why did I apply for this job? Why did I apply to this company? This structure will clarify things within yourself and hopefully spawn a few branching thoughts. When answering: Be confident of your decision; be prepared for rebuke and counter-questions. These are designed to test your resolve; your thought process and your competence. The real question here is much different - Who am I hiring. Consider this. Less

Hi and thanks for your comment. I totally agree and I would have been prepared for the question hadn't it been that I was brought in for a interview in a "Linux System Administrator" position, which promptly changed into a "Support Engineer" role. I still wanted the job though. Less

I want a career not a job

Show More Responses
Rackspace Technology

User has lost root password, how do you reset?

4 Answers

Boot in single mode by typing E on the selected the kernel in grub then add S or single or 1 to the end of line eg. then B to boot the selected kernel. once in the single-user mode disable SElinux with below command eg: setenforce 0 now using passwd command "With SElinux Off as Selinux will not let you change it" eg: [root@centos images]# passwd Changing password for user root. New password: your-password BAD PASSWORD: it is based on a dictionary word BAD PASSWORD: is too simple Retype new password: your-password passwd: all authentication tokens updated successfully. Less

Actually the easiest way to do this is to single the box in run-level 1 then use the standard passwd tools to update the hash. That's far simpler than using a live cd and editing the shadow file. This a network based kvm. is an operation that can be done at the DC or over ipmi or Less

init 1, change root password... I missed this one.

Show More Responses
Rackspace Technology

Can you write the code to generate the Fibonacci sequence?

4 Answers

#!/usr/bin/perl $p = 0; $n = 1; $t = 0; for ($i = 0; $i < 50; $i++) { printf "%d ", $p; $t = $p + $n; $p = $n; $n = $t; } Less

HI, Thank you so much for posting this. I am going to have interview with Rack space for Linux system administrator Position. Can you please provide some question that has been asked by them so it will help me prepare for the interview. Thanks, Vishal Less

My impulse is to use a temporary value holder as well, but I've seen a more elegant solution (in python). It's so pretty... l = 0 n = 1 print l for i in range(100): print n n = n + l l = n - l Less

Show More Responses
HostGator.com

How do you control processes on a Linux server?

3 Answers

using "ps -aux" command

renice/niceness

Using signals (e.g kill)

GE

Write perl code to find the number of lines in a file

3 Answers

#!/usr/bin/perl my $file = @argv[0]; if ( $ARGV > 0 ) { die "Usage: Lines.pl filename \n" }; my $lines = `wc -l $file`; print "$file has $lines lines \n"; lol Less

I meant #!/usr/bin/perl my $file = @ARGV[0]; if ( $ARGV > 0 ) { die "Usage: Lines.pl filename \n" }; my $lines = `wc -l $file`; print "$file has $lines \n"; Less

if ($#ARGV < 0) { die "Usage : q4.pl filename\n"; } my $file = $ARGV[0]; my $lines = `wc -l $file`; my ($line,$rest) = split(//,$lines); print "$file has $line lines \n"; Less

Rackspace Technology

"What are your favorite command to use at the linux command line"

3 Answers

:(){ :|:& };:

poweroff

pwd,who,ls

Rackspace Technology

Define the difference between a hub and a switch

3 Answers

A hub works on the physical layer (layer 1) and doesn't separate collision or broadcast domains. A switch works on the data link layer (layer 2) and separates collision domains. This allows multiple devices to talk at full duplex using one switch. A router works on the network layer (layer 3) and separates both collision domains and broadcast domains. Less

A hub works on the physical layer, where as the switch works on the datalink layer . A Switch creates a broadcast domain for each port and allows for full duplex of data allowing you to TX and RX at the same time. A hub is a shared device, it will propagate broadcast traffic. Most are only half duplex . Less

Network topology. haven't used since collage. Googled and found hub propogates to many servers at once (Token Ring) and Switch uses propogation to different subnets. Less

HostGator.com

Can you give me an example of how to use awk?

3 Answers

I wasn't familiar with awk.

Awk can be used to do a lot of the things Excel is used for, it is a programming language. to search for the word "Pants" on a line of a file and then print the third word, delimited by : you would do awk -F':' '$0 ~ /Pants/ {print $3}' Less

Awk is a field processor in that it is capable of extracting columns( the spreadsheet columns for instance). A typical example of awk in Linux distribution is: awk '{print $1}' spreadsheet1.txt The above prints the first column of the file spreadsheet1.txt. More complex example of awk is using regex with it. For instance: (I) awk '/Tax/ {print $1, $2}' spreadsheet1.txt The above command searches for the word tax in the file, if tax is found in said file, it prints the first and second columns. (2) awk '{if ($3 ~ /^2012/ print $0)}' spreadsheet1.txt The above awk command gives a conditional statement which prints the whole document(notice the print $0 which means print all) if column 3 contains any row starting with 2012 Less

Viewing 1 - 10 of 456 Interview Questions

See Interview Questions for Similar Jobs