Top 50 Linux/unix/solaris Interview Questions
Q1. What Is The Importance Of The Gnu Project?
This so-referred to as Free software program motion allows several benefits, including the liberty to run programs for any cause and freedom to observe and modify a software for your desires. It also lets in you to redistribute copies of a software program to other humans, in addition to freedom to enhance software and feature it released to the general public.
Q2. What Is Lilo?
LILO is a boot loader for Linux. It is used mainly to load the Linux operating machine into foremost memory in order that it may start its operations.
Q3. Explain The Importance Of Directories In A Unix System?
Files in a listing can surely be a directory itself; it'd be known as a subdirectory of the authentic. This capability makes it possible to expand a tree-like shape of directories and documents, that is vital in keeping an organizational scheme.
Q4. Does It Help For A Linux System To Have Multiple Desktop Environments Installed?
In fashionable, one computing device surroundings, like KDE or Gnome, is good enough to perform without troubles. It’s all a depend of preference for the consumer, despite the fact that the gadget lets in switching from one environment to another. Some applications will work on one surroundings and no longer paintings on the opposite, so it may additionally be considered a aspect in deciding on which surroundings to apply.
Q5. What Is Unix?
It is a transportable working gadget this is designed for each efficient multi-tasking and mult-user features. Its portability allows it to run on distinct hardware platforms. It turned into written is C and we could person do processing and control underneath a shell.
Q6. What Are Shell Variables?
Shell variables are a aggregate of a name ( identifier), and an assigned value, which exist in the shell. These variables may additionally have default values, or whose values may be manually set the use of the suitable task command. Examples of shell variable are PATH, TERM and HOME.
Q7. What Is The Use Of -l When Listing A Directory?
-l, which is normally used in list command like ls, is used to reveal documents in a protracted format, one record consistent with line. Long format refers to extra data that is associated with the file, including possession, permissions, facts and filesize.
Q8. Differentiate Cmp Command From Diff Command?
The cmp command is used in particular to examine two documents byte by way of byte, after which the primary encountered mismatch is proven. On the alternative hand, the diff command is used to suggest the adjustments this is to be made for you to make the 2 files equal to each different.
Q9. Describe About Fsck?
FSCK Utility is for checking and repairing the files gadget inconsistencies, It has 5 stages
Phase 1: Check Blocks and Sizes - assessments inodes for inconsistencies
Phase 2: Check Path-Names - assessments directory inode consistencies
Phase 3: Check Connectivity - exams that every one directories are related to the record gadget
Phase four: Check Reference Counts - compares hyperlink be counted facts from Phases 2 & three, correcting discrepancies
Phase five: Check Cylinder Groups - checks unfastened blocks and the used inode maps for consistency
Phase 6: Salvage Cylinder Groups - update the tables to reflect any adjustments made in in advance passes
Q10. In Linux, What Names Are Assigned To The Different Serial Ports?
Serial ports are identified as /dev/ttyS0 to /dev/ttyS@These are the equal names of COM1 to COM8 in Windows.
Q11. How Do You Refer To The Parallel Port Where Devices Such As Printers Are Connected?
Whereas underneath Windows you confer with the parallel port because the LPT port, below Linux you check with it as /dev/lp . LPT1, LPT2 and LPT3 might consequently be called /dev/lp0, /dev/lp1, or /dev/lp2 below Linux.
Q12. How Do You Open A Command Prompt When Issuing A Command?
To open the default shell (which is where the command spark off may be discovered), press Ctrl-Alt-F@This will provide a command line interface (CLI) from which you can run instructions as wanted.
Q13. Does The Ctrl+alt+del Key Combination Work On Linux?
Yes, it does. Just like Windows, you can use this key combination to carry out a device restart. One difference is that you gained’t be getting any affirmation message and therefore, reboot is instant.
Q14. Explain The Boot Process?
Boot method dived into four phases.
POST : Power on self check (POST), It will stumble on hardware, system host ID,serial No, architecture kind, reminiscence and Ethernet address and it will load the number one program known as bootblk.
OBPROM : Open boot programmable Diagnosing all of the device hardware and reminiscence. Initializing the boot parameter. Creating tool trees and cargo the boot block from (zero-15 region), it's miles known as as secondary boot -- programmable ufsboot.
KERNEL INITIALIZATION : ufsboot load the kernel (usual unix) kernel will load all the vital gadgets modules to mount the basis partition to maintain the booting method .
INIT PHASES : It will started by means of executing of /and so forth/init software and begin other procedure analyzing the /and so forth/inittab documents, because the directory inside the /and so on/inittab files.
Q15. What Is Piping?
Piping, represented by the pipe man or woman “to mix or extra instructions together. The output of the first command serves as input the subsequent command, and so forth.
Q16. Enumerate Some Of The Most Commonly Used Network Commands In Unix?
Telnet – used for remote login
ping – an echo request for checking out connectivity
su – person switching command
ftp – report trfer protocol used for copying documents
finger – information gathering command
Q17. How Do You Access Partitions Under Linux?
Linux assigns numbers on the stop of the power identifier. For instance, if the first IDE difficult force had three primary walls, they could be named/numbered, /dev/hda1, /dev/hda2 and /dev/hda3.
Q18. What Is Inode?
An inode is an access created on a segment of the disk set apart for a file device. The inode contains nearly all there may be to realize approximately a document, which includes the vicinity at the disk in which the report starts, the scale of the record, while the report changed into ultimate used, whilst the document was ultimate modified, what the numerous study, write and execute permissions are, who owns the document, and different data.
Q19. What Is Typical Size For A Swap Partition Under A Linux System?
The desired size for a change partition is twice the amount of bodily memory available at the device. If this is not viable, then the minimal size must be similar to the amount of reminiscence set up.
Q20. Type Of Filesystems ?
Disk Based FS : ufs (Unix FS), hsfs (High Sierra FS), pcfs (PC FS for DOS FAT32),
udfs : Universal Disk Format FS
Network FS : nfs (Network FS)
Memory based FS (Pseudo FS) : tmpfs, swapfs, procfs, mntfs
Q21. What Is Shell?
A shell acts as an interface among the consumer and the gadget. As a command interpreter, the shell takes instructions and units them up for execution.
Q22. How To Reduce The Reserved Space Of The Disk?
This will lessen the reserved space to two%
# tunefs –m 2 /dev/rdsk/c1d0s0
Q23. What Is Cli?
CLI is short for Command Line Interface. This interface lets in user to type declarative instructions to coach the pc to perform operations. CLI offers an advantage in that there is extra flexibility. However, different users who're already accustom with using GUI find it tough to don't forget instructions including attributes that include it.
Q24. What Is Command Substitution?
Command substitution is one of the steps being executed on every occasion instructions are processed via the shell. Commands that are enclosed in backquotes are performed by means of the shell. This will then replace the usual output of the command and displayed on the command line.
Q25. How Do You Change Permissions Under Linux?
Assuming you're the system administrator or the proprietor of a report or listing, you can supply permission using the chmod command. Use + image to feature permission or – symbol to disclaim permission, along side any of the following letters: u (user), g (institution), o (others), a (all), r (read), w (write) and x (execute). For example the command chmod cross+rw FILE1.TXT grants study and write get entry to to the record FILE1.TXT, that is assigned to corporations and others.
Q26. What Are The Basic Components Of Linux?
Linux is an running machine based totally on UNIX, and become first delivered through Linus Torvalds. It is based totally at the Linux Kernel, and might run on extraordinary hardware systems manufactured by means of Intel, MIPS, HP, IBM, SPARC and Motorola. Another popular detail in Linux is its mascot, a penguin discern named Tux.
Q27. What Is The Difference Between Init 1 And Init S?
If you switch from multiuser mode to init s and transfer it returned to multiuser mode.Then faraway useres mechanically reconnects to the gadget. Wherein as within the case of init @they have to reconnect manually me they must relogin
Q28. What Is The Use Of The Tee Command?
The tee command does matters: one is to get facts from the same old input and send it to standard output; the second is that it redirects a copy of that input information right into a document that was precise.
Q29. Describe File Systems In Unix?
Understanding file systems in UNIX has to do with knowing how files and inodes are saved on a machine. What takes place is that a disk or portion of a disk is about apart to store files and the inode entries. The complete useful unit is referred to as a document system.
Q30. What Is Kernel?
Kernel is the UNIX working device. It is the grasp application that controls the pc’s resources, dishing out them to one of a kind customers and to extraordinary obligations. However, the kernel doesn’t deal directly with a consumer. Instead, it begins up a separate, interactive application, known as a shell, for each user while he/she logs on.
Q31. Is There A Way To Erase All Files In The Current Directory, Including All Its Sub-directories, Using Only One Command?
Yes, this is feasible. Use “rm –r *” for this reason. The rm command is for deleting files. The –r choice will erase directories and subdirectories, together with files within. The asterisk represents all entries.
Q32. What Are File Names That Are Preceded By A Dot?
In popular, filenames which might be preceded via a dot are hidden documents. These documents can be configuration documents that hold essential records or setup information. Setting those documents as hidden makes it much less probable to be accidentally deleted.
Q33. What Are Symbolic Links?
Symbolic hyperlinks act further to shortcuts in Windows. Such hyperlinks factor to programs, files or directories. It additionally permits you instantaneous get entry to to it while not having to go immediately to the entire pathname.
Q34. Differentiate Relative Path From Absolute Path?
Relative direction refers back to the direction relative to the modern path. Absolute direction, however, refers to the precise direction as referenced from the foundation listing.
Q35. What Are Hard Links?
Hard hyperlinks factor immediately to the physical record on disk, and not at the direction name. This me that if you rename or pass the unique file, the hyperlink will now not ruin, since the hyperlink is for the report itself, not the direction in which the document is positioned.
Q36. How Do You Determine And Set The Path In Unix?
Each time you enter a command, a variable named PATH or direction will outline wherein listing the shell will search for that command. In instances in which an errors message changed into returned, the cause maybe that the command became not on your route, or that the command itself does now not exist. You also can manually set the course using the “set direction = [directory path]” command.
Q37. What Is A Superuser?
A superuser is a special kind person who has open get entry to to all files and commands on a machine. Note that the superuser’s login is typically root, and is included via a so-referred to as root password.
Q38. What Is The Basic Difference Between Bash And Dos?
The key differences between the BASH and DOS console lies in 3 regions:
BASH commands are case sensitive whilst DOS commands are not.
Below BASH, / man or woman is a directory separator and acts as an break out person. Under DOS, / serves as a command argument delimiter and is the directory separator.
DOS follows a conference in naming documents, that is 8 character document call observed by means of a dot and 3 character for the extension. BASH follows no such conference.
Q39. What Is The Standard Convention Being Followed When Naming Files In Unix?
One critical rule while naming documents is that characters that have special meaning are not allowed, together with * / & and %. A directory, being a special form of report, follows the equal naming convention as that of documents. Letters and numbers are used, along side characters like underscore and dot characters.
Q40. Explain About Port Of Telnet, Ssh, Ftp, Http, Nfs, Ntp?
Ftp port : 21
ssh port : 22
Telnet port : 23
ntp port : 123
smtp port : 25
printer port : 515
Q41. Is It Possible To See Information About A Process While It Is Being Executed?
Every method is uniquely identified by a method identifier. It is possible to view information and status concerning a system by means of the usage of the playstation command.
Q42. What Are The Differences Among A System Call, A Library Function, And A Unix Command?
A system call is a part of the programming for the kernel. A library function is a software that isn't always part of the kernel however which is to be had to customers of the gadget. UNIX commands, however, are stand-on my own programs; they'll comprise each gadget calls and library features of their programming.
Q43. Brief About Init Phases?
There are eight run degree.
Init0: Shutting down the gadget and bring lower back the machine to OBP Prompt (OK)
Init1: Single consumer mode for administrative
Init2: Multi consumer mode without resource sharing
Init3: Multi consumer mode with useful resource sharing
Init4: Not in use
Init5: Shutdown and strength off the device
Init6: Reboot the system to default run degree
Inits: Single consumer mode however user login are disabled
Q44. Describe The Root Account?
The root account is sort of a structures administrator account, and lets in you complete control of the system. Here you could create and keep consumer bills, assigning different permissions for every account. It is the default account each time you install Linux.
Q45. What Is The Maximum Length For A File Name Under Linux?
Any filename will have a maximum of 255 characters. This restriction does now not consist of the path call, so therefore the entire pathname and filename may want to nicely exceed 255 characters.
Q46. What Is Bash Shell?
It is a unfastened shell designed to paintings on the UNIX system. Being the default shell for maximum UNIX-based structures, it combines capabilities which are to be had each within the C and Korn Shell.
Q47. What Is The Difference Between Unix And Linux?
Unix at the start started as a propriety working device from Bell Laboratories, which afterward spawned into one-of-a-kind industrial variations. On the alternative hand, Linux is unfastened, open source and supposed as a non-propriety operating system for the hundreds.
Q48. What Is A Swap Space?
A switch space is a positive quantity of area used by Linux to briefly keep a few packages which can be jogging concurrently. This happens whilst RAM does not have enough memory to maintain all programs that are executing.
Q49. Differentiate Multiuser From Multitask?
Multiuser me that multiple man or woman can use the pc at the equal time. Multitask me that even a unmarried consumer could have the laptop paintings on multiple mission or software at the equal time.
Q50. What Is Linux Kernel?
The Linux Kernel is a low-stage structures software program whose principal position is to manage hardware resources for the person. It is likewise used to provide an interface for user-degree interaction.

