What is Linux system Administrator?
In IT field, Linux is a main role in computing technology, powering everything from mobile phones and personal computers/systems to supercomputers and servers. The main job of a systems administrator is to manage the operations of a computer systems. In Linux System Administrator is a person who has ‘root’ access that is ‘superuser’. It means he has privilege to access everything which includes all user accounts, all system configurations, home directories with all files therein, all files in system.
What is kernel?
A kernel is the part of the operating system that manages system resources. Kernel is responsible for controlling access to CPU, memory, disk I/O, and networking.
What is Shell?
Shell provides user interface to the UNIX system. It takes input from user and process it and send show result to user.
What is the Minix?
Minix (Mini-Unix) is the UNIX clone written by Andrew Tanenbaum at VU University, in Amsterdam when universities were no longer allowed access to the UNIX source code. MINIX also inspired the creation of the Linux kernel.
What is POSIX?
POSIX (Portable Operating System Interface) is a set of standard operating system interfaces based on the UNIX operating system. It is the standard for ensuring compatibility between UNIX versions.
What is name of first process in Linux?
‘init’ is the first process in Linux which is started by kernel and whose pid is 1.
Who initiated the GNU Project?
GNU project was initiated by Richard Stallman on 27 September 1983 at MIT. Main motive of this project was to give freedom and control in use of software’s. GNU software guarantees these freedom-rights legally via its license. Users are free to run the software, share it, copy it, distribute it, study it and modify it.
What is the use of sysctl command?
In this command the /sbin/sysctl command is used to view, set, and automate kernel settings in the /proc/sys/ directory.
Explain the procedure for re-installing Grub in Linux?
- Download Ubuntu Installation / Live cd
- Boot from Ubuntu Installation / Live cd – usb, burned cd etc.
- During boot select “Try Ubuntu”, don’t select install!
- Mount your Linux root partition
- sudo mount /dev/sda6 /mnt (Assuming /dev/sda6 is the Linux root partition)
- Install / reinstall grub
- sudo grub-install –root-directory=/mnt/ /dev/sda ( where /dev/sda is your primary disk)
- Installation finished. No error reported.
- Reboot your system, remove bootable CD and we should have the boot menu ready when the system starts.
What is the use of DAS, NAS and SAN?
DAS: Direct Attached Storage is a block device from a disk which is physically attached to the host machine (such as /dev/sda or /dev/sda1). You must place a filesystem upon it before it can be used. There are limitations like the number of servers that can access it. Storage device or say DAS storage has to be near to the server storage and the resources are dedicated but generally, you are not able to dedicate the hard disks to multiple computers. DAS solution is inexpensive and simple to configure. Technologies to do this include IDE, SCSI, SATA, SAS etc.
NAS: Network-attached storage is a type of dedicated file storage device that provides local-area network local area network (LAN) nodes with file-based shared storage through a standard Ethernet connection. NAS authenticates clients and provides shared to other computers and users over a network so it requires a dedicated ip address to be accessible. NAS devices generally run an embedded operating system on simplified hardware and lack peripherals like a monitor or keyboard. Network file systems can be considered safe enough to be used in a concurrent way, the protocol implementation will take care of problems due to concurrent access to the same resource (file), normally by locking the file to a single user/requester. You can set up automatic or manual backups and file copies between the NAS and all other connected devices by using a software program. It is an easy way to provide RAID redundancy to mass number of users, it allows users permissions, folder privileges, restricted access to documents, etc.
SAN: Storage Area Network is the storage area network which is useful for long distance storage. SAN has the particularity to be a block level storage solution that NAS doesn’t provide. It is optimized for high volume of block level data transfer. SAN is performed best when used with fiber channel medium (optical fibers, and a fiber channel switch). It provides synchronous replication and it is an architecture to attach remote storage to make it appear as though it is locally attached. There are highly scalable, both from a capacity and performance perspective. If offers a centralized storage management. It is a solution for terabytes of storage and multiple simultaneous access to files e.g. streaming audio/video and it allows virtual environments, cloud computing, etc.
What is SAS?
SAS: Serial Attacched SCSI This allows to create entire SANs as SAS supports routing and addressing.
What is Initrd?
Initrd means initial ram disk, which contains the temporary root filesystem and necessary modules which helps in mounting the real root filesystem in read mode only.
What is Bootloader?
Bootloader is a program that boots the operating system and decides from which kernel OS will boot.
What is a Zombie?
Zombies are the premature process, whose mature parent process died without retrieving its children. These processes cannot be killed by normal “kill” command.
What is Swap Space or swap file?
Swap space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. While swap space can help machines with a small amount of RAM, it should not be considered a replacement for more RAM. Swap space is located on hard drives, which have a slower access time than physical memory.
What is MX Record?
MX Record numerically ranks the mail server, when you would like to receive email for a domain. The preference of the email depends on the lowest MX record, but you are allowed to specify multiple email servers with the same value for simple load balancing.
What is CUPS?
CUPS (Common UNIX Printing System) is an open source printing system developed by Apple Inc. CUPS uses the Internet Printing Protocol (IPP) to allow local printing and print sharing.
What is Soft Link?
Soft link is a method to create short cuts in Linux. It is similar to windows short cut feature.
What is LVM?
LVM (Logical Volume Manager) is a storage management solution that allows administrators to divide hard drive space into physical volumes (PV), which can then be combined into logical volume groups (VG), which are then divided into logical volumes (LV) on which the filesystem and mount point are created.
What is RAID?
RAID (Redundant Array of Inexpensive Disks) is a technology that is used to increase the performance and/or reliability of data storage. RAID is a method by which same data or information is spread across several disks, using techniques such as disk striping (RAID Level 0), disk mirroring (RAID Level 1), and disk striping with parity (RAID Level 5) to achieve redundancy, lower latency, increased bandwidth, and maximized ability to recover from hard disk crashes. RAID 0: Blocks striping, No mirror, No Parity
- RAID 1: Blocks mirroring, No striping, No Parity
- RAID 5: Blocks striping with parity or distributed parity
- RAID 6: Blocks striping with double parity
- RAID 10: combining mirroring and striping
What are run levels in Linux?
Run levels define what processes or services to run automatically while the system boots up. This is defined in /etc/inittab file.
Run levels on Debian systems default to this kind of setup:
- 0 = halted (shutdown)
- 1 = single user (maintenance mode)
- 2 = multi-user mode without NFS
- 3= Full multi user mode (text based) with networking
- 4= not used
- 5= Multi user mode with Graphical User Interface
- 6 = reboot
What are inodes in Linux? How to find the inode associated with a file?
An inode is a data structure on a filesystem on Linux and other Unix-like operating systems that stores all the information about a file except its name and its actual data. When a file is created, it is assigned both a name and an inode number, which is an integer that is unique within the filesystem. Both the file names and their corresponding inode numbers are stored as entries in the directory that appears to the user to contain the files. The concept of inodes is particularly important to the recovery of damaged filesystems. When parts of the inode are lost, they appear in the lost found directory within the partition in which they once existed.
What neat command will do?
In Linux, neat command provides Graphical interface to change network settings for network devices.
What is the functionality of a Puppet Server?
Puppet is an open-source and enterprise application for configuration management toll in UNIX like operating system. Puppet is an IT automation software used to push the configuration to its clients (puppet agents) using code. Puppet code can do a variety of tasks from installing new software, to check file permissions, or updating user accounts and lots of other tasks.
How to create simple shell scripts in Linux?
Make sure that the file begins with “#!/bin/bash” before any command lines. Make it executable: chmod +x <filename>. Executed by running “sh <filename.sh>” OR <./filename.sh>”.
What is SeLinux?
SELinux is an acronym for Security-enhanced Linux. It is an access control implementation and security feature for the Linux kernel. It is designed to protect the server against misconfigurations and/or compromised daemons. It put limits and instructs server daemons or programs what files they can access and what actions they can take by defining a security policy.
Explain the terms of SUID, SGID and sticky bit?
In addition to the basic file permissions in Linux, there are few special permissions that are available for executable files and directories.
SUID (Set owner User ID up on execution): If setuid bit is set, when the file is executed by a user, the process will have the same rights as the owner of the file being executed. Normally in Linux/Unix when a program runs, it inherits access permissions from the logged in user. SUID is defined as giving temporary permissions to a user to run a program/file with the permissions of the file owner rather that the user who runs it. In simple words users will get file owners permissions as well as owner UID and GID when executing a file/program/command.
SGID (Set-group identification): Same as above, but inherits group privileges of the file on execution, not user privileges. Similar way when you create a file within the directory, it will inherit the group ownership of the directories. SGID permission is similar to the SUID permission, only difference is – when the script or command with SGID on is run, it runs as if it were a member of the same group in which the file is a member.
Sticky bit: The sticky bit is primarily used on shared directories. Sticky bit was used on executables in Linux so that they would remain in the memory more time after the initial execution, hoping they would be needed in the near future. But mainly it is on folders, to imply that a file or folder created inside a stickybit enabled folder could only be deleted by the owner. A very good implementation of sticky bit is /tmp , where every user has write permission but only users who own a file can delete them.
How to disable user login via terminals?
Add “/sbin/nologin” field instead of “/bin/bash” in “/etc/passwd” file.
What is the role of /etc/resolv.conf file?
In this file we set the DNS servers (using their IP addresses) and the search domain. The values of the DNS servers are often added when the network is activated because the data can be provided by DHCP or a similar service.
The option Open in Terminal is missing when user right clicks on terminal in GUI. How to fix this?
This is basically because of missing package nautilus-open-terminal. Once this is installed, the right click option would show up.
How do you disable the NetworkManager service on runlevel 5?
[root@redhat Desktop]# chkconfig –level 5 NetworkManager off
[root@redhat Desktop]# chkconfig –list NetworkManager
NetworkManager 0: off 1: off 2: on 3: on 4: on 5: off 6: off
What is Drop cache in Linux?
Drop cache in Linux memory is the information stored the kernel for later use, as the memory is faster than the disk.
How do you find out all the packages installed on a RHEL system (server)?
/root/install.log > this would only list packages installed during deployment of the system. Packages installed later would not be listed here. Otherwise, run the command #rpm -qa > this would query rpm database and prints out names respectively. In RHEL5.x we can check the file: /var/log/rpmpkgs to find out all packages on the system. However, this file is deprecated in RHEL6.
How to check the default gateway?
Using ‘route -n’ command we can determine the default gateway in Linux.
What is the minimum number of partitions you need to install Linux?
Minimum 2 partitions are needed for installing Linux. The one is / or root which contains all the files and the other is swap. Linux file system is function specific which means that files and folders are organized according to their functionality. For example, all executables are in one folder, all devices in another, and all libraries in another and so on. / Or ‘root’ is the base of this file system. All the other folders are under this one. / can be consider as C:. Swap is a partition that will be used as virtual memory. If there is no more available RAM a Linux computer will use an area of the hard disk, called swap, to temporarily store data. In other words, it is a way of expanding your computers RAM.
What are the process states in Linux?
Running: Process is either running or ready to run
Interruptible: a Blocked state of a process and waiting for an event or signal from another process
Uninterpretable: a blocked state. Process waits for a hardware condition and cannot handle any signal
Stopped: Process is stopped or halted and can be restarted by some other process
Zombie: process terminated, but information is still there in the process table.
What are different backup techniques?
TAR, CPIO, MKSYSB AND UFSDUMP
What is YUM?
YUM (Yellow Dog Updater, Modified) is based on YUP, the Yellow dog Updater. Where does the name Yellow dog come from? Yellow Dog is a version of Linux for the Power Architecture hardware and is RPM-based, just like Red Hat Enterprise Linux and Fedora. YUP, and later YUM, were written by the Linux community as a way to maintain an RPM-based system.
What happens when you run the rm command?
The rm command removes a filename from a directory list, decrements the link count of the corresponding i-node by 1, and, if the link count thereby falls to 0, deallocates the i-node and the data blocks to which it refers.
Which Linux service is used as a database server?
MySQL and PostgreSQL is used in Linux service.
Which Linux service is used to turn a Linux system in proxy server?
Squid service can be used to turn any Linux system into an in-proxy server.
How to check the ip address of LAN card?
Using ‘ifconfig’ & ‘ip address’ command we can determine the ip address of LAN Card.
What is the difference between umask and ulimit?
Umask (User file creation mask): which determines the settings of a mask that controls which file permissions are set for files and directories when they are created.
Ulimit: Ulimit is a Linux built in command which provides control over the resources available to the shell and/or to processes started by it. You can limit user to specific range by editing /etc/security/limits.conf at the same time system wide settings can be updated in /etc/sysctl.conf