Linux Exam 10-18

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Which option for the cut command is used to specify a delimiter?

-d

Which option for the cut command is used to specify the field?

-f

Which option for the usermod command can be used to specify a user's primary group ID?

-g

What option to the netstat command has information shown as numbers rather than names?

-n

The Linux kernel mounts the following pseudo-filesystems to provide access to information about hardware devices connected to the system:

/dev and /sys

Which of the following is the valid device file name for the first IDE hard drive on the system?

/dev/hda

Which of the following files contains group IDs?

/etc/group

Which of the following files contains the IP addresses of the name servers the system should consult in any attempt to resolve names to IP addresses?

/etc/resolv.conf

To make changes permanent for kernel parameter files found under /proc/sys, the following file can have entries added to it:

/etc/sysctl.conf

Which file contains the information passed to the kernel at boot time?

/proc/cmdline

The if command looks for what exit code to consider a condition to be true?

0

test -f /dev/ttyS0

0 if the file exists

The Process ID (PID) of the init process is

1

What is the meaning of $(( $i + 1)) ?

1 will be added to the i variable

The following system load averages are displayed by the top command:

1, 5, and 15 minutes

Traditional UNIX systems allowed users to belong to how many groups?

16

fdisk

A command used for working with the MBR partitioned disks

What is the correct way to assign the word "Hello" to a variable?

A="Hello"

What is the correct way to save the current directory to a variable?

A=`pwd`

A user can belong to...

At least 16 groups

The last command displays reboot records...

By default

Most of nano's commands take the form of:

Control and another character

The "execute" permission is never set on files by default.

False

The groupdel command can be used to delete primary groups.

False

The user sysadmin will be able to read a file because they own it.

False

What does the acronym FHS stand for among the the standards supported by the Linux Foundation?

Filesystem Hierarchy Standard

What is the meaning of $1?

It is the first argument passed to the script

Which of the following are valid partitioning types?

MBR and GPT

The chown command can be used to change the user owner on a file by:

Only root

A file begins with #!/bin/csh. This means:

Running the script will invoke /bin/csh to interpret the rest of the file

What would an account with the UID 376 typically be used for?

System service access

Which of the following protocols defines how network communication functions?

TCP/IP

The chgrp command can be used on a file by:

The file owner and root

Which user can view the /etc/shadow file?

The root user

The chown command can be used to change the owner and group of a file.

True

The groupmod command can be used to change a group name.

True

The process (ps) command shows only processes running in the current shell by default.

True

The sbin directories are primarily intended to be used by the root user.

True

Which of the following are common busing systems?

USB and PCI

A conditional that lets you make multiple comparisons with a pattern is called:

case

Which NUMERIC command set "other" permissions on file to r-x?

chmod 775 file

Which SYMBOLIC command set "other" permissions on file to r-x?

chmod o=rx file

Which of the following chown commands will change the myFile user ownership to the user sam and the group ownership to administrators?

chown sam:administrators myFile

Software that allows hardware devices to communicate with the installed operating system is called?

drivers

How would you finish your script with an exit code of 42?

exit 42

File permissions cannot be edited by the root user.

false

Which of the following commands will check hard disk GPT partitions?

gdisk cgdisk sgdisk

Which command can be used to view the /etc/passwd file entries?

getent [database] [entry]

Which of the following commands will display only lines that begin with start?

grep ^start file.txt

Which of the following commands will display only lines that begin with test?

grep ^test file.txt

The /etc/group file follows what structure?

group_name:password_placehoder:GID:user_list

Which of the following commands will display the group(s) a user belongs to?

id

Which of the following commands will display the IP address on a Linux system?

ifconfig

The logging daemon on recent Linux distributions based on systemd is called:

journald

Which command can be used to determine a user's most recent log in?

last

Which command can be used to view the /var/log/wtmp file entries?

last

Which of the following commands will direct error messages to the file, error.log?

ls /root 2> error.log

Which of the following commands will display CPU information?

lscpu and arch

Which of the following commands will allow you to view all processes on the system?

ps -ef and ps aux

Octal notation uses the following values for the permissions granted:

r = 4, w = 2, x = 1

Which shell command accepts input from the user's keyboard?

read

Which of the following commands will display the routing table?

route and netstat -r

Which log file contains messages regarding authentication and authorization?

secure

Which command(s) can be used to sort the lines of list.file alphabetically and display it on the screen?

sort < list.file or cat list.file | sort

Which of the following commands can be used to display socket statistics, and supports all major packet and socket types?

ss

Which of the following commands will allow you to log into a remote machine?

ssh

The number of users logged in is in a variable called USERS. How would you test to see if 5 users are logged in?

test $USERS -eq 5

How would you write a test that says "if /tmp/foo is a directory or USERS is greater than 5"?

test -d /tmp/foo -o $USERS -gt 5

[ ! -f /tmp/foo ]

tests if the /tmp/foo file exists

Which of the following commands will display how long the system has been running since the last boot?

uptime and w

Which of the following commands, run as root, will prevent the user bob from logging in?

usermod -L bob

Which are appropriate editors for writing shell scripts?

vi and nano

The first line of this command displays how long the system has been running since being rebooted.

w

Which command will display the users that are currently logged in to the system?

who

When issuing the service network restart command, which of the following occurs?

✔ Takes down all network interfaces, re-reads all related configuration files and then the networking for the system is restarted.


संबंधित स्टडी सेट्स

Intercultural Communication com3461 study guide

View Set

Hepatic & Biliary NCLEX Questions

View Set