[Mar-2023] RHCE Exam Dumps Pass with Updated 2023 Red Hat Certified Engineer - RHCE [Q17-Q40]

Share

[Mar-2023] RHCE Exam Dumps Pass with Updated 2023 Red Hat Certified Engineer - RHCE

Free RHCE Exam Dumps to Pass Exam Easily

NEW QUESTION 17
CORRECT TEXT
There are two different networks, 192.168.0.0/24 and 192.168.1.0/24. Your System is in 192.168.0.0/24 Network. One RHEL6 Installed System is going to use as a Router. All required configuration is already done on Linux Server. Where 192.168.0.254 and 192.168.1.254 IP Address are assigned on that Server.
How will make successfully ping to 192.168.1.0/24 Network's Host?

Answer:

Explanation:
vi/etc/sysconfig/networkGATEWAY=192.168.0.254ORvi/etc/sysconf/network-scripts/ifcfg-eth0DEVICE=eth0BOOTPROTO=staticONBOOT=yesIPADDR=192.168.0.?NETMASK=255.255.255.0GATEWAY=192.168.0.254
servicenetworkrestartGatewaydefinesthewaytoexitthepackets.AccordingtoquestionSystemworkingasarouterfortwonetworkshaveIPAddress192.168.0.254and192.168.1.254.

 

NEW QUESTION 18
CORRECT TEXT
Create a 2G swap partition which take effect automatically at boot-start, and it should not affect the original swap partition.

Answer:

Explanation:
#fdisk/dev/sdap(checkPartitiontable)n(createnewpartition:pressetocreateextendedpartitionpressptocreatethemainpartitionandtheextendedpartitionisfurtherdividedintologicalpartitions)Enter+2Gt8I82Wpartx-a/dev/sdapartprobemkswap/dev/sda8CopyUUIDswapon-avim/etc/fstabUUID=XXXXXswapswapdefaults00(swapon-s)

 

NEW QUESTION 19
CORRECT TEXT
Make a swap partition having 100MB. Make Automatically Usable at System Boot Time.

Answer:

Explanation:
Usefdisk/dev/hda->Tocreatenewpartition.
Typen->ForNewpartition
ItwillaskforLogicalorPrimaryPartitions.Presslforlogical.
ItwillaskfortheStartingCylinder:UsetheDefaultbypressingEnterKey.
TypetheSize:+100M->YoucanSpecifyeitherLastcylinderofSizehere.
PressPtoverifythepartitionslistsandrememberthepartitionsname.DefaultSystemIDis83thatmeansLinuxNative.
TypettochangetheSystemIDofpartition.
TypePartitionNumber
Type82thatmeansLinuxSwap.
Presswtowriteonpartitionstable.
EitherRebootorusepartprobecommand.
mkswap/dev/hda?->TocreateSwapFilesystemonpartition.
swapon/dev/hda?->ToenabletheSwapspacefrompartition.
free-m->VerifyEitherSwapisenabledornot.
vi/etc/fstab/dev/hda?swapswapdefaults00
ReboottheSystemandverifythatswapisautomaticallyenabledornot.

 

NEW QUESTION 20
CORRECT TEXT
Create a user alex with a userid of 3400. The password for this user should be redhat.

Answer:

Explanation:
useradd-u3400alex
passwdalex
su-alex

 

NEW QUESTION 21
CORRECT TEXT
Your System is going to use as a Router for two networks. One Network is 192.168.0.0/24 and Another Network is 192.168.1.0/24. Both network's IP address has assigned.
How will you forward the packets from one network to another network?

Answer:

Explanation:
echo"1">/proc/sys/net/ipv4/ip_forward
vi/etc/sysctl.confnet.ipv4.ip_forward=1IfyouwanttousetheLinuxSystemasaRoutertomakecommunicationbetweendifferentnetworksyouneedenabletheIPforwarding.Toenableonrunningsessionjustsetvalue1to/proc/sys/net/ipv4/ip_forward.AswellasautomaticallyturnontheIPforwardingfeaturesonnextbootseton/etc/sysctl.conffile.

 

NEW QUESTION 22
CORRECT TEXT
Find the rows that contain abcde from file /etc/testfile, and write it to the file/tmp/testfile, and the sequence is requested as the same as /etc/testfile.

Answer:

Explanation:
#cat/etc/testfile|whilereadline;doecho$line|grepabcde|tee-a/tmp/testfiledoneORgrep`abcde'/etc/testfile>/tmp/testfile

 

