June 6, 2009

Linux \ Solaris Interview Question - 21

Question 501) Which option of patchadd command does not backup the files to be patched?
a -u
b -f
c -v

Ans: a

Question 502) What permissions are needed to change to a directory and list its contents ?
a r--
b rw-
c r-x

Ans: c

Question 503) Which commands will create a file ?
a touch filename
b cat filename
c ls filename
d cat blah filename

Ans: a,d

Question 504) You go to a users desk and find that the technician has su'd to root and left the station still logged in. You have 5 junior admins under you. What command can you use to determine who the culprit is
a who am i
b who
c last
d finger

Ans: a

Question 505) The cron daemon
a schedules jobs to run
b executes jobs to run

Ans: b

Question 506) You want to print a file with the highest priority, how do you do this ?
a lp -q 0 filename
b lp -q high filename
c lp -q immediate filename
d lp -q

Ans: a

Question 507) What is denoted by the following permissions on the file taxes1999? -r-sr-xr-x
a the file is not executable by anyone but root
b world readable-writable by all users
c file has been locked to all users
d The current owner and root of the file can execute it.
e None of the above

Ans: d

Question 508) Who can remove print job ?
a root
b file owner
c job owner

Ans: a,b

Question 509) Which of the following executes a task at 700pm once?
a at 700pm task
b at 1900 at task
c at 700pm at task at ctrl-d
d at 1900 at ctrl-d task

Ans: c

Question 510) What is the purpose of the PROM? Choose all that apply.
a Boot the operating system
b Test the hardware
c Initialize daemons
d Share resources via NFS
e None of the above

Ans: a,b

Question 511) In Bourne shell, how to assign value to variable EDITOR ?
a EDITOR=/bin/vi
b set EDITOR /bin/vi

Ans: a

Question 512) You wish to run extensive diagnostics on your sun box during bootup, what should you do?
a Nothing, it will run an extensive POST by default.
b Press and hold the stop key while powering on the system.
c Press and hold the stop key as well as the S key
d Press and hold the stop key while pressing the M key.
e None of the above

Ans: e

Question 513) What do you choose to use the new disk from the format menu?
a new
b disk
c select
d

Ans: b

Question 514) If you have an umask of 022, and you create a new empty file, which permissions will it have?
a 644
b 755
c 666
d 123

Ans a

Question 515) If you type the word Mississipi3 for the passwd command
a It is correct
b It is and invalid password
c The passwd command shows you an error message
d The passwd command displays a warning message

Ans: b

Linux \ Solaris Interview Question - 20

Question 476) If you are on a VT220 terminal and there is no stop key on the keyboard, which of the following is true
a A break signal cannot be sent to the machine from the terminal.
b A break signal can be sent by pressing CTRL, ALT and Del together.
c Check the VT220 terminal manual to find out he key to generate the break signal.
d Power down the VT220 terminal to send the break signal.

Ans: c

Question 478) Your current working directory is the /export/home_a/user/ directory. Which 2 commands strings put you into the /export/home_b/user 20 directory?
a cd ../../home_b/user 20
b cd /export/home_b/user 20

Ans a,b

Question 479) What are the 3 default Solaris 8 shells?
a c,bourne,korn
b bash,korn,bourne
c sun,korn,bourne

Ans: a

Question 480) What affect does setting ignoreeof environment variable have ?
a Shell will ignore Control-D, so you cat not log out with it
b can not end letter using mail command since Control-D will be ignored

Ans: a

Question 481) How many shells are available in solaris 8 operating environment?
a 3
b 4
c 8
d 6

Ans: d

Question 482) In order to monitor system message on the console,uncomment CONSOLE=/dev/console in which file ?
a /etc/default/su
b /etc/default/login
c /etc/default/init
d /etc/default/passwd

Ans: a

Question 483) Which of the following command shows the processes associated with the local terminal?
a ps -e
b ps -ef
c ps -a
d ps

Ans: c

Question 484) How will u change all the occurences of "Solaris" into "Solaris Operating Enviroment" in a file?
a %s/Solaris/Solaris Opearating Environment/g
b %r/Solaris/Solaris Opearating Environment/g
c %c/Solaris/Solaris Opearating Environment/g

Ans: a

Question 485) Which directory does "cd .." change to ?
a parent directory
b child directory
c home directory
d root directory

Ans: a

Question 486) What are the ways to quit vi?
a wq
b w
c q
d ZZ
e quit

Ans: a,b,d

Question 487) What is the correct sequence of file type ?
a owner other group
b other group owner
c owner group other
d group other owner

