Linux is an operating system built on UNIX platform. Linux began its existence as server operating system and now has become useful as desktop OS, handheld devices OS and many more.
Many big giants such as Twitter, Linked In, YouTube, and Google all rely on Linux as their operating system.
The Linux OS is packaged in distributable form. It means multiple versions of the operating system can be created as a collection of software based around the Linux kernel and around a package management system.
The most popular Linux desktop distributions are:
- Linux Mint
The most popular server version of Linux distributions are:
Linux is very much similar to other operating system such as Windows and OS X. But, there are features of Linux that sets it apart from other operating systems.
Linux has 3 primary components:
- Kernel: It is a core component of Linux operating system. Major activities of Linux OS are undertaken by Kernel. It is modular in nature. If one piece of the kernel code happens to fail, the rest of the kernel will not crash. It will not hamper security of the whole hardware. Kernel’s modularity brings stability and system level security.
- System Library: This component contains code that can be used by running processes. The most commonly used software library on Linux systems, the GNU C Library (glibc). The library is comprised of specialized functions that access Kernel’s features. They implement most of the OS tasks without having access rights of Kernel module.
- System Utility: This component consists of programs that are responsible for performing individual level tasks.
Basic Features of Linux
There are some basic features of Linux listed below:
- Open Source: Linux is community based development project, so that its source code is available free. Worldwide web programmers work in collaboration to enhance capability of Linux OS.
- Portable: Linux is portable in nature. It means the way it works on desktop system, the same way it works on mobile device. It works the same way on different types of hardware.
- Security: It provides authentication features like password protection, controlled access to specified files/folders etc.
- Multi-user: Linux is multi-user operating system that enables multiple users accessing system resources such as memory / application programs at the same time.
- Shell: The shell is a program that takes your commands from the keyboard and gives them to the operating system to perform. It works as interpreter program that is used to do various operations. In Linux, the shell starts when the user logs into the system or open a console.
- Multi-programming: Linux has the capability to execute multiple applications at the same time.
Linux System Architecture
Linux OS architecture is based on multiple layers. It is divided into 4 main layers listed below:
- Hardware Layer: It is the layer where all peripheral devices such as RAM, HDD, CPU reside.
- Kernel: It is the core component that interacts with hardware and provides low level services to upper layer components.
- Shell: An interface to kernel that restricts the visibility of kernel to the user. It takes commands from the user and executes kernel functions.
- Utilities: Programs that provides users functionalities of operating system.
Popular Linux Commands
Below is a list of frequently used Linux commands.
|mkdir [-m] DIRECTORY||Create directory with mode|
|mv- DIRECTORY1 DIRECTORY2||Change the name of the directory
Type mv followed by the current name of a directory and the new name of the directory.
|pwd||Shows you the full path to the directory you are currently in.|
|rm -r||Removes directories and files within the directories recursively.|
Linux Interview Questions
- Which are most popular Virtual Server versions of Linux?
The most popular Virtual Server versions of Linux are:
- Citrix XenServer
- Which Linux distribution should you select?
It always depends on which system you want to use the Linux, desktop, server, virtual server or embedded devices. In all these there are certain common factors that you need to look for while selecting the Linux distribution. Following are those factors:
- Code base stability
- Frequency of change in code
- Easy to update software packages
- Easy to upgrade to the next version
- Large developer base
All the existing Linux distributions fit into the computer world. Based on your priorities and requirements, you should select the appropriate Linux distribution.
- What is the basic difference between UNIX and Linux Operating System?
Linux and UNIX are similar in terms of end user perspective. For the user, command operations are similar in both OS. Internally, kernel, hardware and patches differ in both OS.
The table below lists the differences between UNIX and Linux.
|License||Most of Linux distributions are free and open source such as CentOS, Fedora, OpenSUSE, Ubuntu||UNIX OS is proprietary and commercially used such as Oracle’s Solaris, Hewlett-Packard’s HP-UX, and IBM’s AIX|
|Kernel||Kernel is core components of any OS. Linux kernel is modular in nature and can be integrated with other features like libraries, editors, compilers||The source code of UNIX kernel is not available as free. UNIX kernel have commercial version available.|
|Patches and Updates||As Linux is open source system, its source code is available and can be manually updated. The updates are available based on the user feedback and developers’ bug fixes. The updates and patches are not thoroughly tested in case of Linux.||UNIX OS is more stable in terms of releasing patches and upgrades. Frequency of release and updates is lesser than Linux releases.|
|File System Support||File system supported in Linux are as below:
adfs, affs, autofs, cifs, coda, coherent, cramfs, debugfs, devpts, efs, ext, ext2, ext3, hfs, hpfs, iso9660, jfs, minix, msdos, ncpfs, nfs, nfs4, ntfs, proc, qnx4, ramfs, reiserfs, romfs, smbfs, sysv, tmpfs, udf, ufs, umsdos, usbfs, vfat, xenix, xfs, xiafs
|File system supported in UNIX are as below:
|Scalability||Linux has high scalability in terms of hardware architecture and file system support||UNIX has limitations in terms of file system support as it supports very few file systems|
- What is the difference between Telnet and Secure Shell (SSH)?
Telnet and SSH both are communication network protocols used to manage remote servers. SSH provides security mechanisms in terms of data encryption whereas Telnet is less secure and transmits data in plain text format. SSH requires more bandwidth than Telnet.
- Which command you will use in Linux to restrict IP so that restricted IP may not use the FTP server?
Below are the step-by-step instructions to restrict the suspicious IP address:
- First of all, you need to integrate tcp_wrapper to block IP address.
- Open the configuration file ‘/etc/vsftpd.conf’.
- In the file, set the parameter ‘tcp_wrapper=YES’.
- Add the suspicious IP in the ‘deny’ file at location ‘/etc/host.deny’.
# vi /etc/hosts.deny
- Add the IP address as below.
vsftpd:18.104.22.168 Where22.214.171.124 is IP address that needs to be blocked.
- Which command you will use to search for files in the Home directory and delete them all at once in Linux?
Use the ‘find’ command to search for file with specific extension. For example: .tar. Then, use rm command to delete all the .tar files.
# find /home/ name ‘*.tar’ | xargs rm rf