Appends the file "file" to the end of the archive. Also --append can be used
On which block is the first redundant copy of the partition's super block stored by default on an ext4 filesystem ?
What is the command to create a swap partition on the second SATA drive first partition?
What is the command to enable the swap partition on the second SATA drive first partition ?
What type of backup backs up all filles modified since the last full backup, and does NOT flag the files as having been backed up ?
In command mode for fdisk what does "p" do ?
print extisiting partitions on the drive.
In fdisk command mode what does "n" do ?
create a new partition on the disk.
What is the command to check a digital signature of an rpm file ?
rpm --checksig package.rpm
What is the command to test dependancies of an rpm without installing ?
rpm -i --test package.rpm
What is the the command to install an rpm regardless of the dependancies ?
rpm -i --nodeps package.rpm
What is the command to list all packages that require an rpm ?
rpm -q --whatrequires
What is the command to list all files incuded in an rpm ?
rpm -ql package.rpm
What is the command to show what a package provides ?
rpm -q --provides
What is the command to show what rpm package provides the function?
rpm -q --whatprovides
What is the rpm command to get specific detailed information about a package ?
rpm -qi package.rpm
What is the command to verify an installed package ?
rpm -V packagename
What is the command to convert an rpm to a cpio archive ?
rpm2cpio package.rpm > package.cpio
In what directory are yum repositories stores ?
When using the dpkg utility what does -P option do ?
-P Uninstalls the package AND deleted all of the configuration files.
What is the command to install package.deb
dpkg -i package.deb
What is the command to to display information about a deb package that is not installed on the system ?
dpkg -I package.deb
What is teh command to see information about a deb package that is already installed?
dpkg -p package.deb
What does dpkg -l do ?
lists all installed packages on the system.
What does dpkg -L package.deb do ?
Lists all files that were installed by the package.
what does dpkg -S filename do?
Identifies the package that installed filename.
What does dpkg -rB do ?
Disables other packages that are dependant on the package being removed.
What does dpkg -iG do ?
Does not install the package if a newer version is already installed.
What does dpkg -iE do ?
Does not install the package if the same version is already installed.
What is the apt command to show information about a package ?
apt-cache showpkg packagename
What is the APT command to show all dependancies for a package name ?
apt-cache depends packagename
What is the APT command to search for installed packagenames ?
apt-cache pkgnames packagename
What does "apt-get upgrade" do ?
Upgrades all installed packages to the newest version.
What does "apt-get dist-upgrade" do ?
Upgrades all installed packages to the newest version, but avoids upgrading packages if the upgrade would break a dependency.
What does "apt-get clean" do ?
Removes all outdated information from the package database.
What is the apt-get command to verfy the integrity of installed packages as well as the package database ?
What does thr -d option for for both upgrade and install using the apt-get command do ?
Downloads the packages, but does not install them.
What does "apt-get -s install ntp" do ?
Simulates the install, but does not actually install it.
What is the apt-get option to fix if possible any unmet dependancies ?
the -f option.
What is the command to view a list of all shared libraries on your Linux system ?
What is the command to view the libraries required bya specific application ?
ldd -v executable_filename
What two places are searched when for libraries ?
The /etc/ld.so.cache file and the LD_LIBRARY_PATH environment variable.
What is the command to rebuild the library cache ?
What uname option shows the linux kernel's name ?
What uname option shows the hardware platform ?
What uname option shows the systems host name ?
What uname option shows the processor type ?
What uname option shows the hardware achitecture (x86_64) ?
What is the option used with man to serach for a keyword across all man pages ?
man -k keyword
What Man page manual section is "Library Functions"?
manual section 3
What Man page manual section is "Games" ?
manual section 6
What Man page manual section is 8?
Administrative utilities used by root user.
What man section is 9 ?
kernel routine documentation.
What shell variable is used to store shell prompt format.
Which configuration file is first read when a login bash shell is run ?
What file can be used to configure the path to man page files ?
What does grep -l "name" do ?
Display only the filename "name" was found in and not the matching text.
What does grep -n "name" * do ?
displays the matching text, file name and line numbers.
What is the name of the daemon for locate.
What does "whereis -b" show ? -m ?
-b show the path to the binary, and -m for the location of man pages.
What is the option for mkdir that allow you to create directories and subdirectorys in one command ?
mkdir -p /stuff/morestuff
What is the GID of this entry from /etc/passwd
What is the status of this user :
* means the account is locked.
What does useradd -D do ?
Shows the defaults for newly added logins.
What does the comand pwck do ?
verifies integrity of password files
What files stores the default settings for new users ?
What file stores the default settings for new users in /etc/shadow?
What directory stores default hidden files for newly added users ?
What does the -M option do for useradd ?
Adds user without a home directory.
What does the -m option do for useradd ?
create a home directory for the user.
What does the -G option do for useradd or usermod ?
list of supplementary groups.
What does the -e option do for useradd or usermod?
date on which the accoount will expire.
What does the -f option do for useradd or usermod ?
Days after a password expires until account is disabled.
What does the -g option do for useradd ?
Name or number of the user's primary group.
What does the -s option do for useradd or usermod?
specify the user's shell
What does the -u option do for useradd or usermod ?
manually specify the uid. (by number)
What does the -r option do for useradd ?
create a "system" account, same as --system
What does the -p option do for useradd or usermod?
specify crypt password.
What does passwd -S <user> do ?
report the password status for an account.
What is the comand to unlock a password for a user ?
passwd -u <user>; or --unlock
What is the comand to lock a password for a user ?
passwd -l <user>, or --lock
What is the comand to delete a password for a user ?
passwd -d <user>, or --delete
What does "passwd -m 3 <user>" do ?
Sets the Minimum days before a password can be changed to 3 days, or --mindays
What does "passwd -x 3 <user>"do ?
This sets the maximum bumber of days a password remains and valid before it must be changed. or --maxdays
What does "passwd -i 3 <user>" do ?
Sets the number of days the can be accessed after expiration. or --inactive
What does "passwd -w 3 <user>" do ?
Set the number of days until a password change is required. or --warndays
What does usermod -c "txt" do ?
adds a comment to the user account "txt"
What does "usermod -U ,user> " do ?
unlock the user account; or --unlock
What does the "usermod -d" do ?
Allows you to specify a new home directory location
What does "usermod -l <user> " do ?
Specficy a new login name
What does "userdel -r <user>" do ?
Removes the user and home directory and mail spool entries.
What does the -r option do for groupadd ?
adds a system group
What does the -g option do for groupadd ?
Allows you to specify a GID
What does the -p option do for groupadd ?
Specify an encrypted password.
What does "groupmod -A "ksanders" dbusers" do ?
Adds ksanders to the dbusers group.
What does "groupmod -R "ksanders" dbusers" do ?
Removes ksanders from the dbusers group.
what does "chmod 4644 testfile" to testfile ?
SUID - set user id
-rwSr--r-- 1 sethwalt sethwalt 0 Oct 25 14:42 testfile
What does "chmod 2644 testfile" do ?
SGID - set group id
-rw-r-Sr-- 1 sethwalt sethwalt 0 Oct 25 14:42 testfile
What does "chmod 1644 testfile" do ?
Sticky bit - only applies to directory
-rw-r--r-T 1 sethwalt sethwalt 0 Oct 25 14:42 testfile
Explain sticky bit :
Users can only delete files within the directory for which they are owner of the file or directory itself
Explain SGID :
Set group id only applied to binary executables. When a file is executed, the user who runs, temporarily becomes a member of the file's group. Also whe SGID is set the file is set to the group of the parent dirctory when created.
Set user id only applied to binary executables . When run the user who runs the file is temproarily the owner.
What 2 entries need to be added to the /etc/fstab file to enable quotas?
usrquota and grpquota to the options section.
What does the command dmsg | more display ?
Messages displayed during boot process.
What is the bash command to create a grub password hash?
What need to be entered in /etc/grub.conf file for a password ?
"password x" or
"password -md5 $alkjlsafi9230r9f" for md5 hashes.
What directive needs to be added to a section in the grub.conf file to require the user to use a password ?
Which runlevel halts the system ?
Which runlevel reboots the system ?
What is the command that removes init scripts and runlevels for daemon ?
insserv -r <service name>
What is the command that adds init scripts and runlevels for daemon ?
insserv <service name>
What is the command that sets runlevels for daemon to the defaults ?
insserv -d <service name>
what is the insserv syntax to set ntp to run levels 3 and 5 ?
What is the command to build a module dependance list ? What is the location of the file ?
What is the daemon that creates a virtual file system mounted at /dev and communicates to the Linux kernel through the uevent interface.
IEEE 1394 allows you to connect up to how many devices ?
USB allows you to connect up to how many external devices to the PC ?
ISA or PCI devices cannot share an interrupt ?
Can Two PCI devices can share interrupts ?
Can A PCI device share an interrupt with an ISA device.
What does the cut -d option do ?
specifies the character the is the delimiter for fields.
What does the cut -f1 <file>do ?
displays the first field for every line in the file.
echo "monkeys" | cut -b 2 or
echo "monkeys" | cut -c 2 do ?
-c for characters and -b for bytes both display "o"
What does the "expand" command do ?
coverts all TABs in a file to spaces.
What does "unexpand" do ?
Converts all spaces in a file to TABs
What does "fmt -w 80 longfile " do ?
sets the max width of the lines in the file to 80 char.
Explain join -j 1 file1 file1; what do the files contain
Join the lines from file 1 and file 2, based on the mating join field 1. IE the lines are numbered in each file.
Explain paste file1 file2
Match by lines (regardless of content) from file 1 and file 2 separated by a tab.
What does "nl file1" do ?
numbers each line
What does "pr -d -l 10 -o 10 testfile" do ?
Format file for printing : -d double space, -l number of lines; -o set a margin.
What do the awk options n, f, r, t do ?
t Inserts a Tab character. n Adds a newline character.f Adds a form feed character. r Adds a carriage return character
What to the sort options -f, -M, -n, -r do ?
-f Fold lowercase characters to uppercase characters. -M Sort by month. -n Sort numerically. -r Reverse the sort order
What does "cat lastnames | tr a-z A-Z" do ?
Changes every letter in the file to Upper case.
What do the uniq options -u and -d do ?
-d Only print duplicate lines. -u Only print unique lines
What do the wc options, -c, -m, -l, -w do ?
-c Print the byte counts. -m Print the character counts. -l Print the newline counts. -L Print the length of the longest line. -w Print the word counts.
What do the cpio options -i, -o, -p, -v do?
-i, --extract Extract files from an archive (run in copy-in -o, --create Create the archive (run in copy-out mode) -p, --pass-through Run in copy-pass mode -v, --verbose Verbosely list the files processe
What does killall -u jon do ?
kills all processes for user jon
What signal is SIGHUP ?
SIGHUP kill signal 1 restarts the process
What signal is SIGINT?
SIGINT kill signal 2 ends a ctrl C
What signal is SIGKILL ?
SIGKILL kill signal 9 brute force kill
What signal is SIGTERM ?
SIGTERM kill 15 tells the process to terminate immediatly
What does killall do ?
kills all processes by name.
What is nohup used for ? nohup updatemydb &
To continue to run the process even when user logs out.
using the at command when is teatime ?
What is the atq command used for ?
To see what at jobs are qued to run.
What is the atrm command used for?
To remove qued at commands, but job number.
What does the ps command do, ps -e ? ps -ef ? ps -efl?
ps - display processes in current shell
ps -e - all processes
ps -f show more detail :
ps -l even more detail :
What does quotacheck -amvug do?
-a Checks all mounted file systems. -m Forces check on mounted file systems. -u Checks users.-g Checks groups. -v Operates in verbose mode.
When quotacheck is complete what 2 files are created ? Where are they?
Two files named aquota.user and aquota.group should have been created in the mount point of your mounted file system.
What is the command to enable quotas on the filesystem?
What is the command to edit quotas for a user?
edquota -u username
What is the command to copy quotas from one user to another ?
edquota -p user1 user2
What is the command to edit quotas for groups?
edquota -g groupname
What is the default grace period for quotas? What is the command to change it ?
7 days, edqouta -t
What is the command to see a quota report for all users ?