Unix/Linux Interview Questions
Job interviews are always stressful and they are tough enough to make fresher and even experienced one feel nervous and scary of the interview. Technical-interviews.com has been developed to help students and jobseekers to prepare for the tough job interview questions shot at them. Review the job interview questions and answers on networking basics, load runner, winrunner, .net, vb, java, oracle and many more common job interview questions online here. You have just made the first step to build the foundation for a successful interview by reviewing Technical-interviews.com.
Linux Admin Interview Questions
- How do you list the files in an UNIX directory while also showing hidden files? ls -ltra
- How do you execute a UNIX command in the background? Use the “&”.
- What UNIX command will control the default file permissions when files are created? umask
- Explain the read, write, and execute permissions on a UNIX directory. Read allows you to see and list the directory contents. Write allows you to create, edit and delete files and subdirectories in the directory. Execute gives you the permissions to run programs or shells from the directory.
Interview questions for Linux admin
- Advantages/disadvantages of script vs compiled program.
- Name a replacement for PHP/Perl/MySQL/Linux/Apache and show main differences.
- Why have you choosen such a combination of products?
- Differences between two last MySQL versions. Which one would you choose and when/why?
- Main differences between Apache 1.x and 2.x. Why is 2.x not so popular? Which one would you choose and when/why?
- Which Linux distros do you have experience with?
- Which distro you prefer? Why?
- Which tool would you use to update Debian / Slackware / RedHat / Mandrake / SuSE ?
Linux Admin Interview Questions
- How do you take a single line of input from the user in a shell script?
- Write a script to convert all DOS style backslashes to UNIX style slashes in a list of files.
- Write a regular expression (or sed script) to replace all occurrences of the letter ‘f’, followed by any number of characters, followed by the letter ‘a’, followed by one or more numeric characters, followed by the letter ‘n’, and replace what’s found with the string “UNIX”.
- Write a script to list all the differences between two directories.
Solaris Interview Question
- List the files in current directory sorted by size ? - ls -l | grep ^- | sort -nr
- List the hidden files in current directory ? - ls -a1 | grep “^\.”
- Delete blank lines in a file ? - cat sample.txt | grep -v ‘^$’ > new_sample.txt
- Search for a sample string in particular files ? - grep “Debug” *.confHere grep uses the string “Debug” to search in all files with extension“.conf” under current directory.
- Display the last newly appending lines of a file during appendingdata to the same file by some processes ? - tail –f Debug.logHere tail shows the newly appended data into Debug.log by some processes/user.
Solaris Interview Question I
- List some Hot Keys for bash shell ? - Ctrl+l – Clears the Screen. Ctrl+r – Does a search in previously given commands in shell. Ctrl+u - Clears the typing before the hotkey. Ctrl+a – Places cursor at the beginning of the command at shell. Ctrl+e – Places cursor at the end of the command at shell. Ctrl+d – Kills the shell. Ctrl+z – Places the currently running process into background.
- Display the files in the directory by file size ? - ls –ltr | sort –nr –k 5