Linux T ips: Image f ile should be copied with the command dd.

Installation client server command in text mode – linux askmethod /usr/bin/setup – command to change settings in mouse, network, printer, keyboard, f irewall.etc redhat-conf ig-network- command to change setting in network conf iguration. redhat-conf ig-services- command to see sevices. ls X* – to show all f iles starting with X. xclock –display localhost:0.0 – command to display localhost clock xeyes –display localhost:0.0- geometry 100*100-0+0 & kcontrol & – command to change the desktop graphic change Switchdesk kde or Switchdesk gnome to switch desktop gnome– to show all gnome results gnome-search-tool to search any f ile ls /usr/bin : more – show all command in rescue mode. ls /usr/sbin f disk –l command to show all hard drive.

redhat-conf ig-users cat /etc/group usermod -G project X perry here we adding perry the group quotacheck – avcm – command to check how much diskspace using

edquota user edquota –t useradd –D to see user def ault conf iguration uname –r command to see kernel versions cat /proc/cpuinf o – Command to show processor ls /tmp/ker* – command to show kernel version cat /etc/grub.conf – command to show conf iguration f ile uname –r to see kernel version less /etc/httpd/conf /httpd.conf command f or apache web server.

dig- dig is a way to conversion of hostname to ip address and same in opposite way. T here are a number of shells including bash, ksh, sh, zsh and csh. T hey are all very similar in f eatures, but dif f er in semantics and scripting languages. T he most common (f rom my experience) is bash which is heavy in f eatures and included with almost all distributions. Linux Interview Questions Question: What command is used to remove the password assigned to a group? Answer: gpasswd -r T he gpasswd command is used to change the password assigned to a group. Use the -r option to remove the password f rom the group. passwd -d <groupname>

Question: What is the minimum number of partitions you need to install Linux? What command can you use to review boot messages? USR.OPT, ROOT, BOOT, SWAP, Question: Which f ile def ines all users on your system? Choose one: a. /etc/passwd b. /etc/users c. /etc/password d. /etc/user.conf Answer: a T he /etc/passwd f ile contains all the inf ormation on users who may log into your system. If a user account is not contained in this f ile, then the Describe the boot process of your f avorite Linux in as much detail as you can. Answer: Booting process : f irst BIOS loads the boot loaders, then boot loaders loads the kernel , then kernel mount the f ile systems and drivers installation will takes place and in it will be loaded. Question: What is kernel updation? Answers: kernel updation is a process to upgrade the kernel f ile with a new or latest version of kernel & use of them as a def ault kernel. Question: What command can you use to review boot messages?

Answer: dmesg Question: T he dmesg command displays the system messages contained in the kernel ring buf f er. By using this command immediately af ter booting your computer, you will see the boot messages. 1. What command you execute to display the last f ive commands you have entered? 2. Which partitions might you creates on mail server HDDs other than the root, swap and boot partitions? 3. Which partitioning tool is available in all distributions? 4. Which two commands can you use to delete directories? 5. Which f ile def ines all users on your system? Answers: 1. history|tail -5 2. /var 3. f disk, parted 4. rm, rmdir 5. /etc/passwd Question: What is dif f erence between user right and user permission?

hda3. hda2. sda1. System inf ormation b. What are the names of the partitions? Choose one: a. hdb2 c. that is authentication If he is authentication f or particular f ile or not. sda3.Answer: user rights is that user is authorized to use password. sda4 Answer: b . Documentation on your system Answer: a T he /proc directory is a virtual f ilesystem that contains system inf ormation. sdb2 d. Administrative procedures c. Boot procedures d. hdb1. sda1. sda2. sdb1. hda1. Question: You are installing Linux into a computer with two IDE hard drives. If his password/f ile/dir is expired he is not able to login Answer user permission: permission is user is permitted to use f ile/directory. hda1. Question: What is contained in the directory /proc? Choose one: a. You plan on dividing each hard drive into two partitions. sda2. hda2. hda4 b.

Question: T he f irst letter of the partition names ref ers to the controller type: ‘h’ f or ide and ‘s’ f or SCSI.. T he third letter ref ers to which disk: ‘a’ f or f irst. T he -l option is used to specif y a dif f erent length. etc. give passwords by “passwd” Question: You wish to print the f ile vacations with 60 lines to a page. You want to print out a text f ile called vacations however the lines are of varying length. In order to improve your system’s security you decide to implement shadow passwords. pr -f vacations | lpr c. pr -l vacations | lpr Answer: a T he def ault page length when using pr is 66 lines. So. /etc/passwd f ile already exists there. What command should you use? Answer: pwconv T he pwconv command creates the f ile /etc/shadow and changes all passwords to ‘x’ in the /etc/passwd f ile. What text f ilter could you use to even out the length of the lines? Answer: f mt . pr -l60 vacations | lpr b. and the number ref ers to which partition: ’1′ f or f irst. ’2′ f or second. ‘b’ f or second. etc. Which of the f ollowing commands will accomplish this? Choose one: a. pr -m vacations | lpr d.