Ans: c

Question 488) Siva has taken a position with a competing firm. How would you go about locking his account so that he can no longer gain access to the system? Choose all that apply.
a use the admintool to delete his account.
b i userdel ram12
c i passwd -l ram12
d using the admintool remove him from the accounting group
e None of the above

Ans: c

Question 489) In relative path, which is the default in the directory hierarchy ?
a look down the directory
b look up the directory

Ans: a

Question 490) From the command line, how would you delete users directory and login at the same time?
a userdel -d siva
b userdel -r siva
c userdel -l siva
d userdel -o siva

Ans: b

Question 491) How to display disk usage in terms of kilobyte ?

a df -k
b du -k
c df
d du

Ans: a

Question 492) If you have drwxrwsrwx, how to disable de setgid bit?
a chmod 0777
b chmod g-s
c chmod 2755
d chmod 2777

Ans: b

Question 493) The right way to use these two commands chown, chgrp
a chown new_owner filename
b chown filename new_owner
c chgrp new_group filename
d chgrp filename new_group

Ans: a,c

Question 494) What is the command displaying a trailer character in order to recognize what is the file type?
a ls -A
b ls -F
c ls -d
d ls -l

Ans: d

Question 495) What does r-x mean ?
dr-xr-xr-x
-r-xr-xr-x
a writable, executable
b readable, searchable
c readable, executable
d read only

Ans: b,c

Question 496) You suspect that someone has been trying to login to the network. What would you have to do set up the system to record failed login attempts?
a Nothing, account logging is on by default in ver 8\par
b Uncomment the line initializing logging in the startup script
c Enable the logging daemon
d Create a file called loginlog in /var/adm/
e None of the above

Ans: d

Question 497Which of the following is the first phase in the Solaris boot process?
a init
b Boot PROM or BIOS
c Boot programs
d Kernel initialization

Ans: b

Question 498) What is illegal character in host name ?
a letter
b number
c slash (/)
d underscore (_)

Ans: c

Question 499) Where does the command who look for information about users currently on the system?
a /var/adm/who
b /var/adm/utmpx
c /var/sadm/ucmp
c /var/sadm/all

Ans: b

Question 500) What does t mean in -rwx-----t ?
a readable
b searchable
c setgid
d sticky bit

Ans: d

May 23, 2009

Linux \ Solaris Interview Question - 19

Question 451) Which command is used to change the system boot device?
a use disk2 as boot-device
b set boot-device disk2
c setenv boot-device disk2
d set boot-dev disk2
e setdev boot disk2

Ans: c

Question 452) When you use the command #reject printer1 ,
a printer1 will reject additional print requests on the printer
b printer1 will move or cancel any requests that are currently queued to the printer
c printer1 will be temporarily unavailable (equivalent to pressing "online/offline" on the printer itself
d printer1 will will accept print jobs

Ans: a,b

Question 453) When you use the command #disable printer1
a printer1 will reject additional print requests on the printe r
b printer1 will move or cancel any requests that are currently queued to the printer
c printer1 will be temporarily unavailable (equivalent to pres sing "online/offline" on the d printer itself
e printer1 will accept print jobs

Ans: c,e

Question 454) Which of the following command may be used to check the status of the print queues?
a lp -q
b lp -s printername
c lp -q printername
d lpstat -o
e lpstat -p printername

Ans: d,e

Question 455) In order to redefine available set of commands you can execute,which variable must you modify ?
a DISPLAY
b PATH
c HOME
d PS1

Ans: b

Question 456) Which of the following files may be use to control the usage of crontab?
a /etc/crontab/cron.allow
b /etc/crontab/cron.deny
c /etc/cron.d/cron.allow
d /etc/cron.d/cron.deny
e /etc/cron.access
f /etc/crontabACL

Ans: c,d


Question 457) Which daemon may execute commands repeatedly ?
a cron
b at
c cronat
d crontab

Ans: a

Question 458) Which of the following may be considered as serial devices?
a serial ports
b SCSI ports
c alphanumeric terminals
d modems
e serial printers

Ans: a,c,d,e

Question 459) What does R means: in the S column of the output of ps command?
a The process is running.
b The process is on the running queue
c This process is a regular process.
d This is a sleeping process.

Ans: a

Question 450) What are the serial interfaces?
a Small Computer System Interface
b Serial Device Peripheral Interface
c Data Terminal Equipment
d Data Communications equipment
e Serial Data Interface
f Serial Communication Equipment

Ans: c,f

