Elance Red Hat Linux Test Answers



If you are logged in to a regular user account, and it is necessary for you to log in as root and become a superuser, you use:

chown
passwd
chpriv
su

 

 

what will the following command do? "rpm -ql nagios"

Provide additional info on package nagios.
Verify the package nagios.
Install the package nagios.
list files in package nagios.

 

 

To copy the system log to the current directory, you do:

copy /var/log/messages
copy /var/log/messages .
cp /var/log/messages .
cp /var/log/messages

 

 

User-encrypted passwords are stored in the file:

/home/passwd
/etc/profile
/etc/masterpwd
/etc/shadow
/etc/encpasswd

 

 

The pwd command will:

display the encrypted user's password
display the full path of the current working directory
display the name of the current or permanent default printer
display the decrypted user password (only the user and root can execute this command)

 

 

The main configuration file that GRUB reads when it is loaded, is:

/boot/grub/grub.conf
/etc/boot.conf
/usr/bin/gboot.tab
/etc/boot

 

 

To edit your crontab file, you use:

crontab -i
crontab -e
vicron
viedit

 

 

If you need to disable the ssh service at next boot, you use:

chkconfig sshd off
chkconfig sshd on
chkconfig sshd ignore
chkconfig sshd noboot

 

 

To change the password for the root account, you use:

the passwd command
the priv command
the redhat-config tool
the su command

 

 

How would you display all logical volumes?

show all logical vol
display-logic-vol
volume display all
display all logical vol
lvdisplay

 

 

What is the default FTP port number?

53
22
37
21
43

 

 

To list the most CPU-intensive processes on your system, you can use command:

iostat
free
par
top

 

 

Route accepts the following switches (options):

(i.e., no option is specified)
add
del
all are correct

 

 

Which (free) linux distro is derived from RHEL

CentOS
Ubuntu
Mint
Debian

 

 

The default highest runlevel is:

12
6
2
4

 

 

To count words or lines in a file, you use the command:

tr
cc
wc
count

 

 

The default RHEL window manager is...?

KDE
XFCE
Gnome
TWM

 

 

To select the level of firewall protection, you make changes in:

/etc/sysconfig/authconfig
/etc/ysconfig/services
/etd/sysconfig/firewall
/etc/sysconfig/iptables

 

 

During boot init program checks default runlevel from the __________ file.

/proc/initconf
/etc/inittab
/etc/initconf
/proc/inittab

 

 

What is the most correct way to edit the current users crontab?

crontab -l
crontab -e
vi /etc/crontab.conf
vi /etc/cron.d/0hourly

 

 

If you are in runlevel 5, and you want to change to runlevel 3, you issue the command:

init 3
chkconfig 3
runlevel 3
who -r 3

 

 

What is the standard directory for temporary mount points or mounts for removable media(e.g. CD-ROM)

/dev
/mount
/
/mnt
/temp

 

 

Route:

modifies entries in the routing tables of rpcd
modifies entries in the routing tables of routed
modifies entries in the routing tables of dnsd
modifies entries in the routing tables of nfsd

 

 

If you use multiple crontab files, the directory containing them is:

/etc/cron.d
/etc/cron.monthly
/etc/rc.d/cron
/etc/cron

 

 

System logs for tasks performed on your system are maintained in the directory:

/var/log
/etc/syslog
/etc/syslog.conf
/usr/sbin/syslog

 

 

To open a remote ssh shell with the account test_account on the host test_host, you use the command:

ssh test_account@test_host
ssh test_account test_host
sshd test_account@test_host
sshd -l test_account test_host

 

 

Which is not a valid priority in syslogd.conf?

news
debug
notice
alert

 

 

"shutdown -r now" will:

Requests that the system be rebooted after it has been brought down in a safe way
Requests that the system be halted after it has been brought down
Requests that the system be powered off after it has been brought down in a safe way
Only send out the warning messages and disable logins, do not actually bring the system down

 

 

The runlevel that halts the system is:

0
1
6
h

 

 

To configure networking via a console GUI you can use:

system-config-network
networking config
system-config
network-config

 

 

A normal user sends a print job to the default printer but later finds the print queue is big and decides to cancel the job. What would the user do to perform this task?

The user can know the job number but cannot remove the job as he has no permission to use the Iprm command.
The user has no permission to view job numbers using the Ipq command and hence cannot delete the job.
The user has no permission to view job numbers using the jobs command and hence cannot delete the job.
The user has to list the job using Ipq and remove it using the command Iprm with the job number as the argument.

 

 