You do not want to give him the root password. Add his username to the /etc/shutdown.allow f ile will be able to run the shutdown command without being root. you cannot do this.T he f mt text utility attempts to make all the lines the same length by joining or splitting lines.conf f ile. but he needs to be able to shutdown the system. Question: You locate a command in the /bin directory but do not know what it does. How can you accomplish this? Choose one: a. Question: You have a technician who will come in af ter hours to install new hardware in your system. d. only root can run the shutdown command. We can use man and inf o commands Question: What utility can you use to show a dynamic listing of running processes? Answer: top .allow f ile. Answer: c Any user who is listed in the /etc/shutdown. Add his username to the /etc/shutdown. What command can you use to determine its purpose? Answer: whatis T he whatis command displays a summary line f rom the man page f or the specif ied command. c. b. Give him the root password and change it when you arrive the next morning.

What utility should you use? Answer: tar You can use the z modif ier with tar to compress your archive at the same time as creating it.cpio. . Question: What command would you type to use the cpio to create a backup called backup. You want to create a compressed backup of the users’ home directories. Question: What f ile def ines the levels of messages written to system log f iles? Answer: kernel.cpio T he f ind command is used to create a list of the f iles and directories contained in home. examine the kernel. T his list is then piped to the cpio utility as a list of f iles to include and the output is saved to a f ile called backup. but ps -ef command can also be used .cpio of all the user’s home directories? _____________ Answer: f ind /home | cpio -o > backup.h f ile.T he top utility shows a listing of all running processes that is dynamically updated.h To determine the various levels of messages that are def ined on your system. top utility is used.

use the _________ utility.tgz f ile1 f ile2 T his command is used to take a compress backup Question: You routinely compress old log f iles. tar f x tarf ile dirname b. You locate the correct tarf ile by checking the backup log but do not know how the directory structure was stored.tar -zcvf f ilename. You now need to examine a log f rom two months ago. tar tvf tarf ile . tar ctf tarf ile d. What command can you use to determine this? Choose one: a. grep is pref f ered over zcat Question: You are covering f or another system administrator and one of the users asks you to restore a f ile f or him. tar tvf tarf ile f ilename c. Answer: zcat T he zcat utility allows you to examine the contents of a compressed f ile much the same way that cat displays a f ile. In order to view its contents without f irst having to decompress it.

. only one user account is created. Question: You suspect that you have two commands with the same name as the command is not producing the expected results.Answer: d T he t switch will list the f iles contained in the tarf ile. Using the v modif ier will display the stored directory structure. T his is the superuser account also known as root. What command can you use to determine the location of the command being run? Answer: which T he which command searches your path until it f inds a command that matches the command you are looking f or and displays its f ull path Question: What account is created when you install Linux? Answer: root Whenever you install Linux. Question: T he top utility can be used to change the priority of a running process? Another utility that can also be used to change priority is ___________? Answer: nice Both the top and nice utilities provide the capability to change the priority of a running process.

If you do not specif y a username. What command should you use to reset his command? Answer: passwd boba T he passwd command is used to change your password. passwd -d boba T his command however disables the existing passwd and boba can login and issue the same command $passwd to set his password Question: What would you type to send the last 20 lines of a text f ile to ST DIN? A) end -n 20 f ilename B) last -n 20 f ilename C) head -20 f ilename . who has a username of boba. Question: Bob Armstrong. calls to tell you he f orgot his password. For already existing process.nice can be used. your password will be changed. renice is used.

Issue the command su and type exit when f inished. not the end. b. the head command. However. You will be prompted f or the password f or the root account. Question: While logged on as a regular user. Answer: b You can use the su command to imitate any user including root. the last command tells you who is logged in. Typing this answer in with a valid f ile name will even give you some output. Issue the command su and type logof f when f inished. is used to look at the beginning of a f ile. T he answer f or b points to a valid command. c. log of f and logon as root? Choose one: a. it does not actually list the contents of any f ile named in the command. Question: . How can you do this without f irst having to close your work.D) end -20 f ilename E) tail -20 f ilename Answer: E – Use the command tail -20 f ilename to see the last 20 lines of a f ile. Once you have provided it you are logged in as root and can do any administrative duties. Issue the command logon root and type exit when f inished. your boss calls up and wants you to create a new user account immediately. Issue the command rootlog. T he answer f or c. T he answers f or a and d both point to an invalid command. d.

