nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Linux / UNIX Interview questions and answers

This is a discussion on Linux / UNIX Interview questions and answers within the The Hangout forums, part of the The Lounge category; * To display a list of all manual pages containing the keyword "date", what command would you type? * What ...


Go Back   nixCraft Linux Forum > The Lounge > The Hangout

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 06-01-2008, 07:04 PM
Junior Member
User
 
Join Date: Jun 2008
My distro: Debian
Posts: 9
Rep Power: 0
shanthiavari is on a distinguished road
Default Linux / UNIX Interview questions and answers

* To display a list of all manual pages containing the keyword "date", what command would you type?
* What command will display the first several lines of a file called "junk"?
== Users and permissions practicum ==
* Rig it so everything in the folder gets deleted tonight at 10pm. Every night at 10pm.
== Local security ==
* How do you feel about `sudo`?
* What's the difference between `telnet` and `ssh`? What's a good use for each?
* How do you ensure your users have hard-to-guess passwords?
== Filesystem ==
* What is the difference between a symbolic and hard link? When would you use each?
* I have a file named `-fr`. How do I get rid of it?
* Why did I just ask that question?
* To partition or not? How?
* What are RAID 0, 1, 5, 0+1? What level would you use for a web server and why? A database server?

== `/etc` ==
* `ls -l /etc`. What is all this stuff?
* You added a line to `/etc/aliases`, but it doesn't seem to be working. Why?
* You've created a `zope` user to run Zope under. How do you secure it so someone doesn't guess its password, log in with it, and mess with stuff?
* Bring up `/etc/passwd`. What is all this junk?
* What are shadow passwords?
== Processes ==
* How many processes are running on your machine right now?
== Shells ==
* Name as many shells as you can.
* What's your favorite shell? Why?
* Write a shell script to append "snork" to the file "test" but only if "test" already exists.
* A user performed a `cd; chmod 644 .` before logging out. What problem occurs when he logs in the next time, and what level of privilege is required to correct the problem?

== Startup ==
* Describe the boot process of your favorite Linux in as much detail as you can.
* What are runlevels?
== Social ==
* Describe an experience you had with a difficult user.
* How do you keep up with current tools and practices?
* How did you document your work at your last job so someone else could pick up where you left off?
== Totally miscellaneous ==
* When debugging a core in gdb, what does the command `bt` give: core memory, heap usage, or calling stack?
* A user complains the web site is slow. What do you do?
== Apache ==
* How do you rig Apache to start up on boot?
* Apache doesn't start up on boot, and the thing above checks out okay. How do you track down the problem?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-03-2008, 05:08 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 554
Rep Power: 6
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

*To display a list of all manual pages containing the keyword "date", what command would you type?
Code:
man -k date
man -f date
Linux / UNIX: Getting help with man page

* What command will display the first several lines of a file called "junk"?
Code:
head  junk
man head
== Users and permissions practicum ==
* Rig it so everything in the folder gets deleted tonight at 10pm. Every night at 10pm.
Set cronjob, see How do I add jobs to cron under Linux or UNIX oses?

== Local security ==
* How do you feel about `sudo`?
sudo allows a permitted user to execute a command as the superuser or another user. sudo is much better than su and you don't have to share root password with other users/admin.
Linux sudo Configuration

