Linux Interview Questions and Answers
Question - 51 : - Explain how you can view the text file using Terminal?
Answer - 51 : - To view the text file, go to the specific folder where the text files are located by using the command cd and then type less filename.txt.
Question - 52 : - Explain how to enable curl on Ubuntu LAMP stack?
Answer - 52 : - To enable curl on Ubuntu, first, install libcurl, once done use following command sudo/etc/init .d /apache2 restart or sudo service apache2 restart.
Question - 53 : - How can you run a Linux program in the background simultaneously when you start your Linux Server?
Answer - 53 : - By using nohup. It will stop the process receiving the NOHUP signal and thus terminating it you log out of the program which was invoked with. & runs the process in the background.
Question - 54 : - Explain how to uninstall the libraries in Linux?
Answer - 54 : - To uninstall the libraries in Linux, you can use command sudo apt-get remove library_name
Question - 55 : - Explain Process Management System Calls in Linux?
Answer - 55 : -
The process management system calls in Linux:
- fork(): Used to create a new process.
- exec(): Execute new process.
- wait(): wait until process execution.
- exit(): exit from the process.
System calls to get the Process id :
- getpid(): to find the unique process id.
- getppid(): to find the unique parent process id.
Question - 56 : - Explain File Permission groups in Linux?
Answer - 56 : -
There are three user-based permission groups for each file and directory.
They are:
- Owner: Owners only will have to access the file or directory, they will not impact the actions of other users.
- Group: These permissions apply only to the group, that has been assigned to the file or directory. They will not impact the actions of other users.
- All Users: These permissions are applied to all users on the system.
Question - 57 : - What Is a File system in Linux?
Answer - 57 : -
Linux file system stores and handles the data. Without a file system, it cannot know where the file starts from and where the file ends.
Question - 58 : - Explain different file system types in Linux?
Answer - 58 : -
In Linux, there are many file systems:
Ext, Ext2, Ext3, Ext4, JFS, XFS, btrfs, ufs, autofs, devpts, ntfs and swap.
Question - 59 : - Why LVM is required?
Answer - 59 : -
LVM stands for Large Volume Management, it is a storage management device. Users can create, resize, and delete LVM partitions. It increases abstraction, flexibility, and control. LVM is used to gather existing storage devices into the group and allocate logical units.
Question - 60 : - What is umask?
Answer - 60 : -
unmask stands for user file creation mode. When the user creates any file, it has default file permissions. So unmask will specify few restrictions to the newly created file (it controls the file permissions).
umask [-S] [mask]