T he def ault length of each piece is 1. You can also use passwd -l with the username to lock his account. b. What should you do? Choose one: a. Use f ips to enlarge the partition.000 lines.000 lines long. Question: You have the /var directory on its own partition. What text f ilter can you use to split it into f our pieces each 1. Reconf igure your system to not write to the log f iles.000 lines long? Answer: split T he split text f ilter will divide f iles into equally sized pieces. you can add a(n) ________at the beginning of the password f ield. . Answer: asterick If you add an asterick at the beginning of the password f ield in the /etc/passwd f ile. You have run out of space. Question: You have a f ile called phone nos that is almost 4. that user will not be able to log in.In order to prevent a user f rom logging in.

however.conf . If we f eel that we may need to enlarge the partition in f uture then we can use LVM partitions LVM partitions can be used to enlarge to reduce the partitions LVM can be used with RAID too We can also redirect the log f iles path.new. Answer: d T he only way to enlarge a partition is to delete it and recreate it. You will then have to restore the necessary f iles f rom backup. Install the conf iguration changes by issuing the command /sbin/lilo -t d.c. Delete all the log f iles. Delete the partition and recreate it with a larger size. Install the conf iguration changes by issuing the command /sbin/lilo –u . Install the conf iguration changes by issuing the command /sbin/lilo c.conf to cause a boot: prompt to show. when you restart your computer you still do not have a prompt. Rename your conf iguration f ile to /etc/lilo. so we can store log f iles on any other partition or on any other system Question: You changed /etc/lilo. d. What should you do? Choose one: a. b.

Question: Where are the startup scripts def ined? Choose one: a. /etc/inittab Answer: d . /etc/scripts c.Answer: b You have to reinstall LILO in order f or any conf iguration changes to take ef f ect. /etc/initd b. INSTALL LILO RPM AND CHANGE T HE DEFAULT OPT ION T O 1 FROM 0 IN GRUB FILE Question: What is dif f erence between AT and CRON? Answers: cron can be set only f or a particular time but at is used to schedule and execute. /etc/start d. T his is done by running /sbin/lilo without any options.

Question: Which f ile do you need to change to alter how the updatedb database is created? Choose one: a. inittab def ines the run level but not the startup scripts.conf d. /etc/updatedb.conf f ile is used to manage the creation of the updatedb database. /etc/conf .updatedb c.d there are dif f erent directorys according to run levels where we can def ine startup scripts. In the dir. /etc/which. In Linux How to exclude ip f rom the given range please help me out Type system-conf ig-network and conf igure. init.which Answer: c T he /etc/updatedb.T he /etc/inittab def ines which start up scripts to run at each runlevel.conf b. /etc/conf . Question: .

ben T his command uses the x switch to extract a f ile.You wish to restore the f ile memo.ben.tar.ben will be restored f rom the tarf ile MyBackup.ben. at 5:00 wed -b usrs c.cpio memo.tar memo.cpio you are asked to restore a f ile called memo. Question: Af ter creating a backup of the users’ home directories called backup. at 5:00 wed -l usrs . What command should you type? Answer: cpio -if backup. F specif ies the archive to examine and the f ile to extract is memo.ben T he i tells cpio to extract. at 5:00 wed usrs b. What command should you type? Answer: tar xf MyBackup. Which of the f ollowing commands will work? Choose one: a. Here the f ile memo.ben which was backed up in the tarf ile MyBackup. You want to have this run at 5 am tomorrow so you can see the results when you get to work.tar. Question: You have written a script called usrs to parse the passwd f ile and create a list of usernames.

you can have multiple swap partitions. Question : What utility can you use to automate rotation of logs? Answer: logrotate T he logrotate command can be used to automate the rotation of various logs. the main system log is /var/log/messages. Question : .d. Answer: 128 Although the maximum size f or a swap partition is 128 MB. Question : T he maximum size of the swap partition is _______ MB. Question : What is the name and path of the main system log? Answer: /var/log/messages By def ault. at 5:00 wed -d usrs Answer: a T his command will run the script usrs at 5 am tomorrow (which in this case is Wednesday).