* What's the difference between `telnet` and `ssh`? What's a good use for each?
TELNET, by default, does not encrypt any data sent over the connection (including password, and so it is often practical to eavesdrop on the communications and use the password later for malicious purposes;
SSH by default encrypt password and traffic. SSH is recommended for all use.

* How do you ensure your users have hard-to-guess passwords?
Set password policy, see
Howto: Protect account against a password cracking attack

Linux check passwords against a dictionary attack

Linux Password Cracking: Explain unshadow and john commands ( john the ripper tool )

== Filesystem ==
* What is the difference between a symbolic and hard link? When would you use each?
How to: Linux / UNIX create soft link with ln command

Understanding UNIX / Linux symbolic (soft) and hard links

* I have a file named `-fr`. How do I get rid of it?
Code:
rm -- -fr
rm \-rf
How to: Linux / UNIX Delete or Remove Files With Inode Number

* Why did I just ask that question?
For testing UNIX concepts and command line args.

* To partition or not? How?
Sure. See The importance of Linux partitions

* What are RAID 0, 1, 5, 0+1? What level would you use for a web server and why? A database server?
See level @ What are the different RAID levels for Linux / UNIX and Windows Server?

More about RAID - Can RAID Act As The Reliable BACKUP Solution For Linux / UNIX / Windows Server?

Linux Check The Health of Adaptec RAID array

== `/etc` ==
* `ls -l /etc`. What is all this stuff?
See, Linux / UNIX - Display the permissions of a file

* You added a line to `/etc/aliases`, but it doesn't seem to be working. Why?
Restart sendmail so that file get updated. The program "newaliases" must be run after this file is updated for any changes to show through to sendmail / postfix.
Code:
newaliases
* You've created a `zope` user to run Zope under. How do you secure it so someone doesn't guess its password, log in with it, and mess with stuff?
Deny login access to zope and set shell to /sbin/nologin. There are other ways too...

* Bring up `/etc/passwd`. What is all this junk?
See, Understanding /etc/passwd file format

* What are shadow passwords?
/etc/shadow file stores actual password in encrypted format for user's account with additional properties related to user password
Understanding /etc/ shadow file

== Processes ==
* How many processes are running on your machine right now?
Code:
top
atop
ps -e
ps aux
ps aux | wc -l
man ps
== Shells ==
* Name as many shells as you can.
Bourne shell (sh)
Almquist shell (ash)
Debian Almquist shell (dash)
Bourne-Again shell (bash)
Friendly interactive shell (fish)
Korn shell (ksh)
C shell (csh)
TENEX C shell (tcsh)
Es shell (e
esh (Unix) Easy Shell
rc shell (rc) - shell for Plan 9 and Unix
runscript The initial shell interpreter used to process startup scripts in Gentoo
scsh (Scheme Shell)
Stand-alone Shell (sash)
Z shell (zsh)

* What's your favorite shell? Why?
bash - it rocks and feature rich.

* Write a shell script to append "snork" to the file "test" but only if "test" already exists.
Code:
 [ -f test ] && echo "snork" >> test ||:
* A user performed a `cd; chmod 644 .` before logging out. What problem occurs when he logs in the next time, and what level of privilege is required to correct the problem?
User will not able to login. A root user can this problem by resting permission
cmod perm /home/user
. is current directory
.. parent directory


== Startup ==
* Describe the boot process of your favorite Linux in as much detail as you can.
See redhat or any other distro doc

* What are runlevels?
The term runlevel refers to a mode of operation in one of the computer operating systems that implement Unix System V-style initialization. Conventionally, seven runlevels exist, numbered from zero to six, though up to ten, from zero to nine, may be used.
Code:
man init
man runlevel
== Social ==
* Describe an experience you had with a difficult user.
* How do you keep up with current tools and practices?
* How did you document your work at your last job so someone else could pick up where you left off?
Use our social skillz

== Totally miscellaneous ==
* When debugging a core in gdb, what does the command `bt` give: core memory, heap usage, or calling stack?
Code:
man gdb
Read gdb page
* A user complains the web site is slow. What do you do?
Ask user to upgrade internet connection. If using windows ask to reboot windows .. LOL just kidding, google for slow apache problem. There could be zillions of causes

== Apache ==
* How do you rig Apache to start up on boot?
Code:
chkconfig httpd on
* Apache doesn't start up on boot, and the thing above checks out okay. How do you track down the problem?
Code:
chkconfig httpd on
httpd -t
service httpd on
netstat -tulpn | grep 80
tail -f /var/log/httpd/access_log
tail -f /var/log/httpd/error_log
HTH
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat

Last edited by nixcraft; 06-03-2008 at 05:12 PM. Reason: Typo added link to articles
Reply With Quote
  #3 (permalink)  
Old 06-05-2008, 02:15 PM
Junior Member
User
 
Join Date: Jun 2008
My distro: Debian
Posts: 9
Rep Power: 0
shanthiavari is on a distinguished road
Default thanks

hai

thanks for posting answers
Reply With Quote
  #4 (permalink)  
Old 06-26-2008, 01:56 PM
Member
User
 
Join Date: Jan 2008
My distro: Debian/Redhat
Posts: 39
Rep Power: 0
pansarevai is on a distinguished road
Default

Hi All,

I think this thread is really gud and helpful 4 interview. But we should put some tricky questions here...based on the subject. Every interview is going to be differenet and based on past experience and persent requirement.After getting the question rest u can google and find your answers.Here are some from me.

1. What is the transpernet proxy?
2.Can a squid proxy server is used as DNS, if yes how?
3.Is swap partisition mandetory in any installation, and why it is nessesary to define at the time of installation?
4.can apache be use as proxy server? how? wht is reverse proxy?
5.wht is the ssh version you are using. What are the drawbacks of ssh?
What is the defference between ssh version 1 and 2?

These are some of the questions...I will update some more as well as dont remember all of them. Also I will try to answer some of them if you need.

Thnx and looking 4 some more questions .....
Reply With Quote
  #5 (permalink)  
Old 06-26-2008, 05:20 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Any distro with shell
Posts: 902
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Quote:
Originally Posted by pansarevai View Post
1. What is the transparent proxy?
The client / browser does not need to configure a proxy and cannot directly detect that its requests are being proxied via squid or other proxy server.
Linux: Setup a transparent proxy with Squid in three easy steps

Quote:
Originally Posted by pansarevai View Post
2.Can a squid proxy server is used as DNS, if yes how?
No, you need to use caching dns or use ISP dns.
How To Set Caching DNS Server

Quote:
Originally Posted by pansarevai View Post
3.Is swap partition mandatory in any installation, and why it is necessary to define at the time of installation?
Yes, it is used to improve performance. Most installer force to create swap partition. You can install Linux w/o swap if you have tons of ram.
Quote:
Originally Posted by pansarevai View Post
4.can Apache be use as proxy server? how? What is reverse proxy?
A reverse proxy is a proxy server that is installed in the neighborhood of one or more web servers. All traffic coming from the Internet and with a destination of one of the web servers goes through the proxy server. Apache has mod_proxy for proxy support.
Quote:
Originally Posted by pansarevai View Post
5.What is the ssh version you are using. What are the drawbacks of ssh?
No drawbacks,
Code:
sshd -v
Quote:
Originally Posted by pansarevai View Post
.6 What is the difference between ssh version 1 and 2?
SSH Frequently Asked Questions
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #6 (permalink)  
Old 06-27-2008, 08:47 AM
Junior Member
User
 
Join Date: Jun 2008
My distro: Debian
Posts: 9
Rep Power: 0
shanthiavari is on a distinguished road
Default good interview questions i am also posting some interview questions

  • What are setuid/setgid in relation to file permissions?
  • What are setuid/setgid in relation to directory permissions?
  • What is an inode?
  • What does init do? What does inetd do?
  • What’s PGP/GPG; Public/Private Key cryptographic systems
  • What’s ssh? Setting up trust between accounts.
  • How does ssl work?
  • What are different directories in / for?
  • What to do , if the newly build kernel does not boot.?
  • Do you know what source management is? have you used it? what software?
  • How does the boot process (init level work on Linux
  • What do you know about configuring and/or compiling Apache;
  • Virtual Hosts?
  • .htaccess files?
  • mod_perl? mod_php?
  • log files and log management
  • What shell do you use?
  • bash?
  • do you know any other?
  • Name some basic shell command like cut and explain what they do
  • Sed/awk?
  • Which editor? vim/emacs/something else
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Linux Administrator Interview Questions jhn_daz@yahoo.com Linux software 4 08-19-2008 09:53 AM
Real Interview Questions Ashish Pathak The Hangout 14 06-26-2008 12:32 PM
VERITAS CLuster Server Interview questions Ashish Pathak The Hangout 1 11-18-2007 08:29 AM
Important questins for tech support interview. Yogesh Linux software 3 12-04-2006 09:09 AM
couple of noob questions sparky Shell scripting 8 04-09-2006 04:22 PM


All times are GMT +5.5. The time now is 12:20 AM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36