WGU D317 UPDATED EXAMS TEST PAPER
QUESTIONS AND ANSWERS SURE A+
✔✔df and du Commands - ✔✔Check free space and report usage by the device,
directory, or file specified as the argument:
df ("disk free") enable you to view the device's free space, file system, total size, space
used, percentage value of space used, and mount point
du ("disk usage") displays how a device is used, including the size of directory trees and
files within it
✔✔su Command - ✔✔su (switch user) command switches to the account specified by
username: su username. It is possible to switch to the superuser account by omitting
the username argument. The command will prompt the user for the password of the
target account before switching to it.
Using su without an option retains the original user's profile and variables. The switched
user also remains in the home directory of the original user. Using su - changes to the
root user and launches a new shell under the context of root. This is a better practice.
✔✔sudo Command - ✔✔sudo (superuser do) command allows any account listed in the
/etc/sudoers file user to run specified commands with superuser privilege level. In
distributions that use sudo, this process is handled by guided setup. The user enters the
sudo command followed by the command the user wishes to run. The user might be
asked to confirm their password if it has not been cached recently
,Main advantage of sudo over su is that the root password does not have to be shared
between multiple administrators.
✔✔User Management Commands - ✔✔User settings are stored in the /etc/passwd file
and group settings are stored in the /etc/group file. The user password is typically stored
as an encrypted hash in the /etc/shadow file, along with other password settings, such
as age and expiration date. The commands useradd, usermod, and userdel can be
used to add, modify, and delete user information. The command passwd can be used to
change the password.
✔✔Group Management Commands - ✔✔Each user account can be assigned to a
group as a means of allocating permissions over files. The groupadd , groupmod , and
groupdel commands can be used to manage group memberships.
A user can belong to many groups but can only have one effective group ID at any one
time. The effective group ID is listed for the user account in /etc/passwd and can be
changed using the newgrp command
✔✔File Permissions Commands - ✔✔Each file has a set of permissions that determines
the level of access for any given user. Linux uses a permissions system with three
rights:
1) Read (r) gives permission to view the contents of a file or directory
2) Write (w) gives permission to modify or delete the object. In the case of directories,
this allows adding, deleting, or renaming files within the directory.
3) Execute (x) gives permission to run an executable file or script. For directories,
execute allows the user to do things such as change the focus to the directory and
access or search items within it.
✔✔Symbolic Notation - ✔✔Syntax for setting Linux permissions that use characters to
represent permissions values.
Each permission is allowed (r or w or x) or denied (-)
For example, if you run ls -l to obtain a long directory listing, the permissions will be
shown as followsL
drwxr-xr-x 2 bobby admins Desktop
-rwx-r-x r-- 1 bobby admins scan.sh
The leading character designates the file type. For example, - represents a regular file
and d indicates a directory. The permissions for the Desktop directory show that the
owner (bobby) has full (rwx) permissions whereas the group (admins) and others have
read and execute but not write (r-x). For the scan.sh file, the user has
read/write/execute (rwx) permission, the group has read and execute permission (r-x),
and world has read permission only (r--)
✔✔Numeric Permissions - ✔✔Permissions can also be expressed numerically, using
the octal value format. An octal value can represent up to eight digits (0-7). 0 represents
deny (no permissions), read=4, write=2, and execute=1. You can add those values
together to get a particular combination of permissions.
, For example, a file with numeric permission 0754 can be converted to symbolic notation
as follows:
The leading zero identifies the value as an octal but can often be omitted
7 in the first position grants all rights to the owner: 4(r)+2(w)+1(x)
5 in the second position grants read and execute to the group: 4(r)+0+1(x)
4 in the third position grants read to world: 4(r)+0+0
The other common combination is 6 (read and write)
✔✔chmod Command - ✔✔Can be used to secure files and directories, using either
symbolic or octal notation. Only the owner can change permissions
✔✔chown Command - ✔✔Allows the superuser to change the owner of a file or
directory. Note that this right is reserved to superuser or sudoer. Even if a regular user
owns a file, they cannot use chown. The file owner can change the group useing the
chgrp
✔✔Package Management Commands - ✔✔Linux software is made available both as
source code and as pre-compiled applications. A source code package needs to be run
through the appropriate compiler with the preferred options.
Pre-compiled packages can be installed using a package manager. The choice of
package manager is one of the basic distinctions between distro types:
Advanced Packaging Tool (APT) is used by Debian distributions and works with .deb
format packages
Yellowdog Updater, Modified (YUM) is used by Red Hat distributions and works with
.rpm format packages
✔✔Distributions and Repositories - ✔✔A distribution contains any precompiled software
packages the vendor or sponsor considers appropriate. Copies of these packages
(including any updates) will be posted to a software repository. Often the vendor will
maintain different repositories. For example, there may be one for officially supported
package versions, one for beta/untested versions, and one for "at own risk"
unsupported packages
The package manager needs to be configured with the web address of the software
repository (or repositories) that you want to use. It can then be used to install, uninstall,
or update the software. The repositories are configured automatically by the guided
setup process
The integrity of a package is usually rested by making cryptographic hash of the
compiled package, using a function such as MD5, SHA-256, or GNU Privacy Guard
(GPG) signing. The hash value & function are published on the package vendor's site.
The package manager validates the hash or signature before proceeding with an
update or installation.
✔✔apt-get Command - ✔✔A command interface for APT. The following basic
commands are used to update/patch and install software.
Refresh the local database with information about the packages available from the
repository: apt-get update
QUESTIONS AND ANSWERS SURE A+
✔✔df and du Commands - ✔✔Check free space and report usage by the device,
directory, or file specified as the argument:
df ("disk free") enable you to view the device's free space, file system, total size, space
used, percentage value of space used, and mount point
du ("disk usage") displays how a device is used, including the size of directory trees and
files within it
✔✔su Command - ✔✔su (switch user) command switches to the account specified by
username: su username. It is possible to switch to the superuser account by omitting
the username argument. The command will prompt the user for the password of the
target account before switching to it.
Using su without an option retains the original user's profile and variables. The switched
user also remains in the home directory of the original user. Using su - changes to the
root user and launches a new shell under the context of root. This is a better practice.
✔✔sudo Command - ✔✔sudo (superuser do) command allows any account listed in the
/etc/sudoers file user to run specified commands with superuser privilege level. In
distributions that use sudo, this process is handled by guided setup. The user enters the
sudo command followed by the command the user wishes to run. The user might be
asked to confirm their password if it has not been cached recently
,Main advantage of sudo over su is that the root password does not have to be shared
between multiple administrators.
✔✔User Management Commands - ✔✔User settings are stored in the /etc/passwd file
and group settings are stored in the /etc/group file. The user password is typically stored
as an encrypted hash in the /etc/shadow file, along with other password settings, such
as age and expiration date. The commands useradd, usermod, and userdel can be
used to add, modify, and delete user information. The command passwd can be used to
change the password.
✔✔Group Management Commands - ✔✔Each user account can be assigned to a
group as a means of allocating permissions over files. The groupadd , groupmod , and
groupdel commands can be used to manage group memberships.
A user can belong to many groups but can only have one effective group ID at any one
time. The effective group ID is listed for the user account in /etc/passwd and can be
changed using the newgrp command
✔✔File Permissions Commands - ✔✔Each file has a set of permissions that determines
the level of access for any given user. Linux uses a permissions system with three
rights:
1) Read (r) gives permission to view the contents of a file or directory
2) Write (w) gives permission to modify or delete the object. In the case of directories,
this allows adding, deleting, or renaming files within the directory.
3) Execute (x) gives permission to run an executable file or script. For directories,
execute allows the user to do things such as change the focus to the directory and
access or search items within it.
✔✔Symbolic Notation - ✔✔Syntax for setting Linux permissions that use characters to
represent permissions values.
Each permission is allowed (r or w or x) or denied (-)
For example, if you run ls -l to obtain a long directory listing, the permissions will be
shown as followsL
drwxr-xr-x 2 bobby admins Desktop
-rwx-r-x r-- 1 bobby admins scan.sh
The leading character designates the file type. For example, - represents a regular file
and d indicates a directory. The permissions for the Desktop directory show that the
owner (bobby) has full (rwx) permissions whereas the group (admins) and others have
read and execute but not write (r-x). For the scan.sh file, the user has
read/write/execute (rwx) permission, the group has read and execute permission (r-x),
and world has read permission only (r--)
✔✔Numeric Permissions - ✔✔Permissions can also be expressed numerically, using
the octal value format. An octal value can represent up to eight digits (0-7). 0 represents
deny (no permissions), read=4, write=2, and execute=1. You can add those values
together to get a particular combination of permissions.
, For example, a file with numeric permission 0754 can be converted to symbolic notation
as follows:
The leading zero identifies the value as an octal but can often be omitted
7 in the first position grants all rights to the owner: 4(r)+2(w)+1(x)
5 in the second position grants read and execute to the group: 4(r)+0+1(x)
4 in the third position grants read to world: 4(r)+0+0
The other common combination is 6 (read and write)
✔✔chmod Command - ✔✔Can be used to secure files and directories, using either
symbolic or octal notation. Only the owner can change permissions
✔✔chown Command - ✔✔Allows the superuser to change the owner of a file or
directory. Note that this right is reserved to superuser or sudoer. Even if a regular user
owns a file, they cannot use chown. The file owner can change the group useing the
chgrp
✔✔Package Management Commands - ✔✔Linux software is made available both as
source code and as pre-compiled applications. A source code package needs to be run
through the appropriate compiler with the preferred options.
Pre-compiled packages can be installed using a package manager. The choice of
package manager is one of the basic distinctions between distro types:
Advanced Packaging Tool (APT) is used by Debian distributions and works with .deb
format packages
Yellowdog Updater, Modified (YUM) is used by Red Hat distributions and works with
.rpm format packages
✔✔Distributions and Repositories - ✔✔A distribution contains any precompiled software
packages the vendor or sponsor considers appropriate. Copies of these packages
(including any updates) will be posted to a software repository. Often the vendor will
maintain different repositories. For example, there may be one for officially supported
package versions, one for beta/untested versions, and one for "at own risk"
unsupported packages
The package manager needs to be configured with the web address of the software
repository (or repositories) that you want to use. It can then be used to install, uninstall,
or update the software. The repositories are configured automatically by the guided
setup process
The integrity of a package is usually rested by making cryptographic hash of the
compiled package, using a function such as MD5, SHA-256, or GNU Privacy Guard
(GPG) signing. The hash value & function are published on the package vendor's site.
The package manager validates the hash or signature before proceeding with an
update or installation.
✔✔apt-get Command - ✔✔A command interface for APT. The following basic
commands are used to update/patch and install software.
Refresh the local database with information about the packages available from the
repository: apt-get update