d. c. Neither the reboot or halt command send messages bef ore stopping the system. Choose one: a. T hat the password is encrypted. b. T hat you are using shadow passwords. T hat all passwords are blank. you notice that all the password f ields contain ‘x’. halt c. T hat all passwords have expired. shutdown Answer: d T he shutdown command will send a warning message to your users bef ore bringing the system down. reboot d. Question : When looking at the /etc/passwd f ile. What does this mean? Choose one: a. Which of the f ollowing commands will send a message to the users.You are going to reboot your system but want to warn your users to log of f . init b. .

Question : What command should you use to check the number of f iles and disk space used and each user’s def ined quotas? Answer: repquota T he repquota command is used to get a report on the status of the quotas you have set including the amount of allocated space and amount of used space.Answer: b T he ‘x’ indicates that passwords are stored in the /etc/shadow f ile rather than /etc/passwd. the root partition must be mounted as ___________. Answer: readonly You cannot run f sck on a partition that is mounted as read-write. Question : When you only back up one partition. Choose one a. Question : In order to run f sck on the root partition. Dif f erential b. this is called a ______ backup. Full .

Question : What can you type at a command line to determine which shell you are using? Answer: echo $SHELL T he name and path to the shell you are using is saved to the SHELL environment variable. T heref ore. Partial d. Question: Where is standard output usually directed? Answer: to the screen or display By def ault.c. your shell directs standard output to your screen or display. You can then use the echo command to print out the value of any variable by preceding the variable’s name with $. T his is not dependent upon whether or not the f ile has changed since the last backup. T he Shell’s standard output is CONSOLE Question: . Typing echo $SHELL will display the name of your shell. Copy Answer: c A partial backup is where you select only a portion of your f ile hierarchy or a single partition to back up.

Answer: type T he f irst character of the permission block designates the type of f ile that is being displayed. George only has write permission. George needs to make himself the owner of the administration directory. Without the read permission on the directory.1 root admin 7202 Sep 17 9:10 administration T he only group that George is a member of users. Only the owner of a directory can list its contents. you must have read permission. In order to view the contents of a directory. Question : When you issue the command ls -l. d. Why can’t he look at its contents since it is in his home directory? Choose one: a. b. George needs to change his def ault group to admin. . the f irst character of the resulting display represents the f ile’s ___________. c. he will not be able to list its contents. He calls you to say he cannot list the contents of the administration directory. Answer: a George only has the permissions granted to others which in this case is write. -rw-rw–w.You copy the administration directory to George’s home directory.

and Friday of every month no matter what the date Question : What command should you use to check your f ilesystem? Answer: f sck T he f sck command is used to check the integrity of the f ilesystem on your disk.3. and Friday Answer: d T his would run at 15 minutes af ter the hour on every Monday. 3:15 am.5 myscript Choose one: a. and 5th of each month d. 3rd and 5th of each month. Wednesday. 3rd. Wednesday. at 1:15 am. When will it run? 15 * * * 1. and 5:15 am every day c. at 3:00 pm on the 1st.Question : You have entered the f ollowing cronjob. Question : What key combination can you press to suspend a running job and place it in the background? Answer: ctrl-z . at 15 minutes af ter every hour every Monday. at 15 minutes af ter every hour on the 1st. b.

T he contents of the f ile dog and any error messages. Question : Which of the f ollowing commands can be used to get inf ormation about a package? [Choose all correct answers] A) man B) list C) apropos D) inf o E) more Answer(s): A. D – T he man command pulls up man pages. T he contents of the f ile dog. it redirects both the standard output and standard error. Answer: d When you use &> f or redirection. d.Using ctrl-z will suspend a job and put it in the background. Nothing as all output is saved to the f ile cat. C. T he output would be saved to the f ile cat. the inf o command pulls up texinf o pages which have replaced the man pages f or some packages. Any error messages only. b. Question : If you type the command cat dog &> cat what would you see on your display? Choose one: a. c. and the apropos command helps you to f ind related commands. Answers b and e are not methods of getting inf ormation about a package Question : .