NEW QUESTION 23
CORRECT TEXT
Add 3 users: harry, natasha, tom.
The requirements: The Additional group of the two users:
harry, Natasha is the admin group.
The user: tom's login shell should be non-interactive.

Answer:

Explanation:
#useradd-Gadminharry
#useradd-Gadminnatasha
#useradd-s/sbin/nologintom
#idharry;idNatasha(Showadditionalgroup)
#cat/etc/passwd(Showtheloginshell)OR
#system-config-users

 

NEW QUESTION 24
CORRECT TEXT
Create a 512M partition, make it as ext4 file system, mounted automatically under /mnt/data and which take effect automatically at boot-start.

Answer:

Explanation:
#fdisk/dev/vdan+512Mw
#partprobe/dev/vda
#mkfs-text4/dev/vda5
#mkdir-p/data
#vim/etc/fstab/dev/vda5/dataext4defaults00
#mount-a

 

NEW QUESTION 25
CORRECT TEXT
The firewall must be open.

Answer:

Explanation:
/etc/init.d/iptablesstartiptables-Fiptables-Xiptables-Z/etc/init.d/iptablessavechkconfigiptableson

 

NEW QUESTION 26
CORRECT TEXT
Make on /archive directory that only the user owner and group owner member can fully access.

Answer:

Explanation:
chmod770/archive
Verifyusing:ls-ld/archivePreviewshouldbelike:drwxrwx---2rootsysuser4096Mar1618:08/archiveTochangethepermissionondirectoryweusethechmodcommand.Accordingtothequestionthatonlytheowneruser(root)andgroupmember(sysuser)canfullyaccessthedirectoryso:chmod770/archive

 

NEW QUESTION 27
CORRECT TEXT
Adjust the size of the Logical Volume.
Adjust the size of the vo Logical Volume, its file system size should be 290M. Make sure that the content of this system is complete.
Note: the partition size is rarely accurate to the same size as required, so in the range 270M to 320M is acceptable.

Answer:

Explanation:
Additiondf-hTlvextend-L+100M/dev/vg0/voLvscanxfs_growfs/home///homeisthemounteddirectoryoftheLVMthisstepjustneedtodointhepracticeenvironmentandtestEXT4doesnotneedthisstep.resize2fs/dev/vg0/vo//usethiscommandtoupdateinexamination.df-hTORSubtractione2fsck-f/dev/vg0/voumount/homeresize2fs/dev/vg0/vo//thefinalrequiredpartitioncapacityis100Mlvreduce-l100M/dev/vg0/vomount/dev/vg0/vo/homedf-hT

 

NEW QUESTION 28
CORRECT TEXT
Add admin group and set gid=600

Answer:

Explanation:
#groupadd-g600admin

 

NEW QUESTION 29
CORRECT TEXT
Find the files owned by harry, and copy it to catalog: /opt/dir

Answer:

Explanation:
#cd/opt/
#mkdirdir
#find/-userharry-execcp-rfp{}/opt/dir/\;

 

NEW QUESTION 30
CORRECT TEXT
Create a catalog under /home named admins. Its respective group is requested to be the admin group. The group users could read and write, while other users are not allowed to access it. The files created by users from the same group should also be the admin group.

Answer:

Explanation:
#cd/home/
#mkdiradmins/
#chown.adminadmins/
#chmod770admins/
#chmodg+sadmins/

 

NEW QUESTION 31
CORRECT TEXT
Install a FTP server, and request to anonymous download from /var/ftp/pub catalog. (it needs you to configure yum direct to the already existing file server.)

Answer:

Explanation:
#cd/etc/yum.repos.d
#vimlocal.repo[local]name=local.repobaseurl=file:///mntenabled=1gpgcheck=0
#yummakecache
#yuminstall-yvsftpd
#servicevsftpdrestart
#chkconfigvsftpdon
#chkconfig--listvsftpd
#vim/etc/vsftpd/vsftpd.confanonymous_enable=YES

 

NEW QUESTION 32
CORRECT TEXT
Add user: user1, set uid=601
Password: redhat
The user's login shell should be non-interactive.

Answer:

Explanation:
#useradd-u601-s/sbin/nologinuser1
#passwduser1redhat

 

NEW QUESTION 33
CORRECT TEXT
One Logical Volume named /dev/test0/testvolume1 is created. The initial Size of that disk is 100MB now you required more 200MB. Increase the size of Logical Volume, size should be increase on online.

Answer:

Explanation:
lvextend-L+200M/dev/test0/testvolume1Uselvdisplay/dev/test0/testvolume1)
ext2online-d/dev/test0/testvolume1lvextendcommandisusedtheincreasethesizeofLogicalVolume.Othercommandlvresizecommandalsoheretoresize.Andtobringincreasedsizeononlineweusetheext2onlinecommand.

 

NEW QUESTION 34
CORRECT TEXT
Configure a cron Task.
User natasha must configure a cron job, local time 14:23 runs and executes: */bin/echo hiya every day.

Answer:

Explanation:
crontab-e-unatasha2314/bin/echohiyacrontab-l-unatasha//viewsystemctlenablecrondsystemcdlrestartcrond

 

NEW QUESTION 35
CORRECT TEXT
You are new System Administrator and from now you are going to handle the system and your main task is Network monitoring, Backup and Restore. But you don't know the root password. Change the root password to redhat and login in default Runlevel.

Answer:

Explanation:
WhenyouBoottheSystemitstartsondefaultRunlevelspecifiedin/etc/inittab:Id:?:initdefault:WhenSystemSuccessfullybootitwillaskforusernameandpassword.Butyoudon'tknowtheroot'spassword.Tochangetherootpasswordyouneedtobootthesystemintosingleusermode.Youcanpassthekernelargumentsfromthebootloader.1.RestarttheSystem.2.YouwillgetthebootloaderGRUBscreen.3.Pressaandtype1orsforsinglemoderoroot=LABEL=/rhgbqueits4.SystemwillbootonSingleUsermode.5.Usepasswdcommandtochange.6.Pressctrl+d

 

NEW QUESTION 36
CORRECT TEXT
We are working on /data initially the size is 2GB. The /dev/test0/lvtestvolume is mount on /data. Now you required more space on /data but you already added all disks belong to physical volume. You saw that you have unallocated space around 5 GB on your harddisk. Increase the size of lvtestvolume by 5GB.

Answer:

Explanation:
Createapartitionhavingsize5GBandchangethesysteid'8e'.
usepartprobecommand
pvcreate/dev/hda9Supposeyourpartitionnumberishda9.
vgextendtest0/dev/hda9vgextendcommandaddthephysicaldiskonvolumegroup.
lvextend-L+5120M/dev/test0/lvtestvolume
verifyusinglvdisplay/dev/test0/lvtestvolume.

 

NEW QUESTION 37
CORRECT TEXT
Change the logical volume capacity named vo from 190M to 300M. and the size of the floating range should set between 280 and 320. (This logical volume has been mounted in advance.)

Answer:

Explanation:
#vgdisplay(Checkthecapacityofvgifthecapacityisnotenoughneedtocreatepvvgextendlvextend)
#lvdisplay(Checklv)
#lvextend-L+110M/dev/vg2/lv2
#resize2fs/dev/vg2/lv2mount-a(Verify)-------------------------------------------------------------------------------(Decreaselvm)
#umount/media
#fsck-f/dev/vg2/lv2
#resize2fs-f/dev/vg2/lv2100M
#lvreduce-L100M/dev/vg2/lv2
#mount-a
#lvdisplay(Verify)OR
#e2fsck-f/dev/vg1/lvm02
#resize2fs-f/dev/vg1/lvm02
#mount/dev/vg1/lvm01/mnt
#lvreduce-L1G-n/dev/vg1/lvm02
#lvdisplay(Verify)

 

NEW QUESTION 38
CORRECT TEXT
Please open the ip_forward, and take effect permanently.

Answer:

Explanation:
vim/etc/sysctl.confnet.ipv4.ip_forward=1
sysctl-w(takeseffectimmediately)Ifno"sysctl.conf"optionusethesecommands:
sysctl-a|grepnet.ipv4
sysctl-Pnet.ipv4.ip_forward=1
sysctl-w

 

NEW QUESTION 39
CORRECT TEXT
Create a backup
Create a backup file named /root/backup.tar.bz2, contains the content of /usr/local, tar must use bzip2 to compress.

Answer:

Explanation:
cd/usr/localtar-jcvf/root/backup.tar.bz2mkdir/testtar-jxvf/root/backup.tar.bz2-C/test//Decompressiontocheckthecontentisthesameasthe/usr/locaafterIfthequestionsrequiretousegziptocompress.change-jto-z.

 

NEW QUESTION 40
......

RHCE Exam Dumps, RHCE Practice Test Questions: https://www.vceengine.com/RHCE-vce-test-engine.html

Free RHCE Study Guides Exam Questions and Answer: https://drive.google.com/open?id=1uPgGh1QL0dVGRNTIX2rp1wmHivh9AJ7O