Comptia Linux+ Exam LX0-104

¡Supera tus tareas y exámenes ahora con Quizwiz!

Tool to help the blind

brltty

How to disable and enable printers?

cupsdisable dummyprinter cupsenable dummyprinter

how to set date?

date -s 9:15 or timedatectl set-time 9:15

Which of the following shows a valid Bash function called sayHello?

function sayHello () { echo "hello"; } The correct syntax is as shown. Note that a semicolon is required when the commands are included on one line, as shown in the answer.

Which of the following commands displays the current mail aliases known on the server?

getent aliases

keyboard tool for GNOME

gok

command allows a user to administer his/her own group membership list without the requirement of superuser privileges.

groupmems

Which of the following commands changes the group name from admins to serveradmins?

groupmod -n serveradmins admins

How can you configure cups graphically?

http://localhost:631/

Which command should you use to convert encoding from one type to another?

iconv

this checks for null. shell script

if [ -z $1 ]

Which of the following conditionals in a Bash script will test if the variable DAY is equal to SUNDAY?

if [[ $DAY == "SUNDAY" ]]

Which of the following commands shows various statistics for a network interface such as packets and bytes received and transmitted along with errors and other such conditions?

ifconfig

assign an interface ip address or netmask

ifconfig enps035 192.168.1.100 ifconfig enps3045 netmask 255.255.0.0

bring a network interface up or down

ifconfig enps035 down

show interfaces status

ip link show or ip addr show

new logging system for systemd systems.

journald and works hand in hand with rsyslog journalctl

Which command can be used to set the delay and repeat rate for a keyboard?

kbdrate

keyboard tool for KDE

kmag

which show you when is the last time a user has logged into or never logged into the system.

lastlog

fast and lightweight display manager.

lightdm /usr/share/lightdm/lightdm.conf.d

Not every service logs to syslog.

local1-7 is used for that service. Apache and Samba are among those servers. Apache: Errorlog syslog:local1

Which of the following commands displays the available character maps?

locale -m

make a default printer

lpadmin -d textprinter

how to add a printer?

lpadmin -p printername -E -v device -m name_of_ppd

show available devices for a printer?

lpinfo -v

To print something?

lpr -Ptextprinter file_to_print

To remove the last printer job

lprm

To remove all the printer jobs

lprm -

What do you enter at the command prompt to display the contents of an MTA mail queue?

mailq

index file for fonts in the current directory

mkfontscale mkfontdir

mysql commands to remember:

mysql_secure_installation mysql -u root -p $ create USER julia@'%' IDENTIFIED BY 'secret'; $ GRANT SELECT,INSERT,UPDATE, DELETE on videos.* TO julia@'%'; $ FLUSH PRIVILEGES;

To scan the entire network using nmap

nmap 8.8.8.8/24

What environment variable x11 forwarding when ssh

not sure yet

Which file when present will only allow root to login to the system?

not sure yet

keywoard in the hosts file?

not sure yet

lowest tcp number

not sure yet

what is the most trusted stratum number?

ntp uses stratum (highest trusted in stratum 1).

. Which of the following commands launches Orca with speech capabilities?

orca --no-setup --disable main-window

You have been called in to help a small company. They want to increase the security of their small network and one of the tasks you have been given to do is to move their passwords from the /etc/passwd file to the /etc/shadow file. Which utility would you use to accomplish this?

pwconv

Which of the following MTAs use the QMQP and QMTP protocols?

qmail

Which of the following MTAs are modular? (Choose two)

qmail & postfix

To see all the functions on your system?

set

what to do for email forwarding

set relayhost ip address in /etc/postfix/main.cf

how to do SSH Tunneling

ssh -L 9000:ismvml61:443 aabdalma@ismnagios AllowTcpForwarding yes

Which of the following commands retrieves the ssh host key fingerprint from a server?

ssh-keyscan

how to initialize an X session

startx

$ ls -lZ

this will show if the file is handled under selinux

How to unassign the variable COLOR?

unset COLOR

One of your users, Karen Scott, has recently married and is now Karen Jones. She has requested that her username be changed from kscott to kjones, but no other values change. Which of the following commands will accomplish this?

usermod -l kjones kscott

too much information about X

xdpyinfo

Users can be added or removed for access to the X server. Which command facilitates this?

xhost

command to set resolution

xrandr

Which of the following commands displays statistics and information about windows in X windows?

xwininfo

information about current settings and positioning of an X window.

xwininfo