T his is a limitation of the ISA Bus architecture. including those used by Windows 95. including the standard MS-DOS partitioning scheme. but does not set the current runlevel. and d point to invalid commands. Question : . Windows 2000 and Windows ME through loadable kernel modules. many f ile systems. c. In a correctly conf igured system. T he runlevel command displays the current runlevel.Can Linux Use More than 3 Serial Ports by Sharing Interrupts? Yes. Windows 98. they should load automatically when the partitions are mounted. Linux supports all known versions of the Microsof t FAT and VFAT f ile systems. Question : Can Linux Use the Same Hard Drive as MS-DOS? OS/2? 386BSD? Win95? Yes. and the one that was used directly bef ore entering this one. Windows NT. Linux supports many. Answers a. so it can share your disk with other operating systems. Answer b is a valid command. but won’t be able to use simultaneously two ordinary ports which share an interrupt (without some trickery). Question : Which command do you use to change run levels? A) initlevel B) runlevel C) level D) run E) init Answer: E – T he command used to change runlevels is init.

T he -a option will cause hidden f iles to be displayed as well. ls -c home b. and e are all invalid f iles.Which of the f ollowing commands will show a list of the f iles in your home directory including hidden f iles and the contents of all subdirectories? Choose one: a. ls -aF /home/username d. Answer c is the main X server conf iguration f ile. ls -aR /home/username c. Answers a. ls -l /home/username Answer: b T he ls command is used to display a listing of f iles. d. . T he -R option causes ls to recurse down the directory tree. All of this starts at your home directory.xinitrc f ile allows you to set which window man-ager you want to use when logging in to X f rom that account. Question : What f ile would you edit in your home directory to change which window manager you want to use? Answer: B – T he ~/. Question : Where is a good place to store shell scripts that are f or use by the author? A) ~/bin B) /bin C) /usr/bin D) /root Answer: A – It is best to keep scripts meant only f or your account under ~/bin.

but not the best places to keep userspecif ic scripts. d. Question : What type of local f ile server can you use to provide the distribution installation materials to the new machine during a network installation? A) Inetd B) FSST ND C) DNS D) NNT P E) NFS Answer: E – You can use an NFS server to provide the distribution installation materials to the machine on which you are perf orming the installation. Answers a. A listing of the user’s running processes f ormatted as a tree. c. Question : What would be displayed as the result of issuing the command ps ef ? Choose one a. T he FSST ND is the Linux File System Standard. A listing of all the running processes f ormatted as a tree d. b.Answers b. Answer: a . and e are all valid locations. Inetd is the superdaemon which controls all intermittently used network services. A listing of all system processes f ormatted as a tree. A listing of the stopped processes c. and NNT P is the transf er protocol f or usenet news. and d are all valid items but none of them are f ile servers. c. b. DNS provides domain name resolution.

T he password f ield is blank.T his would show the parent child relationship of all the user’s processes. Question : .T ERM. #ps ef (no dash between command and arguments) #ps -ef (T here “is a dash” between command and arguments) Both have entirely dif f erent outputs T he f irst one will display the output with current shell’s some global variables eg:USER. What characteristic of the /etc/passwd f ile may cause this? Choose one: a.SSH_CLIENT.HOME. b.MAIL. ps with option -e will display all processes in system and -f will display f ull inf ormation about all running processes Question : You attempt to use shadow passwords but are unsuccessf ul. T he password f ield is pref aced by an asterick.SHELL. Answer: c T he password f ield must not be blank bef ore converting to shadow passwords. T he username is too long.SSH_CONNECT ION.SSH _T T Y.LS_COLORS.HIST SIZ E T he second one. T he login command is missing. d. c.SHELL.PAT H.LOGNAME.HOST NAME.

g. T he /bin directory contains system binaries.Which f irst-level segment of the f ile system contains a majority of system and server conf iguration f iles within its subdirectories? A) /var B) /etc C) /bin D) /sbin E) /lib Answer: B – T he /etc portion of the f ile system contains a number of system and daemon conf iguration f iles. Follow the instructions in any of the standard ref erences to compile the kernel. as are patches f or the released versions. both shared and non-shared. such as log f iles and print and mail spool directories. d.x are archived in the directory pub/linux/kernel/v2. T he /lib directory contains system libraries. whereas the /sbin directory contains binaries that run with SUID privileges or as a specif ic user. where xx is the two-letter Internet domain abbreviation of your country.tar. c.gz f ile.kernel. If you want to download the source code. FT P to f tp.bz2 f ile.Kernel versions 2. us f or United States.2. or de f or Germany. T he Documentation subdirectory contains . the web page at http://www.kernel. ca f or Canada.org/ lists the current versions of the development and production kernels. T he /var directory contains items that change on a regular basis. and e are valid f irst-level directories. Answers a. and as a . Question : Where Is the Latest Kernel Version on the Internet? T he easiest way to update your kernel is to get the update directly f rom the distribution which you are running. T he kernel source code is archived as a .tar.xx. as you would with any other custom kernel. If you need or want to conf igure and compile your own kernel.2..org. e. but are incorrect.

