Linux

{
  "iq":[{"id":"1",
    "q":"What is Linux?",
    "answer":"Linux is an operating system based on UNIX, and was first introduced by Linus Torvalds.\n\nIt is based on the Linux Kernel, and can run on different hardware platforms manufactured by Intel,\n\nMIPS, HP, IBM, SPARC and Motorola. Another popular element in Linux is its mascot, a penguin figure named Tux.   "
  },
    {"id":"2",
      "q":"What is the difference between UNIX and LINUX? ",
      "answer":"Unix originally began as a propriety operating system from Bell Laboratories, which later on spawned into different commercial versions. On the other hand, Linux is free, open source and intended as a non-propriety operating system for the masses. "
    },
    {"id":"3",
      "q":"Enlist the basic components of LINUX?",
      "answer":" Linux operating system basically consists of 3 components which are enlisted below\n\n\nKernel: This is considered as the core part and is responsible for all major activities of Linux operating system. Linux Kernel is considered as free and open source software which is capable of managing hardware resources for the users. It consists of various modules and interacts directly with the underlying hardware.\n\nSystem Library: Most of the functionalities of the operating system are implemented by System Libraries. These act as a special function using which application programs accesses Kernel’s features.\n\nSystem Utility: These programs are responsible for performing specialized, individual level tasks."
    },

    {"id":"4",
      "q":"Why we use LINUX?",

      "answer":"LINUX is used widely because it is completely different from other operating systems where every aspect comes with something extra i.e. some additional features. Some of the major reasons to use LINUX are listed below\n\nIt is an open source operating system where programmers get the advantage of designing their own custom OS\n\nSoftware and the server licensing required to install Linux is completely free and can be installed on many computers as required\n\nIt has low or minimum but controllable issues with viruses, malware, etc\n\nIt is highly secured and supports multiple file systems "
    },
    {"id":"5",
      "q":" Enlist the features of Linux operating system? ",
      "answer":"Linux kernel and application programs can be installed on any kind of hardware platform and thus is considered as portable.\n\nIt serves the purpose of multitasking by serving various functions simultaneously.\n\nIt provides the security services in three ways namely, Authentication, Authorization, and Encryption.\n\nIt supports multiple users to access the same system resource but by using different terminals for operation.\n\nLinux provides hierarchical file system and its code is freely available to all.\n\nIt has its own application support (to download and install applications) and customized keyboards.\n\nLinux distros provide live CD/USB to their users for installation."
    },
    {"id":"6",
      "q":"What is BASH? ",
      "answer":"BASH is short for Bourne Again SHell. It was written by Steve Bourne as a replacement to the original Bourne Shell (represented by /bin/sh). It combines all the features from the original version of Bourne Shell, plus additional functions to make it easier and more convenient to use. It has since been adapted as the default shell for most systems running Linux."
    },

    {"id":"7",
      "q":"What is Linux Kernel?",
      "answer":" The Linux Kernel is a low-level systems software whose main role is to manage hardware resources for the user. It is also used to provide an interface for user-level interaction.  "
    },

    {"id":"8",
      "q":"Explain LILO?",
      "answer":"LILO (Linux Loader) is the boot loader for Linux operating system to load it into the main memory so that it can begin its operations. Bootloader here is a small program that manages a dual boot. LILO resides in MBR (Master Boot Record).\n\nIts major advantage is that it allows the fast bootup of Linux when installing in the MBR.\n\nIts limitation lies in the fact that it is not possible for all computers to tolerate modification of MBR."
    },
    {"id":"9",
      "q":"What is Swap space?",

      "answer":"Swap space is the amount of physical memory that is allocated for use by Linux to hold some concurrent running programs temporarily.\n\nThis condition usually occurs when Ram does not have enough memory to support all concurrent running programs.This memory management involves the swapping of memory to and from physical storage."
    },

    {"id":"10",
      "q":"What do you understand by Root account?",
      "answer":"As the name suggests, it is like a system administrator account which gives you the ability to fully control the system. Root account serves as the default account whenever Linux is installed.Below mentioned functions can be performed by Root account\n\n\nBelow mentioned functions can be performed by Root account\n\nCreate user accounts\n\nMaintain user accounts\n\nAssign different permissions to each account created and so on.."
    },

    {"id":"11",
      "q":" Explain the term GUI?",

      "answer":"GUI stands for the Graphical user interface. GUI is considered as the most attractive and user-friendly because it consists of the usage of images and icons. These images and icons are clicked and being manipulated by the users for the purpose of communication with the system."
    },

    {"id":"12",
      "q":"Explain the term CLI?",
      "answer":"CLI stands for Command Line Interface.\n\nIt is a way for humans to interact with computers and is also known as Command line user interface.\n\nIt relies on textual request and response transaction process where user types declarative commands to instruct the computer to perform operations."
    },
    {"id":"13",
      "q":"How can you determine the total memory used by LINUX?",
      "answer":"It is always required to keep a check on the memory usage in order to find out whether the user is able to access the server or the resources are adequate. There are roughly 5 methods that determine the total memory used by the Linux.\n\nThis is explained as below\n\nFree command: This is the most simple and easy to use the command to check memory usage. For example: ‘$ free –m’, the option ‘m’ displays all the data in MBs.n\n/proc/meminfo: The next way to determine the memory usage is to read /proc/meminfo file. For example: ‘$ cat /proc/meminfo’\n\nVmstat: This command basically lays out the memory usage statistics. For example: ‘$ vmstat –s’\n\nTop command: This command determines the total memory usage as well as also monitors the RAM usage.\n\nHtop: This command also displays the memory usage along with other details."
    },

    {"id":"14",
      "q":"Describe the root account.",
      "answer":" The root account is like a systems administrator account, and allows you full control of the system. Here you can create and maintain user accounts, assigning different permissions for each account. It is the default account every time you install Linux."
    },

    {"id":"15",
      "q":"How do you open a command prompt when issuing a command? ",
      "answer":" To open the default shell (which is where the command prompt can be found), press Ctrl-Alt-F1. This will provide a command line interface (CLI) from which you can run commands as needed.  "
    },

    {"id":"16",
      "q":" How can you find out how much memory Linux is using?",
      "answer":"From a command shell, use the “concatenate” command: cat /proc/meminfo for memory usage information. You should see a line starting something like: Mem: 64655360, etc. This is the total memory Linux thinks it has available to use. "
    },

    {"id":"17",
      "q":"Does the Ctrl+Alt+Del key combination work on Linux?",
      "answer":"Yes, it does. Just like Windows, you can use this key combination to perform a system restart. One difference is that you won’t be getting any confirmation message and therefore, reboot is immediate. "
    },
    {"id":"18",
      "q":" How To check Memory stats and CPU stats ? ",
      "answer":"Using ‘free’ & ‘vmstat’ command we can display the physical and virtual memory statistics respectively.With the help of ‘sar’ command we see the CPU utilization & other stats. "
    },

    {"id":"19",
      "q":"What does Sar provides and at which location Sar logs are stored ? ",
      "answer":" Sar Collect, report, or save system activity information. The default version of the sar command (CPU utilization report) might be one of the first facilities the  user  runs  to  begin system  activity investigation, because it monitors major system resources. If CPU utilization is near 100 percent (user + nice + system), the workload sampled is CPU-bound.  "
    },

    {"id":"20",
      "q":" Explain the 3 kinds of file permissions under LINUX?",
      "answer":"Every file and directory in Linux are assigned three types of owners namely ‘User’, ‘Group’, and ‘Others’. Find the three kinds of permissions defined for all the three owners\n\nRead: This permission allows you to open and read the file as well as list the contents of the directory.\n\nWrite: This permission allows you to modify the contents of the file as well as allows adding, removing and renaming files stored in the directories.\n\nExecute: User can access and run the file in the directory. You cannot run a file unless the execute permission is set."
    },
    {"id":"21",
      "q":" What is the maximum length for any file name under LINUX?",
      "answer":"The maximum length for any filename under Linux is 255 characters.  "
    },

    {"id":"23",
      "q":"How permissions are granted under LINUX?",
      "answer":"A system administrator or the owner of the file can grant permissions using the ‘chmod’ command. Following symbols are used while writing permissions\n\n ‘+’ for adding permission\n\n‘-‘ for denying permission\n\nPermissions also includes single letter which denotes\n\n u : user; g: group; o: other; a: all; r: read; w: write; x: execute."
    },{"id":"24",
      "q":"What are the different modes when using the vi editor?  ",
      "answer":"The 3 different kinds of modes in vi editor are enlisted below\n\nCommand Mode/ Regular Mode\n\nInsertion Mode/ Edit Mode\n\nEx Mode/ Replacement Mode"
    },{"id":"25",
      "q":"Explain the Linux Directory commands along with the description? ",
      "answer":"Enlisted below are the directory commands along with descriptions\n\npwd: It is a built-in command which stands for ‘print working directory’. It displays the current working location, working path starting with / and directory of the user. Basically, it displays the full path to the directory you are currently in.\n\nIs: This command list out all the files in the directed folder.\n\ncd: This stands for ‘change directory’. This command is used to change to the directory you want to work from the present directory. We just need to type cd followed by the directory name to access that particular directory.\n\nmkdir: This command is used to create an entirely new directory.\n\nrmdir: This command is used to remove a directory from the system."
    },{"id":"26",
      "q":"Explain the work of Ctrl+Alt+Del key combination on Linux operating system?",
      "answer":"The work of Ctrl+Alt+Del key combination on Linux operating system is same as is for Windows i.e. to restart the system. The only difference is that there is no confirmation message displayed and a system is rebooted directly."
    },{"id":"27",
      "q":" What is the role of case sensitivity in affecting the way commands are used?",
      "answer":"Linux is considered as cases sensitive. Case sensitivity can sometimes serve as the reason for displaying different answers for the same command as you might enter different format of commands each time. In terms of case sensitivity, the command is same but the only difference occurs with regard to uppercase and lowercase letters.\n\nFor example cd, CD, Cd are different commands with different outputs."
    },{"id":"28",
      "q":"Explain Linux Shell?  ",
      "answer":" For executing any commands user uses a program known as the shell. Linux shell is basically a user interface used for executing the commands and communicating with Linux operating system. Shell does not use the kernel to execute certain programs, create files, etc. There are several shells available with Linux which includes the following\n\nBASH (Bourne Again SHell)\n\nCSH ( C Shell)\n\nKSH ( Korn Shell)\n\nTCSH"
    },{"id":"29",
      "q":"What is a Shell script? ",
      "answer":"As the name suggests, the shell script is the script written for the shell.\n\nThis is a program file or says a flat text file where certain Linux commands are executed one after another.\n\nAlthough the execution speed is slow, Shell script is easy to debug and can also simplify everyday automation processes."
    },{"id":"30",
      "q":"Explain the features of Stateless Linux server? ",
      "answer":"The word stateless itself means ‘no state’. When on a single workstation, no state exists for the centralized server, and then the stateless Linux server comes into the picture. Under such conditions, scenarios like keeping all the systems on the same particular state can occur.\n\n\nSome of the features of Stateless Linux server are explained below\n\nStores prototype of every machine\n\nStore snapshots\n\nStore home directories\n\nUses LDAP which determines the snapshot of state to be run on which system."
    },{"id":"31",
      "q":"Enlist some Linux file content commands? ",
      "answer":"There are many commands present in Linux which are used to look at the contents of the file.\n\nSome of them are enlisted below\n\nhead: Displays the beginning of the file\n\ntail: Displays the last part of the file\n\ncat: Concatenate files and print on the standard output.\n\nmore: Displays the content in pager form and is used to view text in the terminal window one page or screen at a time.\n\nless: Displays the content in pager form and allows backward and single line movement."
    },{"id":"32",
      "q":"Explain Redirection?",
      "answer":"It is well known that every command takes an input and displays an output. Keyboard serves as the standard input device and screen serves as the standard output device. Redirection is defined as the process of directing data from one output to another or even cases exist where output serves as an input data for another process.\n\nThere are basically three streams available in which input and output of Linux environment are distributed.\n\n\nThese are explained as below\n\nInput Redirection: ‘<’ symbol is used for input redirection and is numbered as (0). Thus it is denoted as STDIN(0).\n\nOutput Redirection: ‘>’ symbol is used for output redirection and is numbered as (1). Thus it is denoted as STDOUT(1).\n\nError Redirection: It is denoted as STDERR(2).   "
    },{"id":"33",
      "q":" How do you refer to the parallel port where devices such as printers are connected?",
      "answer":"Whereas under Windows you refer to the parallel port as the LPT port, under Linux you refer to it as /dev/lp . LPT1, LPT2 and LPT3 would therefore be referred to as /dev/lp0, /dev/lp1, or /dev/lp2 under Linux.   "
    },{"id":"34",
      "q":" What is the pwd command?",
      "answer":"The pwd command is short for print working directory command. It’s counterpart in DOS is the cd command, and is used to display the current location in the directory tree.   "
    },{"id":"35",
      "q":"What are daemons?",
      "answer":"Daemons are services that provide several functions that may not be available under the base operating system.\n\nIts main task is to listen for service request and at the same time to act on these requests. After the service is done, it is then disconnected and waits for further requests."
    },{"id":"36",
      "q":" What are the kinds of permissions under Linux?",
      "answer":"There are 3 kinds of permissions under Linux:\n\n– Read: users may read the files or list the directory\n\n– Write: users may write to the file of new files to the directory\n\n– Execute: users may run the file or lookup a specific file within a directory  "
    },{"id":"37",
      "q":"  What are environmental variables?",
      "answer":"Environmental variables are global settings that control the shell’s function as well as that of other Linux programs. Another common term for environmental variables is global shell variables."
    },{"id":"38",
      "q":"What are the different modes when using vi editor?",
      "answer":"There are 3 modes under vi:\n\n– Command mode – this is the mode where you start in\n\n– Edit mode – this is the mode that allows you to do text editing\n\n– Ex mode – this is the mode wherein you interact with vi with instructions to process a file"
    },{"id":"39",
      "q":"What is redirection? ",
      "answer":"Redirection is the process of directing data from one output to another. It can also be used to direct an output as an input to another process."
    },{"id":"40",
      "q":"What is grep command?",
      "answer":"grep a search command that makes use of pattern-based searching. It makes use of options and parameters that is specified along the command line and applies this pattern into searching the required file output."
    },{"id":"41",
      "q":"  How does case sensitivity affect the way you use commands? ",
      "answer":"When we talk about case sensitivity, commands are considered identical only if every character is encoded as is, including lowercase and uppercase letters.\n\n This means that CD, cd and Cd are three different commands. Entering a command using uppercase letters, where it should be in lowercase, will produce different outputs."
    },{"id":"42",
      "q":" Is it possible to use shortcut for a long pathname? ",
      "answer":"Yes, there is. A feature known as filename expansion allows you do this using the TAB key.\n\nFor example, if you have a path named /home/iceman/assignments directory, you would type as follows: /ho[tab]/ice[tab]/assi[tab] .\n\nThis, however, assumes that the path is unique, and that the shell you’re using supports this feature."
    },{"id":"43",
      "q":"What are the contents in /usr/local?",
      "answer":"  It contains locally installed files. This directory actually matters in environments where files are stored on the network.\n\nSpecifically, locally-installed files go to /usr/local/bin, /usr/local/lib, etc.).\n\nAnother application of this directory is that it is used for software packages installed from source, or software not officially shipped with the distribution"
    },{"id":"44",
      "q":"How do you insert comments in the command line prompt?",
      "answer":"Comments are created by typing the # symbol before the actual comment text.\n\nThis tells the shell to completely ignore what follows.\n\nFor example: “# This is just a comment that the shell will ignore.”"
    },{"id":"45",
      "q":" What is command grouping and how does it work? ",
      "answer":"You can use parentheses to group commands. For example,\n\nif you want to send the current date and time along with the contents of a file named OUTPUT to a second file named MYDATES, you can apply command grouping as follows: (date cat OUTPUT) > MYDATES"
    },{"id":"46",
      "q":" What is the command to calculate the size of a folder?",
      "answer":"To calculate the size of a folder use the command du –sh folder1.  "
    },{"id":"47",
      "q":"How can you find status of a process?",
      "answer":" Use the command\n\nps ux"
    },{"id":"48",
      "q":" How can you check the memory status ? ",
      "answer":"You can use the command\n\nfree -m  to display output in MB\n\nfree -g  to display output in GB "
    },{"id":"49",
      "q":" Explain how to color the Git console? ",
      "answer":"To color the Git console  you can use the command git config—global color.ui auto.  In the command, the color.ui variable sets the default value for variable such as color.diff and color.grep.   "
    },{"id":"50",
      "q":" Explain how you can find a file  using Terminal? ",
      "answer":"To find a file  you have to use command, find . –name “process.txt” .  It will look for the current directory for a file called process.txt."
    },{"id":"51",
      "q":"Explain how you can create a folder using Terminal? ",
      "answer":"To create a folder, you have to use command mkdir.  It will be something like these :  ~$ mkdir trending18   "
    },
    {"id":"52",
      "q":" Explain how you can view the text file using Terminal?",
      "answer":"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.  "
    },{"id":"53",
      "q":" Explain how to enable curl on Ubuntu LAMP stack?",
      "answer":"To enable curl on Ubuntu , first install libcurl, once done use following command sudo/etc/init .d /apache2 restart or sudo service apache2 restart.  "
    },{"id":"54",
      "q":"Explain how to enable root loging in Ubuntu?",
      "answer":"The command which enables root loging is \n\n#sudo sh-c ‘echo “greater-show-manual-login=true” >>/etc/lightdm/lightdm.conf’"
    },{"id":"55",
      "q":"How you can run an Linux program in the background simultaneously when you start your Linux Server? ",
      "answer":"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.\n\n& runs the process in the background."
    },{"id":"56",
      "q":"Explain how to uninstall the libraries in Linux?",
      "answer":"To uninstall the libraries in Linux, you can use command  sudo apt – get remove library_name"
    },{"id":"57",
      "q":"How to create a new file and modify an existing file in vi editor? Also, enlist the commands used to delete information from vi editor.?",
      "answer":"vi filename: This is the command used to create a new file as well as modify an existing file.\n\nView filename: This command opens an existing file in read-only mode.\n\nX: This command deletes the character which is under the cursor or before the cursor location.\n\ndd: This command is used to delete the current line."
    },{"id":"58",
      "q":"What could possibly be the problem when a command that was issued gave a different result from the last time it was used? ",
      "answer":"One highly possible reason for getting different results from what seems to be the same command has something to do with case sensitivity issues. Since Linux is case sensitive, a command that was previously used might have been entered in a different format from the present one. For example, to lists all files in the directory, you should type the command ls, and not LS. Typing LS would either result in an error message if there is no program by that exact name exist, or may produce a different output if there is a program named LS that performs another function."
    },{"id":"59",
      "q":" How to start windows service? ",
      "answer":"We can start the Windows Service in 2 ways-  1. By using control panel and  2. By using Command prompt."
    },{"id":"60",
      "q":"What are hard links?",
      "answer":"Hard links point directly to the physical file on disk, and not on the path name. This means that if you rename or move the original file, the link will not break, since the link is for the file itself, not the path where the file is located. "
    },{"id":"61",
      "q":" What is the minimum number of partitions that you need to install Linux?",
      "answer":"Minimum 2 partitions are needed for installing Linux. The one is \"/ or root\" which contains all the files and the other is swap.\n\nLinux file system is function specific which means that files and folders are organized according to their functionality.\n\nFor example, all executables are in one folder, all devices in another, all libraries in another and so on. \"/ or root\" is the base of this file system.\n\nAll 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."
    },

    {"id":"62",
      "q":" How documentation of an application is stored? ",
      "answer":"When a new application is installed its documentation is also installed.\n\nThis documentation is stored under the directory named for application.\n\nFor example if my application name is App1 then the path of the documentation will be /user/doc/App1.\n\nIt contains all the information about the application.\n\nIt contains date of creating application, name of application and other important module of the application.\n\nWe can get the basic information of application from the documentation."
    },
    {"id":"63",
      "q":" How do you create a new user account?",
      "answer":"useradd command is used for creating a new user account.When invoked without the -D option, the useradd command creates a new user account using the values specified on the command line and the default values from the system. The new user account will be entered into the system files as needed and initial files copied, depending on the command line options.\n\nThis command uses the system default as home directory.\n\nIf –m option is given then the home directory is made."
    },

    {"id":"64",
      "q":"What is the name and path of the main system log?",
      "answer":"By default, the main system log is '/var/log/messages'.This file contains all the messages and the script written by the user.By default all scripts are saved in this file. This is the standard system log file,which contains messages from all system software, non-kernel boot issues, and messages that go to 'dmesg'.dmesg is a system file that is written upon system boot."
    },

    {"id":"65",
      "q":" How secured is Linux? Explain.",
      "answer":"Security is the most important aspect of an operating system.Due to its unique authentication module, Linux is considered as more secured than other operating systems.\n\nLinux consists of PAM. PAM is Pluggable Authentication Modules.\n\nIt provides a layer between applications and actual authentication mechanism.\n\nIt is a library of loadable modules which are called by the application for authentication.\n\nIt also allows the administrator to control when a user can log in.\n\nAll PAM applications are configured in the directory \"/etc/pam.d\" or in a file \"/etc/pam.conf\".\n\nPAM is controlled using the configuration file or the configuration directory."
    },
    {"id":"66",
      "q":"What is the minimum number of partitions that you need to install Linux?",

      "answer":"Minimum 2 partitions are needed for installing Linux.The one is \"or root\" which contains all the files and the other is swap.\n\nLinux file system is function specific which means that files and folders are organized according to their functionality.\n\nFor example, all executables are in one folder, all devices in another,all libraries in another and so on. \"/ or root\" is the base of this file system.\n\nAll the other folders are under this one. \"/\" can be consider as \"C:\".\n\nSwap is a partition that will be used as virtual memory.\n\nIf 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."
    },

    {"id":"67",
      "q":"What are the partitions created on the mail server hard drive?",
      "answer":"The main partitions are done firstly which are root, swap and boot partition.But for the mail server three different partitions are also done which are as follows:\n\n1. /var/spool - This is done so that if something goes wrong with the mail server or spool than the output cannot overrun the file system.\n\n2. /tmp - Putting this on its own partition prevents any user item or software from overrunning the system files.\n\n3. /home - Putting this on its own is useful for system upgrades or reinstalls. It allow not to wipe off the /home hierarchy along with other areas."
    },

    {"id":"68",
      "q":" How to change window manager by editing your home directory?",

      "answer":"\"/.xinitrc file\" allows changing the window manager we want to use when logging into X from that account.\n\nThe dot in the file name shows you that the file is a hidden file and doesn't show when you do a normal directory listing.\n\nFor setting a window manager we have to save a command in this file.\n\nThe syntax of command is: exec windowmanager.\n\nAfter this, save the file. Next time when you run a startx a new window manager will open and become default."
    },

    {"id":"69",
      "q":" How shadow passwords are given?",
      "answer":" pwconv command is used for giving shadow passwords.Shadow passwords are given for better system security.\n\nThe pwconv command creates the file /etc/shadow and changes all passwords to ‘x’ in the /etc/passwd file.\n\nFirst, entries in the shadowed file which don't exist in the main file are removed.\n\nThen, shadowed entries which don't have `x' as the password in the main file are updated. A ny missing shadowed entries are added.\n\n Finally, passwords in the main file are replaced with `x'.\n\nThese programs can be used for initial conversion as well to update the shadowed file if the main file is edited by hand. "
    },
    {"id":"70",
      "q":" How do you create a new user account?",
      "answer":"useradd command is used for creating a new user account.When invoked without the -D option, the useradd command creates a new user account using the values specified on the command line and the default values from the system.The new user account will be entered into the system files as needed and initial files copied, depending on the command line options. This command uses the system default as home directory.If –m option is given then the home directory is made."
    }

















  ]

}