You are logged in as gshant, and you want to forward your mail to the dwant user on the local network. Which file should you edit to redirect the mail for a gshant user?

~/.forward or /home/gshant/.forward forwards messages from the gshant user to a user specified in the file.

to set french:

$ LANG=fr_FR.UTF-8

which command to configure X?

$ Xorg -configure

How to find files that has SUI set.

$ find / -perm /4000

How to search for SElinux related issues in the logs?

$ grep AVC | /var/log/audit/audit.log

how to synchronize hardware and system clock?

$ hwclock --hctosys $ hwclock --systohc

Configuring a Text Only Printer

$ lpadmin -p textprinter -m textonly.ppd

what is happening in the queue ?

$ lpq -Ptextprinter

variable that captures all the number of arugments

$#

variable that captures all the arguments as one entity?

$*

variable the capture the return value from a program

$?

variable that captures all the arguments as one by one

$@

What is the format of the lines in /etc/crontab?

* * * * * user command min hour day mon dow

Which of the following options to lsof searches an entire directory tree for open instances of files or directories?

+D

Which option to dig causes it to use IPv6 only for communication?

-6

When using the host command, which option displays the SOA record from each of the authoritative DNS name servers for the given domain?

-C

Which of the following options to ifup tells the command to ignore errors and continue?

-ignore-errors

Which option to ssh changes the username to use for logging into the server?

-l

Which option to ping disables name resolution?

-n

Which option to the ntpdate command configures the version to use, such that an older NTP server could be queried?

-o

Which of the following commands can be used to set the time zone on a Debian system?

. The tzconfig command can be used on a Debian system to set the time zone. The other commands listed do not exist.

After a user starts a BASH session and the scripts in /etc/profile are applied, what is the next file that could affect the shell session?

.bash_profile

When the user logins in, specific user.

.bash_profile

When the user starts a new shell, specific user.

.bashrc

A user is requesting that each time she logs in, a particular entry be written to a log file. This will only apply to her and she is using the Bash shell. In which configuration file would you make an entry for this action to take place?

.profile

Create E-mail Aliases

/etc/aliases and exectue: $ newaliases so the changes take effect.

Which of the following files stores the aliasing information for MTAs?

/etc/aliases.db

What can schedules job within a specific time frame?

/etc/anacrontab

files to allow users to user or not to use at or cron?

/etc/at.deny /etc/at.allow /etc/cron.deny /etc/cron.allow

Which file you can use to schedule cron jobs?

/etc/crontab

Two most important files for configuring cups?

/etc/cups/printers.conf & /etc/cups/cupsd.conf

Which file that specifies the skeleton file, the shell and the default home when a new user is created?

/etc/default/useradd

which old method to allow and deny hosts?

/etc/hosts.allow & /etc/hosts.deny

Which of the following locations stores the configuration for LightDM?

/etc/lightdm or /usr/share/lightdm.

what service will allow you to take care of when logs are deleted and stuff like that ?

/etc/logrotate.conf

important file to configure email

/etc/postfix/master.cf /etc/postfix/main.cf (queue directory where the messages will be stored).

If you want to change profiles for all users on the system.

/etc/profile and /etc/bashrc

Configuring Client Side DNS

/etc/resolv.conf

where is the syslog confiigration file?

/etc/rsyslog.conf

which file can you limit the number of processes for a user or group?

/etc/security/limits.conf

Which file specifies the environment variables to be set.

/etc/security/pam_env.conf

contain default port assignments for applications.

/etc/services

If you want a new file to be created when a new user is created, where do you put it ?

/etc/skel

You are configuring a Linux system for 5 different users. Before you create the user accounts, you need to ensure that specific commands execute clean up tasks when the user logs out of the Linux system. You want to reduce redundant actions by configuring the commands once for all users that will be created on the system. Where should you configure the commands?

/etc/skel/.bash_logout

configure ssh server

/etc/ssh/sshd_config

most important file for network configuration

/etc/sysconfig/network-scripts On Debian systems: /etc/network/interfaces

is the configuration file that determines the services provided by xinetd

/etc/xinetd.conf

Where do video drivers reside?

/usr/X11R6/lib/modules/drivers or /usr/lib/xorg/modules/drivers

where the fonts at?

/usr/share/fonts /usr/share/X11/fonts

What is the full path to the directory that contains the locale configuration files on a Linux system?

/usr/share/locale

which file that you can check for zone information?

/usr/share/zoneinfo

The drift file, as specified in /etc/ntp.conf on a Red Hat system, is stored in which location by default?

/var/lib/ntp/drift