then you will want to back it up more f requently to prevent the loss of data. However. then you can back it up less f requently. Also. Question : What is Kernel-Level T hreads? Answers: Kernel-level threads of ten are implemented in the kernel using several tables (each . Answer: change If a f ile is static and never changes. T he one most important one is how of ten does the f ile ____________. User threads typically can switch f aster than kernel threads Question : Many f actors are taken into account when planning a backup strategy. a timer signal can f orce switches. and much of that inf ormation is not documented elsewhere.inf ormation by the authors of various subsystems and drivers. Of ten this is called “cooperative multitasking” where the task def ines a set of routines that get “switched to” by manipulating the stack pointer. Typically each thread “gives-up” the CPU by calling an explicit switch. sending a signal or doing an operation that involves the switcher. Question : What is UserLabel T hread? Answers: User-level avoids the kernel and manages the tables itself . if a f ile changes daily or hourly.

task gets a table of threads). username. home directory. group name. home directory. command c. username. In this case. UID. comment Answer: b T he seven f ields required f or each line in the /etc/passwd f ile are username. command. comment b.(and not waiting f or an interrupt or system call) Question : T here are seven f ields in the /etc/passwd f ile. GID. GID. but initial perf ormance measures indicate a negligible increase in time. UID. GID. home directory. comment. T here is a little more overhead with mode switching f rom user->kernel-> user and loading of larger contexts. Which of the f ollowing lists all the f ields in the correct order? Choose one: a. Each of these f ields must be separated by a colon even if they are empty. the kernel schedules each thread within the time slice of each process. Question : Which of the f ollowing commands will show a list of the f iles in your home directory including hidden f iles and the contents of all subdirectories? Answers: T he ls command is used to display a listing of f iles. command. username. GID. comment. username. kernel thread is a process that always in kernel mode . home directory. UID. managing kernel activities that need to managed on an ongoing basis . GID. UID. UID. home directory. command d. comment. it only accesses kernel address spaces . T he -a option will cause hidden .

Question: Which two documents should you consult bef ore making any f inal purchasing recommendations? Answer(s): A. if you need something that outside drivers are available f or. if a directory of the same name exists then a subdirectory is created f or the f iles to be moved. Answer: a When using the mv command to move a directory. c. T he simplest way to get things set up is to use hardware covered in the distribution itself . What is the results of this action? Choose one: a. d. T he f iles contained in /home/ben/memos are moved to the directory /home/bob/memos. T hese two documents should be consulted bef ore purchasing any equipment f or a Linux box.f iles to be displayed as well. T he f iles contained in /home/ben/memos are moved to the directory /home/bob/memos/memos. However. b. T he f iles contained in /home/ben/memos are moved to the directory /home/bob/. and e are all premature. T he -R option causes ls to recurse down the directory tree. T he command f ails since a directory called memos already exists in the target directory. All of this starts at your home directory. d. Installation. Question : You have a directory called /home/ben/memos and want to move it to /home/bob/memos so you issue the command mv /home/ben/memos /home/bob. you will f ind that kind of inf ormation in the general hardware listing. Answers c. B – T he distribution’s hardware compatibility listing and the general Linux hardware compatibility listing. .

What would be displayed as the result of issuing the command ps ef ? Choose one a. A listing of d. one as / which will contain all f iles and a swap partition. because in systems which have suf f icient RAM you don’t really need the /swap partition as we all know that the reason f or having the swap partition. Question:. A listing of c. Question: What is the minimum number of partitions you need to install Linux? Answer: 2 Linux can be installed on two partitions. and administration instructions are not necessary until you actually get to the point where the system is already installed.use. all system processes f ormatted as a tree. the stopped processes all the running processes f ormatted as a tree. A listing of Answer: a T his would show the parent child relationship of all the user’s processes. which is f ar af ter the equipment is procured. Only two partitions / and /boot are required. #ps ef (no dash between command and arguments) #ps -ef the user’s running processes f ormatted as a tree. A listing of b. .