What command generates a DSA ssh key?

gen-sshkey -t DSA
ssh-keygen -t dsa
ssh-genkey -t dsa
ssh-key --type DSA

 

 

How to show currently loaded kernel modules?

lsmod
lsmodules
kernshow
modshow
modprobe

 

 

What is the default port for squid:

5656
3128
4646
4444
5555

 

 

How would you create a disk dump in RedHat Linux?

dump /dev/sda ssh@localhost:/dev/hda
fsck2 /dev/sda /dev/sdb
dd if=/dev/sda of=/dev/sdb
mk4ext /dev/sda /dev/sdb
restore /dev/sda /dev/sdb

 

 

To find the version of redhat in use you can:

uname -a
none will work
cat /etc/redhat-release
either will work

 

 

Runlevel 6 is the:

state when the system is a fully operational Linux system, with multiuser support and remote file sharing access
power-down state and is invoked by the halt command to shut down the system
reboot state - it shuts down the system and reboots
single-user state, which allows access only to the superuser, and does not run any network services

 

 

Which statements are true about a source RPM?

Source RPM does not contain information about how to install the software.
Source RPM cannot be used to build a binary rpm.
Source RPMs can be compiled and installed directly.

 

 

How would you check the RedHat OS version?

cat /etc/version
cat /etc/kernel-version
uname -a
cat /etc/redhat-release
cat /etc/redhat-version

 

 

what does the following command do? "watch -n 1 du -hs /tmp/file"

all of the above
none of the above
It runs the command du -hs /tmp/file every second and updates the output
waits till the file /tmp/file gets created befor checking the size

 

 

The following filesystem uses journaling:

vfat
ext3
all are correct
ext2

 

 

What does the "tcpdump" command do?

Terminates all TCP connections on the target host.
Captures traffic on a network
Lists All TCP and UDP connections.
Lists All TCP connections.

 

 

Using cat command, which option is used to print the line number?

cat -A filename
cat -l filename
cat -n filename
cat -number filename
cat count number filename

 

 

What is pNFS means?

peripheral Network File System
Parallel Network File System

 

 

If you set your /etc/inittab file to have the default init entry to be 'init:3:default:', then your system default runlevel is:

administrative single-user mode; denies other users access to the system, but allows root access to the entire multiuser file system. Startup scripts are not run
full multiuser mode with login to command-line interface; allows remote file sharing with other systems on your network. Also referred to as the text mode state
full multiuser mode that starts up in an X session, initiating a graphical login; allows remote file sharing with other systems on your network
multiuser, without networking (i.e., you don't have access to network services like NFS, xinetd, and NIS)

 

 

/proc:

Can be used for obtaining information about processes and devices
Some of the files within /proc/ can be manipulated by users and applications to communicate configuration changes to the kernel
Is a pseudo-file system
All are correct

 

 

Using scp to copy a file "test_file" from your machine to the remote machine "test_machine" to the /tmp directory, using the account "test_user" on the remote machine, you do:

scp test_file test_user@test_machine:/tmp
scp -f test_file -u test_user -m test_machine -d /tmp
scp test_file test_machine@test_user:/tmp
scp test_file:test_user@test_machine:/tmp

 

 

The following entry appears in the /etc/crontab as follows: 30 4 * * 1 /bin/sh /home/Tom/rmcore 2>&1 /dev/null

"rmcore" will execute on April 30th for one hour
"rmcore" will execute on the first day of every month
"rmcore" will execute every Monday at 4:30 a.m.

 

 

To verify what state (run level) you are currently running in, you use:

runlevel
chkstate
init
telinit

 

 

You use samba to:

none are correct
mount Windows filesystems on Linux machines
share resources (like printers) between a Windows and Linux machines
both are correct

 

 

From Which Version of RHEL was the pNFS introduced ?

RHEL 6.4
RHEL 6

 

 

How would you find out the dependencies of RPM package?

#rpm -ivh
#rpm -UVH
#rpm -nogpg
#rpm -icv
#rpm -qR

 

 

Larry, working as root, needs to change the ownership of the file "myfile" from "james" to "mary." He should:

chown mary myfile
chown james:mary myfile
changeowner mary myfile
chown myfile james:mary

 

 

For partitioning disks, you use:

both are correct
parted
none are correct
fdisk

 

 

How to find out memory usage:

free -m
top
All are correct
vmstat
cat /proc/meminfo

 

 

'xhost +' is a security problem because:

any user with access to the system could connect to your X display
any host on the network could assume your IP system address
this command does not pose any security risks
any user on remote machines could open a remote connection to your system with rsh or ssh

 

 

What is the tee command?

send errors to a file
translate characters in a file
split standard output to a file
create marks on a file

 

 

When you first add a user to the system, you must provide the user with a bare-bones version of their login, shell, and logout initialization files. The default initialization files are kept in:

/etc/shells
/etc/gshadow
/usr/sbin/passwd
/etc/skel

 

 

How would you find out the date and time of rpm installation?

# rpm -all
# rpm -Uvh
# rpm -qi
# rpm -la
# rpm -ivh

 

 

Where do the manual (man) pages for all commands reside in the File System Hierarchy (FSH)?

/usr/share/info/man
/usr/share/man
/usr/man/share/locale
/usr/share/locale/man

 

 

When creating a new user account, unless otherwise specified, the files from the __________ are automatically copied to the home directory.

/etc/user start
/etc/skel
/etc/default
/usr/skel

 

 

which command is used to see aging of password?

chown
passwd
chmod
chgrp
chage

 

 

Which Standard does pNFS Stands for..

NFS 3
NFS 4.1
NFS 4

 

 

To power down the system, you use:

all are correct
telinit 0
shutdown -h now
shutdown -h +1

 

 

After extending LVM logical volume that has file system what should be done to extend file system?

resize2fs /dev/lvm_volume
lvextend /dev/lvm_volume
extend /dev/lvm_volume
lventend -L /dev/lvm_volume
mk4ext /dev/lvm_volume

 

 

Files located at "/etc/rc.d/rc<x>.d/" directories(where <x> is the number of the runlevel) are:

sockets
hard links
scripts
symbolic links

 

 

To display IP routing table you can use:

ip route list
route
netstat -r
ip route show
All variants are correct

 

 

What is the permission of /etc/shadow?

644
640
400
660
665

 

 

To check the list of shells installed on the system, you look in:

/etc/services
/etc/profile
/etc/shells
/etc/shell
/etc/conf

 

 

You configure an OpenSSH server in the file:

/etc/ssh/sshd_config
/etc/sshd_config
/etc/sshd/sshd.config
/etc/ssh/sshd.conf

 

 

To disable SSH root login you should:

Set "PermitRootLogin=No" in /etc/ssh/sshd.conf
Set "PermitRootLogin no" in /etc/ssh/sshd.conf
Set "AllowRootLogin=No" in /etc/ssh/sshd_config
Set "PermitRootLogin no" in /etc/ssh/sshd_config

 

 

The __________ program can add password for a group. It is used to administer /etc/group, and /etc/gshadow.

grpasswd
chgrp
passwdgr
gpasswd
chgrpwd

 

 

What is the purpose of the file /etc/updatedb.conf?

configuration file for mlocate package
configuration file for driver updates
configuration file for software updates
configuration file for kudzu

 

 

The user smith issued the egrep "^[[: upper:]]" words.txt command. What does this command do?

displays all lines in the words.txt file that begins with an uppercase letter
displays all lines in the words.txt file after translating uppercase letters to lowercase
displays all lines in the words.txt file after translating lowercase letters to uppercase
displays all lines in the words.txt file that contains an uppercase letter

 

 

Identify the true statement about configure script.

It depends on make to create the Makefiles.
It creates the necessary Makefiles based on the user information.
It does not depend on the autoconf tool for the package installation.
It creates the required directories and subdirectories on the system.

 

 

The command to check your current runlevel is:

none are correct
both are correct
runlevel
who -r

 

 

If umask is 0022, what is the by default permission of a file?

655
777
644
755
744

 

 

How to list users that are logged on?

who
w
users
All answers

 

 

For all filesystems listed in /etc/mtab, to display the total space allowed for a user or group, you use the command:

usage
du
df
quota

 

 

If you want to set a samba share as read/write, you set it with the following in /etc/samba/smb.conf:

readwrite = yes
writeable = yes
read = yes ; write = yes
rw = yes

 

 

What is the default I/O scheduler elevator?

noop
as
cfq
deadline

 

 

Which of the following are valid iptable chains?

Through, In, Out
None of the above
Accept, Drop, Reject
All of the above
Forward, Input, Output

 

 

Which command is used to kill a process gracefully?

pkill -9 <PID>
kill -9 <PID>
pkill -G graceful <PID>
kill -g <PID>
kill -15 <PID>

 

 

In a file delimited by commas, what command will print the 3rd column of data:

awk -f, '{print $2}'
awk '{print $3}'
awk -f, '{print $3}'
awk -F, '{print $3}'

 

 

Scripts within a cron directory are run:

by size
in alphabetical order
according to creation date
in no particular order

 

 

Which of the following options is true of the entry below? /dev/cdrom /cd iso9660 ro,user,noauto 0 0

This is an "fstab" entry which lets any user mount the CD-ROM.
This is an "mtab" entry which mounts a CD-ROM as a read-only device at boot time.
This is an "fstab" entry which mounts a CD-ROM as a read-only device at boot time.

 

 

If your /etc/inittab file becomes corrupted, to start up your system, bypassing the inittab file, so you could edit the file to fix it; you can reboot and enter the following command at the boot prompt:

linux single
linux -S
linux -s
init -s

 

 

What command will free the page cache?

echo 2 > /proc/sys/vm/drop_caches
echo 1 > /proc/sys/vm/drop_caches
echo 0 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/mem/drop_caches

 

 

You use the SUSPEND character to suspend an already running process. Which signal does it send to the process?

SIGSTOP
SIGTERM
SIGHUP
SIGINT

 

 

When mounting a volume listed in "fstab",

both the device and mount point must be given on the command line.
it suffices to give only the mount point

 

 

Which service lets you edit qcow2 images in Linux ?

both virsh & virt-manager
virsh
none of them
virt-manager
guestfish

 

 

System-wide values used by user and group creation utilities such as useradd and usergroup are kept in the file:

/etc/login.defs
/etc/user.def
/etc/usergrp
/sbin/passwd.defs

 

 

Which statement is true about the files and directories created inside the /project directory that have 2777 permissions?

All executables inside the /project directory will run with the effective group ID (EGID) of the group of the /project directory.
All files and directories will have the same group as that of the /project directory.
All files inside the /project directory will have permissions set to 2644 and the subdirectories will have them set to 2755.
All files and directories will have the default group set to the primary group of the user who creates them in /project directory.

 

 

How to find out what packages are currently installed?

rpm -a
yum info --installed
rpm -q
yum list installed
yum list --installed

 

 

What file is used for 'HOSTNAME' configuration?

/etc/sysconfig/network
/etc/resolv.conf
/etc/sysconfig/networking
/etc/hosts
/etc/hostname

 

 

What is the default maximum number of open files a user can have by default?

1024
2048
unlimited
4096
8192

 

 

The /projects directory is being shared by server1 with the share name datashare through samba. To access the shared directory as bob you issue the following command: smbclient //server1/datashare -U 'bob%foouser' What happens when you execute the command?

All the samba shares on server1 will be displayed.
bob will be prompted for a password to access the share.
All the shares on server1 accessible to bob will be displayed.
The share will be accessed with the credentials of bob without being prompted for a password.

 

 

Which mode provides load balancing and fault tolerance in ethernet bonding ?

balance-alb
802.3ad
balance-tlb
balance-xor
Round Robin

 

 

The line '0 2 * * 1-5 tar cf /home/backp /home/projects' in a crontab will:

back up the projects directory at 2:00 A.M. every weekday
back up the projects directory at 2:00 A.M. from Sunday to Thursday
back up the projects directory at 2:00 P.M. from Sunday to Thursday
back up the projects directory at 2:00 P.M. every weekday

 

 

Which kernel parameter is used to reset root password in RHEL7

one
1
both 1 & single
rd.break
single

 

 

To change the system runlevels, you use:

setinit
telinit
initd
runlevel

 

 

How to kill user session?

pkill -9 -u username
kill -9 -u username
pskill username
kill username

 

 

If you use 'shutdown now', it will:

reboot the system
print a warning to all active terminals and then halt the system
shut down the system
transfer your system into maintenance mode

 

 

What file will show you with what options kernel was started?

/boot/kern_start
/proc/cmdline
/proc/start
/var/log/messages

 

 

To have 'grep' match only whole lines, you use:

grep -L
grep -l
grep -x
grep -E

No comments:

Post a Comment