Question 451) Which command does a full backup of all files in the /export/home file system to the /dev/rmt/1 remote tape device attached to the workstation "mars".
a ufsdump Of mars/dev/rmt/1 /export/home
b dd 0f mars/dev/rmt/1 /export/home
c cpio > i mars/dev/rmt/1 /export/home

Ans: a

Question 452) Pin 2 of the RS-232-C 25 pin connector for a Data Terminal Equipment is used to
a transmit signal
b receive signal

Ans: a

Question 453) Which of the following are true of null modem cable ?
a A null modem cable provides meAns: for two DTE devices to communicate with each other without a modem
b A null modem cable crosses pins 2 and 3
c A null modem cable crosses pins 7 and 8
d Only pins 2,3 and 7 are required for communications between two DTE devices

Ans: a,b,d

Question 454) The tip command
a may be used to connect a remote host using a modem
b uses full duplex connection over a parallel line
c will cause a file called .tiprc in the user's home directory to be executed
d may use the following environment variables REMOTE, PHONES, HOST, HOME, SHELL
e uses the following files /etc/phones, /etc/remote, /var/adm/aculog and ~/.tiprc

Ans: a,b,c,d,e

Question 455) Root user is
a user ID=0, group ID=0
b user ID=0, group ID=1
c user ID=1, group ID=0
d user ID=1, group ID=1

Ans: b

Question 456) Which Sun system will halt and poweroff when "init 5" is executed ?
a sun3
b sun4
c sun4c
d sun4m
e sun4d

Ans: d

Question 457) Which of the following module is used to perform standard terminal I/O processing?
a ldterm
b sacadm
c pmadm
d ttyadm
e nlsadmin

Ans: a

Question 458) Password is verified against which file ?
a /etc/shadow
b /etc/passwd

Ans: a

Question 459) The SAF (Service Access Facility)
a may be used for monitoring of the parallel ports
b uses the port monitor process to manage the USB port
c uses ttymon to manage serial ports
d manages network ports using the listen daemon

Ans: a,b,c,d

Question 460) Which of the following daemons is used for detecting incoming login requests and dispatching these requests appropriately, setting terminal modes and baud rates?
a listen
b logind
c ttymon
d ttyd
e seriald

Ans: a,b,c,d,e

Question 461) Which of the following command copy files to remote system ?
a rcp
b rsh
c ftp
d telnet

Ans: a

Question 462) Which option of the usermod command allows the use of duplicate user IDs?
a -o
b -i
c -u

Ans: a

Question 463) What does .login commonly have ?
a environment variables
b shell variables
Ans: a

Question 464) What file is created by ttymon and contains successful logins information ?
a /var/adm/logins
b /var/ttylogs
c /var/tty/logins
d /var/adm/utmp
e /var/logs/ttylog

Ans: d

Question 465) What command can be used to set the values of the positional parameters?
a setenv
b setparam
c setpos
d setpp
e set

Ans: e

Question 466) When is the system profile executed?
a After the .profile in the home directory of the user account
b Before the .profile in the home directory of the user account
c Instead of the .profile in the home directory of the user account

Ans: b

Question 467) The sh command is a useful one to debug shell scripts. Which option of the sh command may be used to print commands and their arguments as they are executed?
a -v
b -s
c -x
d -d
e -c

Ans: c

Question 468) What type of file is this?
drwxr_xr_x 1 tom users 512 Sep 1 0826 devices
a block
b Directory
c Symbolic link
d Device
e Regular

Ans: b

Question 469) How to terminate an application ?
a Ctrl-c
b kill command
c quit from window for any window applications
d suspend command

Ans: a,b,c

Question 470) What is the block size that df shows disk space in,by default?
a 256 bytes
b 512 bytes
c 1024 bytes
d 2048 bytes

Ans: b

Question 471) Which of the following command show the patches installed?
a pkginfo
b patchadd -p
c showrev -p
d patchinfo

Ans: b,c

Question 472) Which command, similar to tar in syntax, produces an archive which compresses each file before archiving it?
a tar
b Zcat
c cpio

Ans: b

Question 473) What value represents Sunday in the day of week field in crontab?
a 0
b 1
c 6
d 7

Ans: a

Question 474) Which process tool can you use to find the current working directory for a process?
a ps
b pwdx
c dir

Ans: b

Question 475) How do you find all the patches that have been applied to the package SUNWtest?
a showrev -p |grep SUNWtest
b pacthinfo SUNWtest
c showpacth -p SUNWtest

Ans: a