However. Question : . ps with option -e will display all processes in system and -f will dispaly f ull inf ormation about all running processes Question:.SHELL. to run these commands only once. then a script might be more ef f icient.HOST NAME.(T here “is a dash” between command and arguments) Both have entirely dif f erent outputs T he f irst one will display the output with current shell’s some global variables eg:USER. You can use wildcards with the ls command to specif y a pattern of f ile names.LS_COLORS.What command should you type to see all the f iles with an extension of ‘mem’ listed in reverse alphabetical order in the /home/ben/memos directory.HOME.SSH_CLIENT. Answer: ls -r /home/ben/memos/*.) and press enter af ter the last command.SSH _T T Y. enter the commands directly at the command line.PAT H.SHELL.LOGNAME.MAIL.mem T he -c option used with ls results in the f iles being listed in chronological order. Question:. What would be the quickest way to do this? Answers: Separate each command with a semi-colon (.T ERM. T he semi-colon may be used to tell the shell that you are entering multiple commands that should be executed serially.You want to enter a series of commands f rom the command-line. If these were commands that you would f requently want to run.SSH_CONNECT ION.HIST SIZ E T he second one.

day of month. day of month.1.1. the time f ields must be entered in the order of minute. Question: You notice that your server load is exceptionally high during the hours of 10 am to 2 noon. day of week. day of week Answer: c When creating a cronjob. month.168.When def ining a cronjob. minute.168. month.1. What command can you use to determine if your suspicions are correct? .168. minute. day of month.168. month. you suspect that it may be a cron job scheduled by one of your users. hour. hour. minute. range 192.20.1.168.4 and 7 and 10 f rom the range please help me out Answers: You will have to use multiple range statements range 192. What are these f ields and what is the correct order? Choose one: a. hour. day of the month. day of week c. there are f ive f ields used to specif y when the job will run. month and day of the week. minute.168.23 192. day of week d.1.168.1. month b. day of month.1. T he above will exclude 21 and 22 Question:.20 then how do i exclude dif f erent ip’s like 192. When investigating the cause. hour.30. hour.2 192.2 192.How to exclude ip address in dhcp ? my ranges are 192.

crond -u c. you can use crontab to manage any user’s jobs. Choose one: a. What command should you use to delete this job. crond –l Answer: c Using the crontab command with the -l option will display all scheduled cron jobs f or all users. T he -r option tells crontab to delete the job. Now he has it scheduled to run every day at 10:30 am. crontab -lu bob Answer: a As root. crontab -u b. Question: One of your users. T he -u option is used to specif y which user’s jobs you want to act on. Bob. has created a script to reindex his database. crontab -u bob c.Choose one: a. crontab -l d. crontab -ru bob b. crontab -du bob d. Question: .

rereads the /etc/syslog.pid` b. kill SIGHINT syslogd Answer: a When you use kill with the SIGHUP signal. How are you going to do this? Choose one: .conf If no conf iguration f ile is specif ied when starting syslogd. T he last part of the command line extracts the PID f or syslogd. Question:. kill SIGHUP syslogd d. A policy has been established that only the system administrators can create any scheduled jobs.You have made changes to the /etc/syslog. It is your job to implement this policy. then it will start up with the conf iguration specif ied in the /etc/syslog. it stops the daemon.pid` c.conf f ile. kill SIGHUP `cat /var/run/syslogd. kill SIGHINT `cat /var/run/syslogd.conf f ile.conf f ile. Which of the f ollowing commands will cause these changes to be implemented without having to reboot your computer? Choose one: a. Question: You want to ensure that your system is not overloaded with users running multiple scheduled jobs.What is the name and path of the def ault conf iguration f ile used by the syslogd daemon? Answer: /etc/syslog. and then starts the syslogd daemon.

Question: Which daemon must be running in order to have any scheduled jobs run as scheduled? a. create a f ile called /etc/cron.a.deny Answer: b T he crond daemon will examine the f ile /etc/cron. atd c. c.allow and /etc/cron. d. create two empty f iles called /etc/cron. One of its job is to also use atrun to ensure that at jobs are run as well.allow whenever a user attempts to install a cron job.deny b. he will not be able to install the cron job. If that user’s name is not in the f ile. creates an empty f ile called /etc/cron. crontab Answer: a T he crond daemon is responsible f or insuring that scheduled jobs run as scheduled.As the system administrator you need to review Bob’s cronjobs. What .allow which contains the names of those allowed to schedule jobs. crond b.deny containing all regular usernames. create a f ile called /etc/cron. Question:. atrun d.

gz but it f ails. . T he reason that it f ailed is that gzip will only compress one _______ at a time. at and crond b. crontab -l d. Question: Which two utilities can you use to set up a job to run at a specif ied time? Choose one: a. at and crontab d. Question: You want to create a compressed backup of the users’ home directories so you issue the command gzip /home/* backup. atd and crond Answer: c You use the at command to schedule a job to run once. T he crontab command is used to schedule recurring jobs. atrun and crontab c. crontab -u bob c. cronq -lu bob Answer: a T he -l option requests a list of jobs f rom crontab and the -u option is used to specif y which user’s jobs you want to see.command would you use? a. crontab -lu bob b.

allow f ile d. Which of the f ollowing commands will run the script MyScript every day at 11:45 pm? Choose one: a. create an empty f ile called /etc/at.allow . Question: Several of your users have been scheduling large at jobs to run during peak load times. * 23 45 * * MyScript b. create an empty f ile called /etc/at.deny c.Answer: f ile T he gzip utility cannot compress multiple f iles in a single operation. create two empty f iles: /etc/at. 23 45 * * * MyScript c. * * * 23 45 MyScript Answer: c T his line will run the MyScript script at 23:45 or 11:45 pm every day of every month and every day of the week. the f irst task is to create a text f ile containing the jobs to be run along with the time they are to run.deny b. delete the f ile /etc/at. How can you prevent anyone f rom scheduling an at job? Choose one: a. Question: In order to schedule a cronjob. 45 23 * * * MyScript d.deny and /etc/at.

but in a general sort of way LILO was most common in the past. . LILO stores inf ormation regarding the location of the operating systems it can to load physically on the MBR.deny f ile. if the conf iguration f ile is conf igured incorrectly. GRUB is the Grand Unif ied Boot Loader. it will simply def ault to the GRUB command-line interf ace. Compared with GRUB. With GRUB. this is a much more risky option since a misconf igured MBR could leave the system unbootable. Question: What is the dif f erence between grub and lilo ? Answer: LILO is the Linux Loader. * LILO stores inf ormation regarding the location of the operating systems it can to load physically on the MBR. Each has advantages and disadvantages. Both do the same job. this is a much more risky option since a misconf igured MBR could leave the system unbootable.Answer: a If there is not /etc/at. * LILO has no interactive command interf ace. With GRUB. you have to rewrite the LILO stage one boot loader to the MBR. whereas GRUB does. Compared with GRUB. LILO only loads linux and other boot loaders. it will simply def ault to the GRUB command-line interf ace. you have to rewrite the LILO stage one boot loader to the MBR. If you change your LILO conf ig f ile. but GRUB is most common now. if the conf iguration f ile is conf igured incorrectly. and GRUB loads a large number of OS’s. * LILO does not support booting f rom a network. then only the superuser or root may schedule at jobs. whereas GRUB does. If you change your LILO conf ig f ile.

each 80GB. along with it’s conf ig. * LILO works by loading itself into a space that will f it on the MBR. Its redundant array of disks f or better reliability. instead of having two disks. T hen within each volume group you create logical volumes where you build your f ile . LVM on the other hand is a way to spread data or partitions across multiple disks or partitions. etc. Disk 1 has 5 partitions and Disk 2 has the same setup. so the data is in two locations instead of just one. It loads stage 1 of f the MBR (usually) and stage 2 out of /boot. Say you have two hard drives. If Disk 1 has a partition f ailure on say hda2. Question: What is dif f erence between RAID & LVM ? Answer: RAID is “Redundant Array of Independent Disks”. RAID is designed f or system reliability. LVM is RAID0 in that you put together multiple disks into one or more volume groups. Disk 2 will pick up and take over. they basically mirror one another. with say RAID and if you have RAID1 setup with two disks. all RAID levels ensure that loss of a disk will not lead to data loss or system crash. Grub has two stages (because it’s too overcomplicated to work as well. and GRUB loads a large number of OSs. T hink of it in simplest terms.* LILO only loads linux and other boot loaders. err I mean as easily as lilo). Other than RAID0 which is used to make multiple disks appear as one big one. both of those disks will mirror one another. you could with LVM make it look and act like one big disk. In more simply terms.

LVM is logical volume manager and is used to extend the logical volume if required. T he real power of LVM is that if you have unallocated space in your volume group. use them to extend the volume group’s size and then extend the logical volumes. In the event. then your only choice is to unmount the f ilesystem. Depending on the sizes this could take quite awhile. you can add more disks to your system. then you can unmount a logical volume. If you don’t use LVM and you need a f ilesystem to be bigger. back it up to tape. extend the f ile system and then remount the logical volume. and should be used to provide maximum reliability and maximum f lexibility. it can be max to the size of disk or physical partition. extend it in size. and then restore.systems. LVM and RAID solve two dif f erent problems. that you don’t have f ree space in the volume group. . resize the partition.

Sign up to vote on this title
UsefulNot useful