Instructor Flashcards
/var/log/messages
Where all log messages go (except mail)
TCP Wrappers
- For
inetd
, using only/etc/hosts.allow
and/etc/hosts.deny
as parameters of tcpd -
xinetd
, the librarylibwrap.a
allows those services to use/etc/hosts.allow
and/etc/hosts.deny
ip
- Unified network and routing management command designed to replace the functionality of most of the other commands you need to know for the exam
- For example:
ip addr show
- Will provide you the same information as the generic
ifconfig
command
/etc/group
- Defines group-specific information like mapping of the group name to the group ID, other members of the group, etc.
- Groups can contain multiple users
TZ (variable)
- Allows you to override the system-wide time zone setting in the above directory
- Often set in a user’s home directory as part of the
.bashrc
file
/etc/aliases.db
- Database file that your local MDA will read to determine where to send email
- It has to be updated when any changes are made to the aliases on the system
if [["$?"=="0"]]
- Will determine if the preceding command succeeded or failed
- NOTE: The variable
"$?"
is a special variable that can be tested immediately after any command. If the value is0
, then the command succeeded (did not error), while any other value means the command failed.
usermod
- Modify the characteristics and/or membership of existing users
-
-c [description]
— Modifies the user description in the/etc/passwd
file -
-d [new home directory]
— Changes the user’s home directory -
-e [date]
— Change the date of account expiration -
-f [# days]
— Change the number of days after a password reaches max age the account will still allow login -
-g [GID]
— Change the user’s primary GID -
-G [GID]
— Change the user’s secondary GID(s) (can be multiple groups in a comma-delimited list) -
-s [path and file of login shell]
— Changes the full path and name of the default login shell for the user -
-u [UID]
— Changes the UID (NOTE: Will change home directory to match, but not any other user-owned files) -
-L
— Locks the user’s account -
-U
— Unlocks the user’s account
/etc/resolv.conf
Defines the system DNS servers and domains for name resolution
crontab
- Utility to allow the creation of jobs (specific to user running the command)
-
-l
— List all cron jobs for the logged-in user -
-e
— Edit the cron jobs for the logged-in user -
-u [username]
— Apply the option to the user indicated
dpkg-reconfigure tzdata
(Debian-based systems)
-
list-timezones
— List all the time zones to choose from -
set-timezone
[country/zone] — Set to the indicated time zone - Make the actual changes, setting the
/etc/localtime
system setting to the time zone chosen
tracepath6
IPv6 equivalent to tracepath
What subcommand of Git is used to change Git configurations?
git config
/bin/false
Returns a non-zero code to the request that will block any user request to log in
/etc/motd
If it exists, it displays the contents of this file when someone logs on to the system.
/etc/localtime
The system time zone (can be a full time zone copy OR a link to the configured time zone)
cupdisable
Disables the indicated printer (but will still accept jobs — will just hold in the queue)
~/.ssh/known_hosts
File containing the public key of known/trusted hosts that have connected to/from existing host by the user whose directory it exists in
/etc/skel
The contents of this directory can be copied to a new user’s home directory depending on how the user is added.
timedatectl
(Red Hat-based systems)
-
list-timezones
— List all the time zones to choose from -
set-timezone [country/zone]
— Set to the indicated time zone - Make the actual changes, setting the
/etc/localtime
system setting to the time zone chosen
UDP
User Datagram Protocol
* Often considered “complementary” to IP, but is a “stateless” connection. No error checking or retransmission of packets takes place, even if the transmission of the packet failed.
/etc/cron.deny
- Blacklist of users who cannot run cron jobs
- If this file exists and is empty, all users can access their crontabs and run jobs
- NOTE: Order of precedence will apply
cron.allow
and ignorecron.deny
if it exists
lp
- Command line (legacy) utilities for printing
- For example:
echo "my test print job" | lp
- Would print to the default printer the results of the
echo
command -
-d [printer]
—The destination printer (if not default) -
-n [#]
— Print indicated number of copies
/etc/cron.*
-
cron.d
— Custom job schedule configuration directory (system cron jobs) -
cron.hourly
— Jobs that run hourly -
cron.daily
— Jobs that run daily -
cron.weekly
— Weekly jobs -
cron.monthly
— Monthly jobs - NOTE: In all but
cron.d
, these directories are just scripts with no other scheduling information included in them and they will not always run at the same time, but will run within the specified time “frame.”
What is the default port used to log in to a host via SSH?
22
if [-f /home/user/testfile.txt]
Will test for the existence of a file called /home/user/testfile.txt
What command creates a new branch called “new-feature” in your current repository?
git branch new-feature
/sbin/nologin
Also blocks login requests, but returns a text message result
/etc/login.defs
Defaults for a user when created with the useradd
command
.bash_profile
- Located in a user’s home directory (e.g.,
/home/user
) - “Sourced” or executed second (if it exists) as part of the login process (after the global profile)
- Affects the current user’s environment (and ONLY that user’s environment)
LightDM
Works as a service
-
systemctl status lightdm
(systemd
systems) /etc/lightdm/lightdm.conf
- If it exists, will contain the configuration for the display manager
- Designed to be a lighter weight display manager (and replaced KDM)
/usr/share/doc/lightdm
- Directory containing sample configuration file
dig
-
[server] [domain] [record type]
— All optional except domain - Server — Specify a DNS server to use
- Domain — The specific domain to query for
- Record type — Different record types (e.g., NAME, CNAME, MX, etc.)
export
- Shows exported variables (when run alone)
- Keyword that, when preceding a variable, will allow the value to be passed on to other shells or children of the current shell (normal behavior is that the variable value is only visible in the current shell — referred to as “variable scope”)
The format of a cron job entry
[Minute 0–59] [Hour 0–23] [Day of Month 1–31] [Month 1–12] [Day of Week 0–7] [CMD]
Accessibility tools
- Sticky/repeat keys
- Slow/bounce/toggle keys
- Mouse keys
- High contrast/large print
- Screen reader
- Settings on some desktops
- Orca
- Emacspeak (for Emacs editor)
- Braille display
- Screen magnifier
- On-screen keyboard
- GOK (Gnome Onscreen Keyboard)
/etc/systemd/journald.conf
- Configuration file for
journald
* Common settings are for size of log and whether logging is forwarded to syslog as well (or installed equivalent)
traceroute6
IPv6 equivalent to traceroute
/etc/xinetd.conf
- Primary configuration file, including files in
/etc/xinetd.d
with files (one each) per service that is controlled - The request will come to the daemon, which will check for the service type and port and then scan for the appropriate service configuration file in
/etc/xinit.d
GPG
Utility working with keys for encrypting files and exchanging with third parties
What are two important configurations that should be set when working with Git?
user.name
* user.email
chage
- Change the aging parameters of the indicated user’s account and password
- Changes values in the
/etc/shadow
file -
-m [# days]
— How long a user must wait (in days) between password changes -
-M [# days]
— How long before a user must change their password -
-d [date]
— Sets the last changed value for the password -
-E [date]
— Changes the expiration value -
-I [# days]
— Number of days inactive after expiration or max limit before account is locked -
-W [# days]
— Warning for the number of days before a user must change their password -
-l
— Display all values for the indicated user
/etc/cron.allow
- Whitelist of users who can run cron jobs
* If this file exists and is empty, only root can access crontabs
What does the command uname -r
do?
Displays kernel release number
GDM
- Gnome Display Manager
-
/etc/gdb
— configuration directory -
/usr/bin
— executable directory
dpkg-reconfigure
[current desktop manager]
Allows reconfiguration of display manager; screen should prompt for any installed DM (on Debian/Ubuntu systems)
ssh
- Secure shell
- Related commands (also secure) —
scp
,ssh-agent
,ssh-add
-
-l [user] [host]
— Logs in as the specified user to the host -
[user]@[host]
— Logs in as the specified user to the host -
-X
— Enable SSH XWindow forwarding -
-x
— Disable SSH XWindow forwarding
What command lists your current working directory?
pwd
What Git sub-command provides a short listing of a repository change log?
git log --oneline
XDM
- Display manager that is part of the Xorg software package
- ` /usr/bin` is the directory where it will exist if installed
-
xorg-x11-xdm
is the package for the display manager - Not generally installed/used unless no full desktop environment is being used
-
/etc/X11/xdm
is the configuration directory
/etc/bashrc
- Located in
/etc
- Global configuration file that applies its settings to all user environments (as long as they use bash)
- “Sourced” or executed after the profile from the user’s
.bash_profile
if it exists - Commonly used to define aliases and functions for the environment for all users
Special UID`s
- UID 0 — Root/admin user on any system
- UID 1 —
bin
user (system binaries and nonlogin accounts) - UID 48 — Apache user (if installed)
- UID 99 — “Nobody” account (used for a variety of things, including FTP anonymous access; may also map to a root account for certain NFS configurations (e.g., the root_squash option))
logger
- Allows you or a command to log a message to
/var/log/messages
- CTL-D to end and write the message
-
-i
— Passed additional information to syslog
/etc/default/useradd
Contains the default values for the useradd
command when those parameters are not used
read FIRSTNAME
Will prompt user for a FIRSTNAME
and store it in that variable to be used later
/var/log/journal
Binary file where the systemd
log is stored
cupsaccept
By indicating a printer name, it will set that printer to accept all submitted jobs
ntpq
- Query an ntp server for stats and connect to local system by default
- Special prompt
- Peers — Time hosts already associated with
- Associations — More details on each server
ntp / ntpd
- Network Time Protocol
- Network Time Protocol daemon (service)
- Allows you to define a pool of network servers that are synchronized to a globally distributed network of time servers
- Those that get a time update from a “reference” clock (like the naval observatory in the USA) are called “stratum 1 servers”
ASCII
- American Standard Code for Information Interchange
- Encoded into seven bits, giving 128 total possible characters
- English encoding
- Once those characters ran out, storing went to eight bits, giving another 128 possible characters
/usr/share/zoneinfo
- The top-level directory containing all time zone definitions
- NOTE: These are binary files and cannot simply be viewed on the console
/etc/sysconfig/network-scripts
- A directory containing a host of scripts responsible for the configuration of all interfaces on the system
- For example,
ifcfg-eth1
- Responsible for the configuration (static or DHCP) of the address information for the ETH1 interface on your system
- Changes to the network interface configuration are applied by restarting the network service
- For example, service network restart
ssh-keygen
- Creates a public/private key pair for use with SSH
-
-b [#]
— Encryption key size (e.g., 1024, 2048, etc.) -
-t [type]
— Encryption key type (DSA or RSA — RSA is more secure and is currently the default) - Will prompt for a password — blank will allow you to use the key to log in completely without password, whereas entering a passphrase effectively creates two-factor authentication (key + passphrase)
- File permissions on keys should be either 644 (older) or 600 (newer)
/etc/cups
- Configuration directory for CUPS
- Configuration file list:
-
classes.conf
— Configures class definitions -
cupsd.conf
— Primary configuration file for the daemon -
cupsd.conf.default
— Sample default configuration file to revert to as backup -
printers.conf
— Configuration of each printer on the system -
ppd
— Directory of PPD (printer driver files) on each printer on the system
anacron
- “Simplified” cron, used to augment crond
- Runs jobs that can be run with less time precision, particularly catching up on running jobs that were scheduled while the system was shut off
/etc/logrotate.conf
- Primary configuration for log rotation (defaults and system files to rotate)
- Each file in
logrotate.d
adds or overrides settings to the defaults in the configuration file - NOTE: Files in
logrotate.d
are usually added/maintained by the package manager as part of the install/update/removal of packages
groupmod
- Modify the characteristics of the indicated group
* -g [GID]
— Alters the GID of the indicated group
How can you copy a branch from one repository into the origin repository?
git push origin
cupsreject
By indicating a printer name, it will set that printer to reject all submitted jobs
True or False: Branching is an efficient operation in Git.
True. This is one of the notable features of Git.
xinetd
Replacement for inetd
, allowing more granular control of services
/etc/aliases
- Ability to refer to a user by another name/account
- For example (entry in file) —
sysadmin: root
would indicate that an email arriving on the system for thesysadmin
account would actually be delivered toroot
- Format of an alias —
alias: account[,another,another]
- The brackets are optional, defining multiple accounts that an alias refers to is in a comma-delimited list
iconv
- A utility used to convert between character encodings
-
-c
— Clears unknown characters -
-f [type]
— From indicated type -
-t [type]
— To the indicated type -
-l
— Lists all available encoding types - For example —
iconv -c -f ASCII -t MACCYRILLIC VNCHOWTO > VNCHOWTO.new.cyrillic
- Would clear any unknown characters in the file stream from VNCHOWTO and convert from ASCII to MACCYRILLIC encoding, writing the new file to VNCHOWTO.new.cyrillic
- NOTE: This is not a language translator — simply a character encoding translator
cupsd
- Daemon for CUPS
* CUPS operates on port 631 and can be accessed through your local browser (http://localhost:631)
/var/spool/mqueue
- Email that is waiting to be delivered
* Will ONLY exist if mail is in the queue; on a correctly configured server, it should be empty
cupsenable
Enables the indicated printer
What is the term for the commit that Git is currently referencing?
The head
cron
- The primary job scheduling system in Linux
- Jobs are configured to run on a fixed schedule (either once or multiple times as needed)
crond
- The service that is responsible for making sure cron jobs are run
IP (internet protocol)
- A method of uniquely identifying an address (destination) for a specific system. Two primary versions:
- IPv4 — Standard address structure of four “octets” containing numbers between 0–255 for each (e.g., 192.168.72.211)
- IPv6 — Intended as a replacement for IPv4, consists of a 128-bit hexadecimal number for addressing (e.g., 2DAF:FF40:0928:CD01:4433:00DD:0988:FFFF)
systemd
(logging)
- Uses its own logging system called
journal
(withjournald
being the daemon for it) - Adopted on most modern
systemd
-based distributions - Primarily, the difference lies in that the logging is done to a binary rather than plain text file, allowing you the ability to query metadata, command line details, PIDs, binaries, and security privileges (some of which just are not available with a plain text file)
- Because it is part of the service management system, all daemon messaging is automatically logged rather than the sysvinit variant of syslog wherein each service is responsible for how and what messages are logged
tracepath (all users)
- Utility to determine the distance (in hops) between your system and a desired endpoint as well as the response time of each hop along the way
-
-n
— Do not attempt name resolution for each hop, IP only
Drift
The amount of time that the hardware and system clocks differ
route
- Displays the current routing table
- Adds/removes routes as indicated
- For example —
route add default gw 192.168.1.1
would manually add a default gateway to the system going to 192.168.1.1
CUPS
- Common Unix Printing System
- Combination of converters, filters, and “printer drivers” that a document can be sent to when output to printing devices, scripts to create SVG, PDF, or other formatted documents
What is the term for a set of file states in Git?
A commit
What does the env
command do?
Shows the environmental variables for the current user
syslog-ng
Alternative “next generation” syslog
lpq
- Displays the print queue and jobs
-
-a
— Display all print jobs for all printers -
-P [printer]
— Display print jobs for the indicated printer
lpstat
- Show current
lp
configuration (printers and defaults) -
-p
— Show printers -
-d
— Show defaults -
-a
— Display all print queue and status -
-r
— Indicates status of service -
-s
— Summary of system configuration -
-t
— Verbose summary of system configuration
journalctl
- The command used to view the aforementioned journal file on the console
-
-f
— Allows you to follow as new log messages are written -
SYSLOG_IDENTIFIER=[value]
— Allows you to add a filter to just view matching log entries -
-u [service]
— Only display messages logged from the indicated service -
-o verbose
—Display a LOT more information about the requested service or filter -
-e
— Jump to the end of the log -
-x
— Adds information to explain the context under which a logged event or error occurs (like in service start failures)
What command reboots the machine?
shutdown -r
What does the following command do:
git init alpha
Creates a repository named “alpha” in the current working directory
/var/spool/at
Directory containing the jobs to run
/etc/X11/prefdm
Script that tests for the preferred display manager (on Red Hat/CentOS systems)
What command would you run to commit all currently staged files with the message “fixed everything”?
git commit -m "fixed everything"
Special GIDs
- GID 0 — root/admin group (members of this group have access to restricted resources)
- GID 1 —
bin
group (system binaries and nonlogin accounts) - GID 100 —
users
group (put users in this group to give access to resources by assigning the group ownership to this group)
.bashrc
- Located in user’s home directory (e.g.,
/home/user
) - “Sourced” or executed (if it exists) from the
.bash_profile
of the user - Affects the current user’s environment (and ONLY that user’s environment)
- Another file that commonly is used to define aliases, bash prompt appearance, functions for the environment, etc.
MUA
Mail User Agent, which is whatever application you use to create and send email (Thunderbolt, Evolution, SquirrelMail, etc.)
/var/log/maillog
Mail messages are written here
What are the three scopes of configuration in Git?
- System
- Global
- Local
Default gateway
- The destination of ALL traffic whose destination is not on the local system network OR does not have another matching static route configured
- Can be configured within either
/etc/sysconfig/network
or/etc/sysconfig/network-scripts/ifcfg-eth#
(where#
is the interface number) - For example —
GATEWAY=192.168.1.1
would configure the system’s default gateway for the IP 192.168.1.1
What does the dig
command do?
Look up IP addresses and DNS names
ssh-agent
- Wrapper for SSH that allows you to pass items (keys) into the SSH shell for connectivity
- Executing
ssh-agent
starts the agent on the indicated shell - For example —
ssh-agent bash
starts a bash prompt with the agent wrapping it
GnuPG
- GNU Privacy Guard
* Public and private key creation for encrypting data
What command may be used to administer a FreeRADIUS server?
radmin
ssh-copy-id
- Copies your public key to the user and host as indicated
- For example —
ssh-copy-id user@user.mylabserver.com
- After the password is entered for the indicated user, will copy the public key from this host and user to the remote host and user’s
authorized_keys
file, and you can then log in on that system and account with this key - Manual method — Copy/paste the contents of your public key into the remote user’s
authorized_keys
file and set the permissions at 600 - Next connection will either work (no passphrase set up) or prompt just for passphrase
/etc/at.deny
- Blacklist of users who cannot run
at
jobs - If this file exists and is empty, all users can access
at
and run jobs - NOTE: Order of precedence will apply
at.allow
and ignoreat.deny
if it exists
/etc/X11/xorg.conf
- The primary configuration file for the XWindows system
- Major sections (exam)
- Files — Files that are used by your X server (e.g., fonts)
- Module — Devices
- InputDevice — Keyboards and mice (and perhaps special keypads if detected)
- Device — Video card(s) and any driver references
- Monitor — Monitor(s) detected
- Screen — Description of resolutions and color depths that are supported for the detected monitor and X server
/etc/hosts
Local file containing name(s) associated with an IP
Which option in setfacl removes an ACL entry entirely?
-x
/etc/securetty
Defines where the root
user is allowed to log in (if it does not exist, root
can log in from anywhere)
IMAP
Internet Message Access Protocol, which is used by MUAs to get email
Unicode
- Defines every character as a number (code point)
- Originally encoded in 2 bytes, giving you 16k possible characters (called UCS-2)
- Once again, the number of characters in this spec was exceeded
- UTF-16 was introduced to allow any character over 16k to be represented with a second pair of bytes
- UTF-8 allows 1 to 6 bytes to be used to encode a character, with the character length encoded into the high order bits of the character number and maintains full compatibility with the original spec 128-character ASCII code
- UTF is the dominant encoding type
What is the default branch in a Git repository?
Master
/var/lib/ntp/drift
File that tracks system time drift
Which command is used to preserve the currently active iptables rule set?
iptables-save
.forward
- Home directory file for users to define their own forwarding rules
- No alias needs to be indicated since it is for the account it exists within; only need to indicate the account to forward it to
ICMP
Designed for networking devices (routers, intelligent switches, firewalls, etc.) to send error messages. In addition, it can perform queries around network service availability (as in the case where the ping
command is used to test whether an address responds to a request).
echo $BUCKET
Will display the current value of the variable BUCKET
GID
- A group ID
* A numeric ID from 0 to over 4 billion
/etc/ssh/known_hosts
File used to check public keys of known/trusted hosts (does not exist by default)
tzselect
- Allows you to override the system-wide time zone setting in the above directory
- Often set in a user’s home directory as part of the
.bashrc
file
/etc/syslog.conf
- syslog configuration file
* Defines where certain facilities will write logs
tzselect
- Allows you to find the name of the time zone you want to use
- NOTE: This command does not change the time zone.
MTA
- Mail Transfer Agent
- Accepts email from the MUA and sends it (if needed) to the receiving mail server (another MTA if this is not the destination)
- There are a number of MTA servers in Linux (Postfix, which we will use, sendmail, etc.)
How can you instruct Git to track a particular file within a repository?
Use the git add
command
atq
- Shows a summary of all jobs scheduled with
at
* Will not show the details but a time and job ID
/etc/adjtime
- Contains values that track calibration to the clock and a final value to display time in LOCAL or UTC time
- If the file does not exist, no calibration has ever been done and time will default to UTC
MX record
- Mail DNS records
* These records are used by MTAs to determine the authoritative mail server for any particular email message
visudo
- Special editing mode for Vi that will allow editing and syntax/error checking of the
/etc/sudoers
file - NOTE: The editor used can be changed by setting the
EDITOR
environment variable to any other available text editor.
hwclock
- Allows you to work with the hardware clock directly
- Outputs the hardware clock date/time
- NOTE: The hardware clock is unaware of time zones
SMTP
Simple Mail Transfer Protocol, which is a protocol that really defines how email is transferred and saved and is part of the TCP/IP application layer as well as setting rules that email applications follow.
What does the command ln -s
do?
Creates a symbolic link
groupdel
- Removes the indicated group
* Files/directories that are owned by the group will then revert to the GID; you can change ownership at that point
lpr
- Command line (legacy) utilities for printing
- For example —
echo "my test print job" | lpr
would print to the default printer the results of the echo command -
-P [printer]
— The destination printer (if not default) -
-#[#]
— Print indicated number of copies
What is the file name in each configuration level that Git uses to store configurations?
/etc/gitconfig
-
~/.gitconfig
(~/.config/git/config
is also acceptable) -
.git/config
(in a repository directory)
MDA
- Mail Delivery Agent
- Receives email from the MTA and then delivers it to the local mail spool for retrieval by any of dozens of client email applications
- Sometimes an MTA can also function as an MDA, but often (procmail for example), they are independent applications that can also filter mail (like spam)
What command halts the machine?
shutdown -h
What are the three primary protocols Git may clone over?
- SSH
- HTTPS
- Git (for system local clones)
KDM
- KDE display manager (legacy)
- Replaced by KWin and later LightDM
-
/etc/kde/kdm
— Configuration directory -
/usr/bin
— Executable location
/etc/timezone
Local file that Debian systems use to store the name of the time zone configured
/etc/ssh/ssh_host_[rsa/dsa]_key
Specific encryption private keys with permissions of 600 to restrict access to root
user
set
- Shows all variables and functions in the current environment
- Also allows the enable/disable of various shell features
/etc/shadow
- Mapping of usernames and (if the account has one assigned) their hashed password value
- Default permissions
- Red Hat -r——- (400)
- Debian rw-r—– (640)
traceroute (root only)
- Utility to determine the distance (in hops) between your system and a desired endpoint as well as the response time of each hop along the way
-
-n
— Do not attempt name resolution for each hop, IP only
/etc/usertty
- Defines parameters for user logins (locations, days, times, etc.)
- NOTE: Only used if the system does not have pluggable authentication modules (PAM)
/etc/ssh/sshd_config
Main configuration for sshd
(the service)
rsyslog
Alternative “fast” version of syslog
POP
- Post Office Protocol
* Used by MUAs to get email (covered in more detail later)
ifup
Brings up the indicated network interface
locale
- A way of representing your language, country, and encoding type
-
-a
— Show you the locales that are installed on your system
cupsctl
Used to control CUPS configuration, run with no options, displays the current configuration
/etc/sudoers
- File that lists users that can execute commands with elevated root-level privileges
- Format requires the user be listed (or a group if an entire group should have root privileges) along with what they can do
- For example —
user ALL=(ALL) ALL
would provide theuser
account sudo rights for any command using elevated privileges - For example —
user ALL=(ALL) /bin/systemctl
would limit theuser
to only be able to runsystemctl
with sudo privileges (so they can restart services)
~/.ssh/authorized_keys
Stores public keys for logging in as the user that owns the directory
MSA
Mail Submission Agent, which acts as an intermediary or gateway between the MUA and an MTA to start the transfer of email.
ifconfig
- Utility to view all active interfaces (including the loopback adapter)
-
-a
— Force the display of ALL interfaces (active or not) in the report - Key fields
- Ether — Hardware (MAC) address, a 48-bit interface adapter’s physical address
-
inet
— The network address assigned to that interface -
broadcast
— Broadcast address for the system’s network -
netmask
— Network mask or logical network segment information
userdel
- Removes the indicated user’s account
-
-r
— Also removes all user mail, owned print jobs, cron jobs, and the home directory with all contents (NOTE: All other files owned by the user will still exist, with ownership reverting to the UID of the removed user — thus, becoming orphaned.) - NOTE: You cannot delete a user that is in use or has a process associated with the account.
lpoptions
- Allows the setting of printer options at the command line
-
-d [printer]
— Sets the default printer to the indicated value -
-p [printer]
— Deals with the indicated printer -
-l
— List options for the indicated printer/queue - For example —
lpoptions -p CUPS-PDF -l
would display all options for the CUPS-PDF printer lp
ssh-add
- Will prompt you for your passphrase on your public key (if set)
- Once entered, subsequent uses will not require entry until exited
/var/spool/cron
All user crons created/edited with crontab
are located here
What are the three major items that Git manages to keep track of file changes?
- Content snapshots
- Checksums
- Metadata
/etc/ntp.conf
- Pool of NTP servers
* Defines drift file to track clock drift
/etc/ssh/ssh_host_[rsa/dsa]_key.pub
Specific encryption public keys with permissions of 644 to restrict access to root
user and read for other users
ntpdate
Allows you to set the clock against the indicated NTP server
IP forwarding
- The ability for your host to forward packets to another location and respond
- Allows your system to function as a router
- Two methods to enable:
1.echo 1 > /proc/sys/net/ipv4/ip_forward
2.edit /etc/sysctl.conf
and addnet.ipv4.ip_forward=1
- NOTE: Method one is not permanent but will take immediate effect; method two requires a reboot (or combined with method one)
xwinfino
- Displays a plethora of window information on the chosen window on the desktop
- Running the command will present you with a special pointer to choose the window to query for info
What does the command uname -i
do?
Display hardware platform
UID
- User ID
- A numeric ID from 0 to over 4 billion
- Typical user accounts will range from 500 to 65,000
newaliases
- The command that updates the
aliases.db
with the changes in thealiases
file - Errors will display if found; success will return no results
- If you make a change to aliases and do not run this command, it will be logged in
/var/log/messages
that the database is older than thealiases
file
#!/bin/bash
Indicates that this script will execute using the /bin/bash
command as the shell it will run within
getent
Utility to allow you to search both local (/etc/passwd
and /etc/shadow
) for account information as well as network sources (e.g., LDAP)
What sub-command is used to bring changes from a branch into another branch?
git merge
XFS
- Font server for X
* Provides access to fonts for the X server
True or False: The iptables
command manages both IPv4 and IPv6.
False. iptables
specifically manages IPv4 packets, whereas ip6tables
manages IPv6 packets.
lpd
The traditional “line printing daemon,” before CUPS, was the default method to output to a printer/printing device
groupadd
- Much like
useradd
, will add a new group as indicated - NOTE: Does not add users to the group
-
-g [GID]
— Create the group with the indicated GID
etc/nsswitch.conf
- Determines the order that user account information is searched for on a system during login
- For example —
password: files nis shadow: files nis
- Will search for LOCAL files for account information and then search the remote user database configured if not found
mailq
Command that shows the mail queue
Name three commands that can compress a file.
Possible answers:
zip
gzip
bzip
-
tar -zcf
(tar
withgzip
) -
tar -jcf
(tar
withbzip2
)
lprm
- Allows you to remove print jobs
- NOTE: Running the command without a job ID will remove the first job on the queue
-
-P [printer]
— Work with the indicated printer -
-a
— Remove all print jobs in the queue
ping
- Utility to test the response from a particular network address
-
-n [#]
- Ping indicated number of times
alias
Allows you to substitute one command for another or to set a “shortcut” equal to a more complicated command with switches