log files are typically stored where?

/var/log

Within which directory are systemd journals stored by default?

/var/log/journal

log files for cups ?

/var/logs/cups/error_log & /var/logs/cups/access_log

Where is the printer queue stored ?

/var/spool/cups

Received mail goes to

/var/spool/mail

Which port should be allowed through a firewall for NTP communication?

123 . Port 161 is SNMP, while Port 139 is NetBIOS and Port 194 is IRC.

Which port needs to be allowed through the firewall for standard LDAP traffic to be received by the server?

389

During a Fedora distribution installation, you choose to add a regular user account. The only other user that has been added to the system was root. What is the most likely user id associated with the new user?

500

Which character combination sets the body of the message to STDIN when using the mail command?

<<<

You must do which of the following to define a persistent alias?

Add the command defining the alias to the appropriate shell configuration file

static ip addressing or dhcp

BOOTPROTO = none or dhcp

Which variable is used to indicate the screen on which GUI applications will be shown?

DISPLAY

what tool covert desktop display to speech

Emacspeak

If you want to secure email messages and file transfers, you should use:

GnuPG to generate keys: gpg --gen-key results will be in stored in: ~/.gnupg directory gpg.pub gpg --{sign|clearsign) originalfile For an increased of security, we use -sign --armor if you intend to the send the key over by email.

something to remember

If /etc/cron.allow exists, then /etc/cron.deny is ignored and only those users listed in /etc/cron.allow can create cron jobs. and if neither exists, only the root can do shit.

Which environment variable overrides all other locale settings and sets all locales to the same setting?

LC_ALL

Some Environment Variables to remember

LC_NAME specifies personal name format. This includes things like whether the surname comes first or last. LC_NUMERIC defines formatting for numeric values that are not monetary. It affects things such as the thousands separator and the decimal separator. LC_COLLATE defines the alphabetical ordering of strings. This affects the output of sorted directory listings.

tool for speech in GNOME

Ocra

Which of the following are common protocols used by MTAs to send messages to MUAs? (Choose two)

POP3 & IMAP

important options for ssh configuration

PermitRootLogin yes PasswordAuthentication yes X11Forwarding yes UseDNS no

By default, which protocol is used by an MTA to send messages to other MTAs?

SMTP

Which option to useradd sets the number of days between password expiration and when the account is disabled?

The -f option sets the days between expiration and disabled for an account. The -g option is used to set the group ID, while -e is used to set the overall expiration date.

Which option to date changes the output to UTC regardless of the current time zone?

The -u option configures the output to UTC regardless of the time zone. The -s option sets the time, and there is no -v or -t option.

Which of the following configuration lines in /etc/hosts.deny creates a deny-by-default policy where clients will need to be specifically allowed in /etc/hosts.allow?

The ALL: ALL syntax will cause all hosts to be denied. This means that you must explicitly authorize hosts and networks using /etc/hosts.allow.

What is the limit for domains and characters when using the search option in /etc/resolv.conf?

The current limit is six domains and 256 total characters

Which of the following commands is necessary for making a variable defined in your current shell available to child processes?

The export command is necessary so that any variables that are manually defined in your current session become available to child processes. The source command executes the file and can be used for the purpose described, but it requires an additional argument.

proper format in /etc/hosts

The proper format for /etc/hosts is IP address followed by name followed by alias, which makes answer A correct.

what is equivalent in running the script as follows: . script.sh

The source command is the functional equivalent of a single dot (.). The set command exists, but it is not used for this purpose. The other commands are not valid.

Which of the following is a valid UPDATE statement in SQL?

UPDATE tablename SET columnname = 1; The syntax at a minimum sees the UPDATE keyword, followed by the table name, and then followed by the SET keyword.

Which of the following areas within an Ubuntu system contains information and settings for accessibility?

Universal Access

send email to the root

[ -e $1 ] || mail -s "$1 does not exist" root < .

The ........ utility is an old utility for keyboard accessibility.

accessx

Which command you can use to schedule a job at a later time, just once?

at 9:30 PM Tue warning: commands will be executed using /bin/sh at> echo "Well gosh golly, it's 9:30 PM on Tuesday." at> ^D


Conjuntos de estudio relacionados

SDSU FA 17 - Homework_CH_02 - B A 370

View Set

Drugs, Discovery and Development Final

View Set

Chapter 2 Community-Based Nursing Care of the Child and Family

View Set

NU140- Chapter 38 Bowel Elimination

View Set

US - Hechos importantes de España

View Set