Linux practice test Questions

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

chmod useful/main options

-c = reports only which files were changed -v = Reports all files -h = changes symbolic links, not the original file -f = Suppresses error messages -R = Operates recursively through directories

which directory is the beginning of the virtual filesystem

/

Which of the following directories has the contents cleared upon system boot?

/tmp

In which directory structure are kernel modules usually found

/usr/lib

unit files are typically located in what directories?

/usr/lib/systemd/system/ /run/systemd/system /etc/ssyemd/system

dd command

A Linux command that can be used to write image files to a device such as a USB flash memory drive or hard disk. often used to "duplicate a drive" if = input file of = output file does not use dashed. options are specified in the format option=value

ASCII (American Standard Code for Information Interchange)

A format for encoding letters, numbers, punctuation, spaces, and other characters into numbers between 0 and 255

During the login process, I am prompted to allow a text message to be sent that contains a pin code. It is a randomly generated number that expires at a preset time. This pin number is an example of?

A one-time password, or OTP

NAT (Network address Translation)

A technique often used to conserve IP addresses by maps devices on a private network to single Internet-connected device that acts on their behalf. opposite of bridged connection

Files that are not meant to be tracked in a Git repository can be excluded by?

Adding the file names to the .gitignore file.

What is an inode

An inode contains information about the file or folder, such as ownership and permissions

What is the name of the process that directs the system to boot from an image file rather than the first bootable media

Boot from an ISO file

BOOT process in 4 easy stages

Boot loader phase Kernel phase early user space init process

Which of the following file systems are 'journaling' file systems?

EXT4, EXT3, XFS

an Extensible Firmware Interface (EFI) system partition uses a filesystem of what type for compatability

FAT

What are the choices for storage controllers in Oracle's VirtualBox virtualization application

IDE. SATA SCSI SAS Floppy USB NVMe

Which of the following are reasons to use configuration management? Select 3

Inventory Management Monitoring Patch Management

disk encryption

LUKS (Linus Unified Key Setup) - disk encryption method commonly used on Linux systems.

What time intervals are represented by the three numbers in the load-average output obtained with the uptime command?

Load average with the uptime command is displayed in 1-, 5-, and 15-minute increments.

What is the default package type used on RedHat-based Linux ditributions

RPM

Red Hat and Debian Interface configuration

Red Hat - /etc/sysconfig/network-scripts directory contains the scripts used to configure and bring up and down teh interfaces on the machine Debian - utilizes /etc/network/interfaces - each interfaces file startes with the keywork iface

user types

Root = super user (user ID 0) Standard = regular or normal users (user ID >100) Service = computer or daemon accounts. never signed into. exist in the /etc/passwd

what are the common Linux signals

SIGHUP (1) - hand up or shut down and restart the process SIGINT (2) interrupt the process SIGKILL (9) kill now SIGTERM (15) gracefully kill SIGTSTP (20) stop the terminal SIGSTOP (23) stop execution

When merging branches using the merge command, which branch is the command run from?

The git merge command is run from the destination branch. The name of the branch that is being merged into the destination branch is provided in the command.

The echo command is used to __.

Write to the standard output

which of the following commands set the SUID permission

chmod u+s file

Which YUM option displays the dependencies for the package specified?

deplist

what are the systemctl shutdown and reboot commands

halt poweroff reboot

What is the purpose of the /etc/hosts file

it provied the IP addresses of the DNS servers that we should use

What is the term for a remote system failing to respond to an inbound network packet

packet drop

whcih of the following commands displays al the routers that a packet travels through to get to the destination

traceroute, mtr, tracepath

3 designations of the job command

+ = indicates current job - = previous / next to last job lack of characters = regular job

Backups over the LAN/WAN

2 methods of securing data from a system to another system SFTP and SCP SFTP is the secure version of teh FT pprotocol. must have the appropriate ports open adn an SFTP server running. after authentication, you can traqsnfer files much as you would on any other FTP server SCP can enable transfers from your system, to your system, from remote systems to each other and more

What is the default port for encrypted web traffic, other wise known as the SSL port?

443

initrd and initramfs

provides a temporary, early use virtual file system that is . initrd is old and initramfs is newer. initrd -represented in /dev/ram - mkinitrd makes an initial RAM disk initramfs - unpacked form a partifular type of archive file (CPIO) - dracut creates a initramfs image for the currently running kernel

unit is defined by what?

.service unit files end in .service

Which of the following represents a hidden filename?

/.hidden.txt This is a hidden file. The slash (/) at the beginning means that this is at the root level of the filesystem.

Which option should be used to send a DNS query for an SPF record with dig?

-t txt SPF (sender policy framework) records are stored in the txt record type in DNS, thereby making -t txt the correct option for this. Of the other answers, only -t mx is valid; it returns the mail exchangers for the given domain.

rmmod commands

-w = wait

You wish to compile a softwarepackage on your system. which of the following must be run first in order to customize the makfile for your system

.configure

What is the name of the process in which a client locates a server over DHCP, in orer to download the boot files over TFTP?

PXE

How to create a new LVM (Logical Volume Mapper)

1. pvcreate command to convert physical devices into physical volumes (PV's) 2. vgcreate command to merge PV's into a single volume group (VG) 3. lvcreate command to create a logical volume (LV) using the space provided form a VG

ISO file

Complete copy (or image) of a storage media device, typically used for optical discs. ISO image files typically have a file extension of .iso.

/etc/fstab

Configuration file containing persistent file system mounts (for mounting on boot)

in networked systems, what is the name for the protocol used to dynamically assign IP addresses to network interfaces?

DHCP (dynamic host configuration protocol)

& or bg

causes command to be placed in background at execution time

which of the following i the equivalent to the command: chmod 644 file.txt

chmod u=rw,go=r file.txt

od command

displays the contents of a file in octal format (numeric base 8 format). -a = named -o = octal -d = decimal -x = heXadecimal -f = floating point

hardware commands you should know

dmidecode - used to display a description of hardware components lshw - also displays hardware components - produces more info

Which of the following can rpm-based systems use for package management?

dnf and yum NOTE** apt is used by dpkg based systems

EXPANDING grep

egrep (grep -E) fgrep (grep -F)

What is the purpose of a ACL

enables you to attach multiple user owners, multiple group owners, and even multiple other owners to a filesystem object or group of objects. view with getfacl command set with setfacl command (-m enables you to modify) masking for an ACL involves restricting permissions for all configured users and groups in the ACL. tis an easy way to make sure that people can read scripts in a directory but not execute them or to ensure that users and groups can view files but not change them. masking = setfacl -m m::rx test

You know tha you downloaded a file called backup.tar.gz this morning but cant remember where you put it. Which is the most appropriate command to use o find the file?

find / -iname backup.tar.gz

command to make filesystem

mkfs - makes filesystem - ex. ext2, ext4, xfs dumpe2fs - this command checks the filesystem parameters

hostnamectl (three different levels)

the hostnamectl shows the user what information it is aware of , and it pulls from systemd-hostnamectl.service pretty - high level hostname can have special characters and is user-friendly kernel or static - this hostname is used to initialize the hostname used by the kernel at boot and is typically not seen or used elsewhere transient - this hostname is typically the one set by DHCP or other IP management schemes

xargs command

takes a list of returned results from another program and parses them one by one for use by a simpler or less-capable command feeds cat a single line at a time until there are no more lines of txt

wget and curl

used to download package from a remote source curl is used to both download and execute a script file curl needs to be used with either -o or --remote-name to download a file like wget does

what are the different linux boot options

vga - enables you to set framebuffer resolution apm - (automated power management) init - causes init to be first process to run panic=#seconds (if panic occurs system waits desired mount of seconds to reboot) single or 1 (skip a full initialization to a default runlevel) 2,3,4,5 (specific runlevel) ro or rw (ro = read only. rw = read write) mem=xxxxM (sets amount of memory)

what command allows a user to display a message on all other users terminal window?

wall command this can be very distracting

what commands find different things

whereis and which = locate commands and info on them *whereis shows more info so it can see files" locate and find = look for files and directories **find is more complex and takes longer*

Who Am I?

who command - tells you who you are and who else is on the system. - also port the user is signed in from - tells when the user signed in whoami - tells the user's current username -w command shows current time, uptime in days and hours, the number of logged-in users, and the system loads for the last 1, 5, and 15 minutes last command - reads the /var/run/wtmp file - shjows who is logged on to the system, from where and how long

what commands allow you to view network traffic

wireshark, tcpdump and tshark

What tha hell is a port?

- its a numeric value assigned to a service. - an IP address is the apartment building but the port is the apartment number. - comes from /etc/services file ports 0 - 1023 are well-known ports and are assigned to common (legacy) ports. ports 1024 - 49151 are registered ports ports 49152 through 65535 are dynamic (private) ports. cant be reversed and are used for any purpose

To change the configuration of the GRUB boot loader, which of the following files would you edit?

/boot/grub2/grub2.cfg

Which of the following files is used to define the filesystems shared by NFS?

/etc/exports

systemd runlevels

0 (poweroff.target) shuts down 1 (rescue.target) 2 (multi-user.target) no network 3 (multi-user.target) with network 4 (multi-user.target) with network 5 (graphical.target) graphical multiuser with network 5 (reboot.target) Command: runlevel#.target will get you there systemctl get-default tells you the systems default run level

which account denotes the nobody account?

99

:; && ||

;: the commands are independently executed and neitehr command fails or succeeds based on the others exit status && casues the second command to be executed if the first command has an exit status of 0 (success). if the first fails the second wont commence || causes the second command to not be attempted if the first command has an exit status of 0 (success). if the first command fails (not zero) then the 2nd command is attempted

You see the word defaults within /etc/fstab. Which options are encompassed within the defaults?

A filesystem with the word defaults for its mount options will be mounted read-write (rw), suid, with the ability to have executables (exec). The filesystem will be auto-mounted (auto), but users will not be able to mount it (nouser). Character and block special devices will be interpreted (dev), and operations on the disk will be performed in an asynchronous manner (async).

SCP (Secure Copy Protocol)

A protocol that uses SSH to securely copy files between a local and a remote host, or between two remote hosts. used to copy between SYSTEMS!!! **rsync does the same but makes it faster and more efficient**

ISO 8859 standard

A series of standards that define standard 8-bit code pages for character encoding

what is Source Format

A set of source files packaged up in an rpm or dpkg file that, when installed, populate a location and can be used to build a package from source

Which of the following services would be run by an authentication server? Select three.

Active Directory, Kerberos, Open LDAP

while familiarizing yourself with a legacyu machine that has been running for a while, you find a file that ends in ks.cfg. what was likely used to install this machine?

Anaconda (old, legacy software)

____ is the default context-based permissions scheme that is used on Debian and SUSE based distributions.

Apparmor

most important components to monitor on Linux operating system

CPU usage Memory Usage Disk I/O - ioping command performs simple latency tessts on a disk Network I/O - IO scheduling (used to access storage space, schedule when something gets written to drive. writting to drive takes a long time) --cfq (each process gets its own timeslice and is more like round robin) stands for completely fair Queuing --Noop (doesnt sort request but just sends to device) --Deadline (FIFO, read and write que)

Cloud-init, Anaconda, Kickstart (virtualization tools)

Cloud- init - initial bootstrap tool that prepares the VM environment for the more feature rich tools Kickstart - used to automate unattended installations of Linux - uses a single file that contains all the configuration and automated responses necessary to perform a hands off installation of linux - requires installaion media, kickstart file (default is anaconda-ks.cfg), boot method kickstart file broken into sections - command - packages (begins with %packages and ends with %end)(groups prefaced with @) - pre and post (%pre and end with %end)

Which of the following key combinations pauses or stops a programs execution and allows you to run job control on it

Ctrl+Z

Which command enables you to view the current IRQ assignments?

Current interrupt (IRQ) assignments are contained in the file /proc/interrupts. Therefore, viewing the contents of the file with a command such as cat will work. There is no view command, thus making answer A incorrect. Likewise, there is no /dev/irq file, making answers C and D incorrect.

Which server type enables you to determine a hostname by translating the hostname to an IP address

DHCP server (dynamic host configuration protocol) this server provides information that is specific to the network on which tyou are located. This includes information like the IP address, gateway IP address, the name server, and the netmask

Different forms of NAT(Network Address Translation)

DNAT - Destination NAT (used to place servers behind firewalls) SNAP (Source Nat) - used when you have an internal network with statically assigned private IP addresses MASQUERADE - used when you have an internal netowrk with dynamically assigned private IP addresses **the componenet of the kernel that performs NAP and IP forwarding is called netfilter**

Virtual Private Network (VPN) Clients

Governs how the client safely authenticates and communicates with the server that grants internal network access IPsec - extension of the Internet Protocol (IP) that helps secure communications across networks via encryption SSL and TLS - Secure Sockets Layer (SSL) and Transport Layer Security (TSL) - security protocol to allow browsers and servers to securely pass information to and from each other. DTLS - Datagram Transport Layer Security (DTLS) - uses User Datagram Protocol (UDP) - sends encryptd data across wide areas - Quicker than TCP (Transmission Control Protocol)

Network Protocols

IP - handles addressing and communication between devices TCP (Transmission Control Protocol) - focuses on the transport of data packages - data packages are reliable because TCP performs error checking to make sure all data packages arrive at the destination. this results in additional overhead. its like sending an email with a read receipt. UDP (User Datagram Protocol) - Also focuses on the transport of data packages. data packages are sent in a connectionless manner. no error checking. like sending regular mail, dont know if its gonna get there and have no receipt. ICMP (Internet Control Message Protocol) - Primary focus is to allow networking devices, such as routers, the capability to send error messages. - provides the capability to perform queries, such as using the ping command to determine weather a remote system is reachable

The ARP table includes which of the following?

IP addresses and MAC addresses

what is network bonding

the process of creating a single interface from multiple network interfaces

What is the purpose of a load balancer?

It is placed in front of servers to allow them to be used together, and provides fault tolerance in the event one of the servers goes offline.

What is the purpose of the umask value?

It is subtracted from the default permissions to determine the initial permissions for newly added file system objects.

What is the purpose of the ssh-copy-id command?

It is used to copy a user's keys over to a remote server, thus "keying" the server.

With no additional arguments, what does the command ps display?

It shows the processes that have the same user ID as my current user ID

Once the following code is run, what will be the contents of the output file? for i in {1..5} do echo $i >> output done

It will contain the numbers 1 2 3 4, and 5 The double >> this means that $i gets appended to the file in each loop.

Which environment variable controls the format of dates and times, such as a 12-hour or 24-hour formatted clock?

LC_TIME The LC_TIME environment variable is used to control the display and behavior of the date and time and can be changed to a different locale in order to achieve the desired display and behavior of date and time formatting.

You're about to call a friend in Thunder Bay, but you dont know what time zone she is in. Which of the following would help you determine what time it is in Thunder Bay?

LC_TIME=America/Thunder_Bay date

printing protocols

LPR - client must speficy host and queue lpr expects printer destination to be labeled with -P lp expects printer destination to be labled with -d lpq queries the print queue lprm removes jobs from print queue RAW - default windows. Common unix Printing System CUPS - cupsaccept reenables the queue - cupsreject stops all jobs sent - cupsenable enables printer itself and not queue - cupsdisable disables actual printer cupsctl manages configuration of CUPS daemon

When using the dm-crypt command, which type of encryption is used by default?

LUKS encryption is the default mode for the dm-crypt command. Other modes include plain, loopaes, and tcrypt.

Which feature could be used to share incoming web requests to multiple servers

Load balancer

When installing a new CUPS print server, you are attempting to access the management console from the server itself, what is the correct URI?

Localhost:631 or 127.0.0.1:631 This is the correct URI, the CUPS interface is on port 631.

what are the 2 partition schemes you can use? most important difference is the partition structure of these two

Master Boot Record (MBR) - disk have up to four primary partitions - if you need more you can extend a partition which can be divided into 4 more partitions called logical partitions (only 1 extended partition per disk) GPT - no limitation of 4 partitions - limitation of 128 partitions folders /usr , /var and /home are likely separate partitions and in turn hold more space view of filesystems that typical users have is called the virtual filesystem. virtual filessytems consists of a collection of real filesystems that are merged tofether via folders called mount points

What has been used to address the limited number of Internet-connetabnle addresses in IPv4?

NAT (Network Address Translation) With NAT, you can connect hundreds of devices to the internet by using a single public IP address

Which server type provides time and date data to a client system

NTP (network time protocol) server

Which of the following describes the difference between NAT and bridging in a virtualization environment?

Network Address Translation (NAT) effectively hides the virtual machine behind the host IP address. Bridging enables the virtual machine to get its own IP and thus have external clients access it as well.

this command changes the priority of a process before it starts

Nice command (can be done in htop)

What is the purpose of the partprobe command?

Once a new partition is created, the partprobe command is used to update the kernel with the new partition information.

By default, on a system that uses a BIOS, how do you access the GRUB boot options menu?

Once the system post has completed, and before the OS loads, hold down the shift key.

OVA/OVF (VM Templates)

Open Virtual Appliance - a bundling of one or more VMs together in an installable/runnable package such as a virtual appliance that may include a VM for NGINX and another for MySQL - an OVA can contain multiple OVFs Open Virtualization Format - compressed pacakge that contains any needed certificates and disk image files.

How are command-line arguments to Bash script files passed into a script file when it is run?

Positional parameters They are passed in as positional parameters via special variables $1, $2, etc

This command changes the priority of a process after it has already started

Renice Command (can be done in htop

rpm and YUM

RPM database located in /var/lib/rpm -common commands are single letters -common operations that use the rpm command installing, upgrading, removing, uninstalling, packages. querying RPM database for information. verifying package fiels, checking installed files -MD5 and PGP are used to check integrity of rpm packages YUM as apt is to dpkg, YUM is to rpm -main conf file is /etc/yum.conf -YUM brings rpm and remote responsibilities together for you and packages them in an interface with far fewer options to remember - normally YUM does not use dashes or double dashes with exceptions like -y -DNF is the next generation of YUM Zypper is used primarily on the openSUSE and SUSE linuc enterprise product lines. lr (list repositories) ar (add repository

Differences between IPv4 and IPv6 (besides the obvious bit length)

Routing in IPv6 is considered more efficient IPv6 has security built in. IPv4 security is implemented as a separate feature and is not as strong as the built-in security of IPv6 with IPv4 addresses are assigned either statically (via a configuration file) or dynamically (via a DHVP server). with IPv6, both of these techniques are available but IPv6 also allows autoconfiguration.

paste and join commands

paste doesnt remove any data from the output but jouin removes redundant key fields from the data

SSH Components

SSH - used for remote shell sessions on another host (replaced telnet, rsh, and rexec commands) scp = used for remote copying operations. replaces rcp sshd = SSH daemon ssh-agent = Runs a wrapper to the user's session and provides authentication when requested ssh-add = loads the user's key(s) into the agent configuration files - /etc/ssh/sshd_config - /etc/ssh/ssh_host_[dr]sa_key - /etc/ssh/ssh_host_[dr]sa_key.pub /etc/nologin

special bit permissions

SUID = set user ID. allows a user to run a program as if he or she were the user owner of the program. in most case the user owner is the root user. the numeric value is 4xxx (xxx are the normal rwx permissions). command chsh SGID = set group ID. automatically gives group ownership of all new files created in the directory to the group owner of the directory. numeric value 2xxx. wall command allows user to display message on all other users terminal window Sticky bit = keeps nonowners from deleting files in a common directory. numeric value is 1xxx. a "t" at the end indicates a sticky bit

Which runlevel is typically used for single user mode, as indicated in /etc/inittab?

Single-user mode is typically runlevel 1. In runlevel 1, no network services are started. Runlevel 2 has networking but typically not services. Runlevel 5 is full multiuser with networking, and runlevel 6 is reboot.

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

Standard LDAP traffic is TCP port 389 on the server. TCP port 25 is SMTP, 443 is HTTPS, and 143 is IMAP.

Accessibility options for Linux

Sticky/Repeat Keys -were created to help users (like those with cerebral palsy, multiple sclerosis, or Parkinson's) who have trouble holding down multiple keys at the same time -instead of pressing Ctrl+C, allows user to press CTRL then C Slow/Bounce/Toggle Keys - for people with heavy hands (has to hold key down for a short period of time - bounce helps shaky hands and people who hit keys repeatedly it will only register once - toggle provides sound when modifier keys are pressed Mouse Keys - can move curse by using keys on the keyboard High Contrast/Large Print Desktop themes Screen Reader -verbalizes text Braille Display Screen Magnifier Onscreen Keyboard

On which protocol and port are zone transfer requests sent?

TCP/53 DNS typically uses UDP port 53 except for zone transfers, in which case TCP port 53 is used due to the size of the request for most zones.

Which option to the rsync command examines only the file size as a means of determining whether the file should be synchronized?

The --size-only option examines whether the files being synchronized are the same size. This can be helpful for situations where there may be significant time skew or other issues preventing the normal differencing mechanisms from working properly. The other options shown are not valid for rsync.

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 xfs_metadump displays a progress indicator?

The -g option displays the progress of the dump. The other options listed do not exist for systemctl.

Which option to the tar command preserves permissions?

The -p option preserves permissions. The -x option extracts while -z unzips with gzip. The -v option is verbose.

What is a TCP Wrapper

The TCP Wrappers package provides a program known as tcpd. Instead of having inetd call a server directly, inetd calls tcpd, which does two things: It checks whether a client is authorized to access the server, and if the client has this authorization, tcpd calls the server program.

Which type can be used with the dig command to test a zone transfer?

The axfr type can be used with dig to request a zone transfer. The client from which you request the zone transfer will need to be authorized to initiate a transfer.

Which systemd target can be used as an alternative to rescue mode when recovery is not possible in rescue mode?

The emergency target can be used in situations where rescue mode cannot recover the system. The other targets are not valid.

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 requires an additional argument. The let and def commands are not valid.

Which of the following commands will set the environment variable JAVA_PATH equal to /home/user/java2 when using the bash shell?

The export command is used for this purpose and accepts a name=value pair, as shown in the answer. The other commands are not valid, with the exception of the echo command, which will simply echo the argument to the console.

Which statement best describes the following, displayed using the ls -la command? lrwxrwxrwx. 1 root root 35 Jul 8 2014 .fetchmailrc -˃ .configs/fetchmail/.fetchmailrc

The listing shows a symbolic linked file located in the current directory, linked to .configs/fetchmail/.fetchmailrc. The file is owned by the root user and root group and was created on July, 8, 2014.

Which option in dhcpd.conf specifies the maximum amount of time that a client is allowed to have a DHCP lease?

The max-lease-time directive, followed by the number of seconds, specifies the amount of time that a given host can have a lease before it is purged. The other options shown are not valid in a dhcpd.conf configuration file.

What is the purpose of a pseudoterminal?

The pseudoterminal is terminal emulation that is provided to programs. The pseudoterminal provides programs with a terminal. To the program, it appears like it is an actual terminal.

Which of the following is a benefit of infrastructure as code? Select 2

The state of the infrastructure can be checked in to SCM for versioning and tracking. When load exceeds resources, more resources can be deployed from the code base that are the same as the existing resources.

When viewing statistics with vmstat, which statistic represents the time that the CPU spent waiting for I/O?

The wa statistic shows time spent waiting for I/O and can be used to measure or find a bottleneck related to disk. The us statistic is time spent on userspace processes, while sy is time spent on kernel processes. There is no statistic called io within vmstat.

Transport vs Tunnel Mode

These are the two modes of information via Internet Protocol: Transport - used between two endpoints encrypted with the proper header before being sent. across the public internet, and they are decrypted on the other side when received Tunnel mode - reflects the ingress and egress security points of a tunnel, or an encrypted channel that is built between two security devices. all traffic is sent down that encrypted tunnel rather than being set lose to make its way across the public internet at will - basically tunneling is more secure

What is a whois lookup?

This is a search for the IANA registration for a domain, it provides contact information for the domain administrator

Viewing the Default Gateway

To view the default gateway configured on the machine, you can use the route or netstat -r command syntax for route command is: route add/del default gw 10.0.0.1 local name configuration - /etc/hosts - /etc/resolv.conf - etc/nsswitch.conf

Your company has determined that they are going to implement a VPN solution. The VPN must provide complete end-to-end encryption, which includes encrypting the IP header. Which VPN mode should you implement?

Tunnel mode In this mode, both the data and the headers are encrypted. This satisfies the requirements.

Thin vs thick provisioning (virtualization storage)

VMS require storage Thin - virtual disk size declared during set up - not all allocated or marked as in use. only what is needed is marked as "in use" - more space allocated in an as needed basis thick - marking as being "in use" the ull amoutn of space

Environment Variables and Settings

Variables are used to store information for the shell or program that is running Local Variables - only available to the current bash shell - not provided to new shell processes - to create use = sign Environment (global) variables - provided to new shell processes - benefit is that variables can be created in the shell and then used to modify the behavior of another process how to convert local variables to environment variables - make variable then use export command ($ b=50 .... $ export b) - or just directly with export command ($ export b=50)

virtualization / containerization

Virtualization is a technology that allows a host operating system to run a separate instance of an operating system in an isolated wrapper that lets it impersonate a real machine. used by VMware, Parellels, KVM, and XEN containerization is application level virtualization. virtualizes only enough of the operating system to properly support the application or applications being virtualized. docker is the predominant method used today hypervisor - separates a host operating system from a virtual machine. used to create, destroy and manage virtual machines

Within which directory will you find files related to the time zone for various regions?

Within the /usr/share/zoneinfo hierarchy, you will find information on the various regions and time zones available. The files within this hierarchy can be symlinked to /etc/localtime.

ps command switches to know

a - all processes u - user info x - processes without a controlling tty -ef

what are the states of a systemd unit/service

enabled disabled active inactive stopped enabled and disabled are not stop and active. enabled and disabled just creates the appropriate links so that it can be used properly or removes the links so that its not restarted when the target is specified

Which of the following commands displays non-persistent storage usage?

free

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

function sayHello() { echo "hello"; }

Remote Desktop

idea is to be able to have a desktop that is running on one system displayed on another system protocol found on port 3389 VNC XRDP NX Spice

Viewing IP information in Linux

ifconfig - primary tool - shows all active interfaces and loopback interface displays eth0 which is ether. this ishardware address whic his known as MAC (media access control) - shows inet (address for interface) - shows broadcast address - and shows network mask ip command - can display network config data. - replaces many commands - ip addr show = displays alot like ifconfig

/etc/group GIDs and others

important GID's 0 = root group 1 = bin group 100 = user group UPG (user private group is a security feature) group entries in /etc/group consist of the following fields user:X:100:example,example2 user is name of group, x is hidden password (passwords kept in etc/gshadow), 100 is the GID, last are the users separated by commas newgrp command temporarily changes his or her primary group gpasswd will assign password to a group

The temporary file system that is loaded at boot is called?

initrd or initial ramdisk / initial file system

Line by line of a bash script

line 1: shebang #! (tells what script to interpreted by) line 2: comments, which begin with #, are used to help humans understand the program. computers ignore the # and everything after it on that line line 3: $1 is the first argument passed to the script on the command line. This line copies the specified file to the destination directory line 4: Runs another script to restart the service Line 5: sends an email

You are working with a legacy CentOS 5 system and need to re-create the initial RAM disk. Which of the following commands is used for this purpose?

mkinitrd The mkinitrd command is used on older systems to create the initial RAM disk. The initial RAM disk is used to load, some might say preload, essential modules for things like disks and other vital components needed for booting.

Fill in the blank. ___ is a command the runs traceroute every few seconds, to give an updated trace to a given target.

mtr mtr is a conbination of ping and traceroute, and updates the ping for each hop every few seconds.

Which of the following commands shows the current default route without performing DNS lookups on the IP address(es) involved?

netstat -rn The netstat command can be used for this purpose, and the -r option displays the current routes. The addition of -n prevents DNS lookups, which can help with performance.

what command is designed to be used in front of a command that you want to continue running even after the controlling tty or console has been exited

nohup

what does the file command do

running the file command against a known binary shows various elements about the architecture and layout of the file. running the file commands against a directory full of files is useful for viewing the possible types

You are watching another administrator perform some work on a server. As part of that work, the admin uses the following command: . variables.sh Which of the following is the equivalent of . variables.sh?

source variables.sh The source command is the functional equivalent of a single dot (.).

2 logging systems on Linux

syslog - can be logged form within an application by using the syslog library call, from teh command line by using the logger command, remotely by connecting to and sending log entries to syslog server on the network - syslogd handles the logging of messages (ignores hash symbols) - klogd listens for kernel messages - rsyslogd is a rocktfast syslog daemon journald (systemd journal) - logs to a binary file and annotates each log entry with metadata rather than using a text formal -- logging is the same no matter what system due to this -- you have access to more metadata -stored under /var/log/journal -e = end of log -r = log in reverse order -f = FOLLOW real time logs -u = restricts to logs in systemd unit -o verbose = verbose mode - configured in /etc/systemd/journald.conf -logrotate = rotate log packages to not make one full

systemd wants and requires

systemd procedure uses a set of options or requirements called "wants" and "Requires" requirements = before a target can be processed, all proceses must be started. only after the requirements are met do the wants kick in sort of like needs (requirements) and wants

core components of systemd daemon

systemd: the systems and services manager for the operating system systemctl: the systemd state inspection and state-controlling utility systemd-analyze: the utility that allows you to inspect performance statistics regarding system bootup as well as view trace and current state information ** systemd daemon is most likely using a symlink from /sbin/init

What type of access does the execute permissions for directories provide

the ability to change into a directory

getent command

this command gets entries in a number of important text files called databases. This includes the passwd and group databases which store user information making it a common way to look up a users details. searches both local and network sources for account information syntax is getent passwd ross

SElinux Contexts

use ps -Z to see security context restorecon resets the default security context

absolute vs relative

absolute pathname /home/sarah/command relative pathname ./command can just edit the ~/.bash_profile to edit PATH variable as well

ways to deny hosts

firewalls TCP wrappers Plugable authentication modules individual service configurations

When testing an exclude pattern for a .gitignore file, which git command and option can be used to see the results of what will be ignored?

git ls-files -i --exclude-standard The ls-files command will be used for this purpose, and -i or --ignored will be used, along with a required exclusion pattern, thus making option A correct. Option B is missing the required exclusion pattern.

Dynamic Rule sets for firewalls

goal of these is to recognize when a system is under attack and create rules to block the hacking attempt fail2ban - daemon that scans specific log files, searching for IP addresses of systems that attempt to breach the system with repeated connection attempts. - have to install with yum or get-apt DenyHosts - designated specially to protect SSH servers - doesnt create iptables rules but rather TCP wrapper rules IPset - creates sets of IP addresses and then use those sets to apply rules to a collection of ssytems

what are the main options for the find command?

group = newer = search for files newer than specified file name = iname = non case sensitive name search user = mtime = searches modify time atime = searches for number of days since last accessed ctime = change. searches for number of days since last changed -exec option = accepts every line returned to standard output, one by one, and inserts the full path and filename between the curly brackets

name of configuration file for GRUB2

grub.cfg located in /boot/grub2/grub.cfg (/etc/grub2.cfg is a symbolic link to the above grub.cfg file) generated by the grub-mkconfig partitions start with numeral 1 and devices start with 0

Which tool can be used to measure the memory usage of individual processes in order to aid in capacity planning?

ps The ps command provides information on processor and memory usage for individual processes. You can use this information to predict capacity.

Which of the following will execute a bash script called test.sh even if the execute bit is not set?

.bash test.sh By invoking a shell specifically for the commands in the script, you can execute the contents of the script

authentication servers

a system that is used to authenticate user accounts on client systems. several of these available on Linux include: Radius (remote authentication dial in user) Ipa (identity policy audit) - LDAP (lighweight directoy access protocol) which stores and retrieves account data. provides user account info - kerberos - NTP - DNS - CA

CPU load average (CPU monitoring)

means that if the CPU is up for one hour and has a load average of .50 it was only used 50% of that time. If load average is 1.50 it is used too much load average cane be seen in /proc/cpuinfo in great detail iostat -c (CPU) command shows details CPU monitoring info as well. add a 1 3 behind the -c and it will show statistical info once every 3 seconds (or any variable you choose) sar command provides same info as iostat but it displays info as it occurs over time (usually 10 min)

what is the purpose of the ldd command

prints the shared objects (shared libraries) required by each program or shared object specified on the command line

snapshots, clones and images

snapshots -used primarily with a virtual machine, where the initial state of the VM is the baseline. snapshot is an incremental backup of what's changed with the VM clone - a full backup of the VM image - is effectively a clone that occupies a single file - used to build a VM as well

different styles of booting

booting via PXE (from server) booting via NFS booting via ISO (disk image, CD/DVD) booting via FTP/HTTP (from server)

Disk Partitioning Tools

fdisk - limited to MBR based partitions - changes are not written to disk until you tell it to save parted - used for GPT and MBR partitions - MBR limit 2TB partition size - no checksums - doesnt set the filesystem type mkpart - create a partition command

cpio command

has 3 options for acting on files and filesystems -o or -create = copyes files to an archive, using a list of files typically created by the found command -i or -extract = This copies files into the filesystem from an archive or a list of the archive contents -p or --pass-through = this copies files from one directory tree to another without the use of an archive, essentially performing the same function as the cp -r comand

Which of the following syslog facilities captures messages from the lp printing facility?

lpr The lpr syslog facility sends messages from the lp subsystem to syslog. The auth facility is used for security-related messages. The other listed options are not syslog facilities (.root , .messages)

Viewing partitions and filesystems device file information

lsblk command will show you which device files are available - another way to see available files is in /sys/block blkid - can see labels and UUID's

groupadd useradd options

useradd -m -d = putting in a specified home directory -D = defaults defined in /etc/default/useradd -e = expiration date -G = secondary group -f = # of days after passwd reach max life -o = create with unique UID -s = full path and filename must be followed by this groupadd -

modifying

usermod -L = locks account -c = describes user -d = changes user home directory -e = changes the date -f = changes number of inactive days -g = primary group -G = secondary group -s = path to shell -u = user ID -U = unlock user account userdel -r delets users mail file groupdel

Additional LVM commands

vgremove - deletes a VG vgreduce - deletes a PV fro ma VG vgextend - adds a PV to an existing VG vgdisplay - Displays information about a VG pvdisplay - displays informatoin boaut a PV lvdisplay - Dipslays informaion about an LV lvextend - extends the sice of an LV resize2fs - Resizes the underlying ext2, ext3, or ext4 filesystem

Manually mounting filesystem

- if a filesystem isnt configured in the /etc/fstab file, it can be mounted manually by using the syntax : mount -t type -o option device mountpoint important mount command options -a = mounts all files listed in /etc/fstab -r = Mounts the filesystem read only -w = Mounts the filesystem in write mode -L = mounts a filesystem with a given label unmounting filesystems - umount - doesnt let you unmount any device that is currently in use - if you dont know who is using the file you can utilize the fuser command -m = denotes a mounted filesystem and returns a list of all processes with open files on that device

what are some main options of rsync?

--progress --delete

main options for mv (move command)

-i = checks the target to see if it exists and then asks if you want to overwrite -u = preserves the latest copy of an object NO -r option

The filesystem table

/etc/fstab It is a configuration file that defines the parameters needed to mount each filesystem. - an administrator can mount a file system manually, but having the mount described in /etc/fstab file allows for automatic mounting during boot process - if you provide only the mount point or device name, the etc/fstab file is consulted to determine the rest of the information, including mount options - filesystems are defined in the /etc/fstab file, one filesystem per line - any filesystem is automatically stored in the /etc/mtab file -etc/cripttab is used to describe the encrypted filesystems that are decrypted during the boot process

A systems administrator wants to load custom modules. Which of the following directories is most appropriate to keep load module settings persistent?

/etc/modprobe.d

what directories DEFINE groups and users (but no more information... etc. passwords)

/etc/passwd = user info /etc/group = group info

the encrypted passwords for users onthe system are located in what file?

/etc/shadow

Within which directory should you place files in order for the files to be copied to a user's home directory when the user is created?

/etc/skel The /etc/skel directory contains files that are automatically copied to a user's home directory when that user is created.

what headers of libraries does the ldconfig program read?

/lib /user/lib any directories noted in the /etc/Id.so.conf file idconfig then makes the proper links to the libraries

Which of the following are pseudo file systems?

/proc , /sys not /boot or /etc

Which of the following are 'pseudo' file systems?

/proc and /sys

In which directory are time zone files found?

/usr/share/zoneinfo

/etc/passwd important system accounts

0 = root user 1 = bin user (responsible for some system binaries and nonlogin accounts) 48 = the apache user; the HTTPD daemon runs as apache 99 = the nobody account. used for anonymous access on FTP and HTTP servers

AppArmor

A Linux kernel module and related software packages that prevent malicious software from accessing system resources. Provides a context based permission model. aa-disable = disable a profile for a specific profile aa-status = view status of profile aa-complain = used to troubleshoot a file aa-unconfined = list processes that arent restricted by AppArmor /etc/apparmor.d = location of the definitions of the AppArmor profile /etc/apparmor.d/tunables = holds fiels that can be used to fine-tune the behavior of AppArmor

dev/tty

A device file that is associated with the computer's controlling terminal or the shell's window. its purpose is to give you a device that will always be connected to the controlling terminal or, to be clear, the terminal that is being used to launch a given program

A newly added SATA disk is not showing up during the boot process. Where can you check to begin troubleshooting this issue?

A logical location to begin troubleshooting is within the system BIOS or firmware to ensure that the drive is being detected by the computer.

What is the purpose of single user mode?

It allows passwordless access as the root user so that emergency maintenance can be performed on the system. Single user mode, or rescue mode, allows access as the root user for the purpose of maintenance such as resetting the root user's password.

What is contained in the /etc/fstab file

It contains the list of mount points and their locations and is used as a reference for automounting file systems

Which server type allows for management of network devices

SNMP server (simple network management protocol) allows for the management of network devices. also provides features to monitor network devices. used to control network equipment, such as routers, wireless access points (WAPs) and switches

Terminals PTY/TTY

TTY (teletypes) -refers to the subsystem that underlies all terminal (command line) access to a system. console, terminl and command line are all references to the tty - provides direct access from a keyboard and screen to the shell running physically on the system, also known as a console PTY (pseudo TTY) - terminal access by a terminal application - uses PTY to behave liek a real tty or from a remote system via SSH protocol Alt + F1 through Alth+F12/F13 used to jump between terminals /dev/securetty - controls what terminals the root use can access

logrotate command

The command used to rotate log files; it typically uses the configuration information stored in /etc/logrotate.conf. weekly rotate 4 = rotates a log 4 times before deletion missigok = prevents error from going off is log missing notifempty = prevents rotating empty logs sharedscripts = if wildward matches runs any script delaycompress = prevents file from being compressed until rotated postrotate = run the commands that follow up until the endscript keyword after the logs are rotated

VM vs Container

VM is making many or multiple machines (virtually) -isolation of machine Containers create many processes to isolate. appearing to each container that they have their own operating system (they dont know each other). - isolation of process

What is an OVA file

Virtualization appliance fall

Linux GUI's (Graphical user Interfaces

X Window System - set of software that provides the basis for a graphical user interface - provides basic features - does not provide desktop features - does not provide a means to log into system graphically - provides means to interface with hardware such as mouse, video card and monitor - newer solution is Wayland (provides a more simple structure than X) Desktop environment - KDE Plasma (first) (openSUSE and Kubuntu) - Gnome (Fedora and Debian) - Cinnamon (Linux Mint) - Mate (Manjaro Linux and Linux Mint) - Unity (Previous Ubuntu versions)

Filter commands

a filter is a command that accepts stdin as input and perfoms an action, alteration, or other process on the input, producing stdout and (if necessary) stderr sort nl (numbering lines) cut (cutting columns) (ex, cut columns 1-5 in a text file and display on screen) awk (select some lines of text and drop the rest)(similar to grep) tr (translating files. changes characters, not whole works like sed)

any file that begins with "vml" is what?

a kernel file 2 versions of kernel - vmlinuz (compresses which handles larger kernel files) - vmlinux

what is a firewall

a network appliance that is designed to either allow or block network traffic. firewalls can be implemented on a variety of devices, including routers, network servers and users' systems iptables is a firewall that is availabel by default on most Linux distributions. stateless - a rule that doesnt depend on any established connection (state) stateful - a rule that means "if any network packet is responding to a request that the local machine initiated, let it through the firewall".

when you run the jobs command, your output shows a + symbol next to one of the jobs in the list. What does the + symbol indicate

a process that is the most recently acted upon. indicates the current job

your printer names example, had an error printing a document, and not CUPS has stopped the printer. How do you get jobs printing again?

cupsenable example

Which of the following configuration lines in /etc/nsswitch.conf causes a lookup for group information to first use local files and then use LDAP?

database: databasename is the proper syntax with additional databases separated by a space So the answer is group: files ldap

Which of the following commands can be used to set the system date?

date timedatectl

\. displays what?

displays a space in a filename, the system shows a space prefixed with a backslash

Memory Monitoring and Configuration

free command - provides a summary of virtual memory (RAM and SWAP space info - comes from /proc/memino vmstat - provides more detail than the free command -displays buffer cache output - comes from /proc/meminfo OOM (Out Of Memory Killer) - kills processes to free up memory - search /var/log/messages or /var/log/kern.log to find evidence the OOM has done damage Swap Space - make sure you have swap space configured and ready to monitor memory and how it is being used. - swapon is temorary, have to add an entry to /etc/fstab to make it permanent - swapon -s you can see the name of the device that holds swap file system

filesystem checkers

fsck - used but have to specify system. ** fsck does not wok on XFS file system. have to use xfs_repair** **only run fsck on unmounted or read only mounted file systems. This is mandatory, otherwise fsck might perform an operation on a file a user has open, causing corruption** e2fsck - shortcut for checking the ext filesystems dosfsck - Used for all varieties of the DOS/FAT filesystem reiserfsck - Used for the ReiserFS filessytem tune2fs - used to set parameters after a filesystem has been created - can set the mount count through this command - continue XFS commands - xfs_info provides the same detail the dumpe2fs command provides - xfs_check to look for problems - xfs_repair to fix problems - xfs_metadump to call vendor for support (puts bug information in file and sends to vendor) - xfs_growfs - grows the filesystem - xfs_fsr - supports online defragmentation

Which command is used to remove unused filesystem blocks from thinly provisioned storage?

fstrim The fstrim command is used to remove blocks that are not in use. The fstrim command is frequently used in a SAN configuration to give back unused storage to the SAN. The fstrim command can also be used with solid-state drives for the same purpose.

Which git clone command will clone a repository called portalutils into a directory called utils?

git clone ssh://sourcehost:/portalutils utils

What command is used to create a clean Git repository in a directory?

git init This is the command used to start a new local repository.

Space utilization

iostat command - provides input/output statistics on devices including partitions. du command - to see the space used by a set of files or a file tree utilize the du command df command - unlike du, operates on filesystems rather than files and directories - displays used and available disk space for all mounted filesystems, on a per-filesystem basis - only works on mounted filesystems

Which of the following are firewall configuration tools?

iptables firewalld UFW

rsync and its options

is like the cp command on rockets -main attraction is its ability to just copy the needed bits of files and directory structures via delta transfer. - a delta transfer allots you to easily mirror even large, complex, and ever-changing data sets in a time-efficient manner on the same system, across systems on your local network, and even across the world between systems -r = Replicates RECURSIVELY (everything below a given points) -l = follows links to destinations -p = Preserves permissions -t = Preserves modify times -g = Preserves group ownership -o = preserves ownership -D = copies block device content

additional daemons and libraries that make up the core functionality of systemd

journald: default logging system consoled: console daemon for use as a user console networkd: the daemon that provides networking support for systemd's network access logind: a daemon desiged to replace Consolekit, which supports X display managers, user logins and so on

A datacenter administrator assigns a ticket to a junior Linux administrator regarding a Linux server that is presenting issues with excessive CPU consumption and causing instability in a specific application. The junior Linux administrator troubleshoots the Linux server and finds several zombie processes running on it. Which of the following commands would effectively fix the issue?

kill -s SIGCHLD pid

Network Utility tools and commands

nmcli - provides a command line interface to NetworkManager, allowing you to view information abotu NetworkManager and change its behavior ethtool command - display and configure network device settings, such as transmission speed and duplex value ss command - used to display socket information - list all open sockets if no arguments in command ifconfig - primarily used to view or set the IP addresses for a host Route - adds default gateways - can also be used in defending system form attacks in progress dhcpch, dhclient, pump - help configure client IP address - dhclient and pump gets DHCP lease **host, getent and dig** - used for name lookups or troubleshooting of hostnames or fully qualified domains - host performs DNS lookup - geten determines search order - dig only performs DNS queries brctl Command - used to create, modify, or view anEthernet bridge? iwconfig command - can change wireless network settings wit the iwconfig command

do kill and killall commands remove the process?

no they just send signals to the process, they dont actually removve it

Enumerating your peripherals

to uniquely identify hardware, the CPU needs to be able to address the peripheral through one of more of several means - I/O ports = an address, or range of addresses, identifying the device - IRQ = Interrupt Request (IRQs) signal the processor that an event has happened and that the CPU is requested to come check on the resource, which is a limited resource that can sometimes be shared - DMA = Direct Memory Access (DMA) allows a peripheral to access system memory directly rahtr than having the CPU intervene /proc vies the current hardware list

additional network troubleshooting tools

traceroute - see gateways that network packet passes through mtr - MORE traceroute - sends a traceroute command every second tracepath - similar to trace but does not require superuser privileges and hs no fancy options tcpdump - a "packet sniffer" that allows you to view LOCAL network traffic wireshark - can view network traffic and troubeshoot network issues arp - command to view arp tables or make changes to it. - ARP is the storage place for MAC address and corresponding IP address nmap - used to probe a remote system to determine which network ports are reachable form the local system - used to determine what service are available on a remote system - sest security features on a remote system such as TCP wrappers - verifies effectiveness of network firewall - is a port scanning tool nc or netcat command - used for anything involving TCP and UDP - open TCP connections, send UDP packets, list on arbitrary TCP and UDP ports, port scan whois - determines which company or person owns a domain iftop - displays network connections that are using the most badnwidth iperf - provides a means to creat tests of the throughput between two sistems ipset - creates sets of IP addresses and then uses these sets to apply rules to a collection of systems

Internationalization and Localization

two concepts that allow a computer to store information one way but display it in a way that suits the conventions of the user localization is a process that bundles up all the regional changes for a single location into a locale

syslog facilities and severities

-Facilities- kern user mail daemon (other system daemons) auth (security logs) syslog (internal msgs for syslog) lpr (printing messages) cron authpriv (security jobs local0-7 -severities- 0 emerg (system unusable) 1 alert (immediate action) 2 crit 3 err 4 warn/warning (something happend that may be wrong) 5 notice (not an err but special handling) 6 info (just info) 7 debug (doesnt get logged by default

in depth file system hierarchy

/bin Essential command binaries /boot Static files of the boot loader /dev Device files /etc Host−specific system configuration /lib Essential shared libraries and kernel modules /media Mount point for removeable media /mnt Mount point for mounting a filesystem temporarily /opt Add−on application software packages /sbin Essential system binaries /srv Data for services provided by this system /tmp Temporary files /usr Secondary hierarchy /var Variable data

special login files

/bin/false = user cant login if sent here /sbin/nologin = displays account is unavailable /etc/nologin.txt = file exists, the contents of that file are shown instead of the standard message /etc/motd = after successful login this files contents are displayed right before the user's shell is executed. great place for warning or legal messages .hushlogin = if created in the users home directory, changes the login process so it does not perform a mail check and does not display the last login information or the message of the day to the user /etc/login.defs = defines defaults for user .etc.securetty = specifies from where the root user is allowed to login /etc/esertty = used to set the parameters for login locations, days, times and systems the user can connect from. used only on systems that dont have PAMs

where are default permissions governed?

/etc/bashrc ~/.bashrc defalut permissions are as follows: -for files = rw-rw-rw- (666) -for directories = rwxrwxrwx (777) the value of default permissions is called umask value. this can be changed with command umask. when you set mask you are essentially taking away permission. so if permissions are 0777 and you add umask 0022, the new permissions are 0755.

When partitioning a disk for a mail server running postfix, which partition/mounted directory should be the largest in order to allow for mail storage?

/var The partition containing /var should be the largest for a mail server because mail spools are stored within this hierarchy. The /etc/ hierarchy is usually small, as is /usr/bin. The /mail directory does not exist by default.

In the following code example what will be the output? i=1 while [ $i -lt 5 ] do echo $i i=$[ $i + 1 ] done

1 2 3 4 The evaluation expression indicates to print each i that is less than (-lt) 5.

what must a system admin do before a user can use a disk to store their information?

1. install the device 2. partition the device 3. make a filesystem on the partitions 4. make or choose a mount point (directory) 5. mount the filesystem, 6. configure the filesystem to be mounted on boot 7. set the permissions Linux devices are associated with a device filr in the /dev directory

common ports to know

20 and 21 = FTP 22 = SSH 23 = Telnet 25 = SMTP 53 = DNS 80 = HTTP 110 = POP3 123 = NTP 139 = NetBIOS 143 = IMAP 161 and 162 = SNMP 389 = LDAP 443 = HTTPS 465 = SMTPS 514 = SMTPS 636 = LDAPS 993 IMAPS 995 = POP3S **you can look up port numbers in the /etc/services file**

Key Network troubleshooting concepts

Latency - delays in communication. ping and traceroute can help with that Bandwidth - maximum amount of data that can travel through a media. netstat command can determine that Throughput - amount of data that passes through media Routing - process of sending network data from one Internet Protocol network to another via a gateway Saturation - this is when throughput is often (or constantly) reaching the value of the bandwidth Packet drop - occurs when a remote system doesn't respond to an inbound network packet Timeout - software component that is used to determine whether a packet drop has occurred Name Resolution - involves translating a hostname into an IP address. dig, host and nslookup useful for this Localhost vs. Unix socket - refers to a system communicating via a special localized network interface Interface configurations - with an interface configuration, netowrk settings such as IP address, netmask, and router information are assigned to a network interface. ip and route are commands to use

Which option to ping enables the bypass of the routing tables?

The -r option bypasses the routing tables and enables sending packets directly using an interface. The -A option is adaptive ping, while -b enables sending pings to a broadcast address. The -q option is quiet output.

Which option to journalctl displays the output in reverse, with newest entries first?

The -r option reverses the journal, displaying the newest entries first. The -n option shows the most recent N events, -f is follow, and -b tells journalctl to show a message from a specific boot ID.

A junior administrator in your organization has written a Bash script named logparse.sh, and has saved the file on the system. The junior admin is not able to remember where the file was saved, and is now concerned that there might be an issue with the disks as the result of running locate logparse.sh is empty. What is the most likely solution to the issue?

The command updatedb needs to be run from an authorized account so that the new file is entered into the locate database. This is the most likely fix since the file was just added to the system and would not be tracked until updatedb was run.

Pluggable Authentication Modules (PAM)

The component that handles authentication requests by daemons on a Linux system. contained in /etc/pam.conf file and /etc/pam.d directory syntax service type control module-path module-arguments service = name of application or service being affected. type = account, auth, password and session options control = governs what happens if a module cant successfully establish. option include required )denies access if auth fails), requisite (defers access back to application) sufficient (can fail while allowing authentication to still occur), optional (doesnt negatively affect authentication if it fails). pam_tally2 = ensures brut force attacks fail faillock = allows the operator to query, display, and make changes to the failed attempts that the pam_faillock.so module keeps in per-user.

Which of the following commands helps you to determine information about a given window within an X session, including information on the window size and its position?

The xwininfo command displays information about a given window within an X session. The other commands listed for this answer are not valid for systemctl.

what are the advantages and disadvantages of installing programs via source code

advantages -allows inspection of code for flaws, bugs, and security issues - its available earlier than binary packages - compiling optimizes the resulting program for he current system - it feeds that cutting-edge need disadvantages -requires complex installation - dependencies might not exist - often poorly documented - uninstalling can be difficult

Which command will search for a package named zsh on a Debian system?

apt-cache search zsh The apt-cache command is used to work with the package cache, and the search option is used to search the cache for the supplied argument, in this case zsh. The apt-get command is used to work with packages themselves, while the apt-search command does not exist for systemctl.

0 10 12 * * /usr/local/bin/backup.sh that means what?

backup.sh will run at 10 a.m. on the 12th day of every month bonus * */2 * * 1 /usr/local/bin/ping.sh this means: ping.sh will run every two hours on Mondays

Which of the following utilities can be used to print the contents of a file to the screen?

cat less more

Time commands

date command - shows current date and time - % coding's have special meaning - %Y four digit year - %m two digit month - %d two digit day - %H two digit hour in 24 hour time - %M two digit minute - %z Time zone offset (run man date command to get a full list of encodings) hwclock - hardware clock (real-time clock) timedatectl - used to view and change both the date and the time zone on the system - can also be used to modify the system clock, the RTC (hardware clock) and the time time zone setting

blocks and buffers

keys to running of processes and the speed of processes on a system disks are block devices. have an addressable unit called a block. *blocks are data locations on disks* when a disk block is read into system memory, its stored in a buffer. a buffer is associated with one block only **blocks are read into buffers when a file or set of files is requested from a disk, and then when those buffers are read into a page in memory, that page is a part of a slab or a set of slabs that make up a cache**

killall vvs pkill

killall - uses process command name pkill - can use process name, process id, username, process or session ID, terminal use pgrep to test the command before pulling the trigger

lsof

list open files

What command would be used to determine if a file is immutable?

lsattr Yes, the lsattr command can be used to list the attributes of a file and show if the file is immutable.

Network Bonding per the Book

purpose of bonding is to have the system treat multiple network interfaces as if they were a single network interface. provides much greater bandwidth than a ingle network interface can manage Aggregation - core concept of bonding to put two or more networks into a single cluster is aggregation Active / Passive - 2 modes of network bonding - active backup- one device is actiave and the other devices are backups load balancing - allows a system to share the traffic between different network devices based on some criteria - bonding modes effect load balancing bonding modes after load balancing mode=0 (round robin) mode=1 (active/passive) mode=2 (XOR) mode=3 (Broadcast) mode=4 (802) mode=5 (adaptive transmit) mode=6 (adaptive. same as 5 but also performs MAC)

A Linux administrator issues the following command with root or sudo privileges:rpm -i installpackage.rpmOnce the command is issued, the console outputs the following error message: failed dependency. The administrator confirmed in a previous step that all dependencies have already been installed. Which of the following commands should the administrator issue to bypass this error message?

rpm -i installpackage.rpm --nodeps

Tar options

-Choose one of these c= create an archive t = TELLS contents of archive x = eXtracts files from an archive -Then choose one of these v = VERBOSE, give a list of files as they process j or z = conpress or decompress bzip of gzip then put this and filename f = name of FILE to operate extras you can add -b = sets the BLOCK -M = MULTIPLE archives -g = creates new format incremental backup -l = stays on LOCAL file system -L = sets tape LENGTH --remove-files = removes specified files from the filesystem

In a scripting scenario, you need to prevent sudo from prompting for credentials or for any other reason. Which option to sudo is used to indicate this?

-n The -n option facilitates the scenario described and will exit non-zero rather than prompting. The -i option sets the login name and is not valid for this scenario

Which option to lspci is used to display both numeric codes and device names?

-nn The -nn option displays both numbers and device names, thus making answer C correct. The -n option (answer B) displays only numbers.

main options for grep command

-c = numeric count -C # = matched string with a specified number of lines -H = prints the filename for each match -h = suppresses file name -i = not case sensitive -l = no lines of matching matching output are shown -L = displays filenames that dont match -w = selects only lines that have the strings WHOLE word -r = reads and processes -x = exact line matches -v = shows all the lines in a file that dont match (opposite of default behavior)

passwd options

-d = Disables a user account by removing password -n = minimum password lifetime in days -x = maximum password lifetime in days -w = sets warning number of days -i = sets number of days password can be inactive before it locks -S = SHOWS user password info

what are the options for copy command (cp)

-d = doesnt follow symbolic links, copies a link instead -f = forces overwriting existing file -i = interactively ask before overwriting -l: creates a hard link to source file -r or -R = Recursively traverses directories (copying everything) ***need to put this to copy directories**** -s = creates a symlink -u = updates the copy only when the source is newer than the target or the target doesnt exist -x = doestn travers to filesystems mounted from other devices **rsync does the same but makes it faster and more efficient**

special scripting essentials you didnt know

-double quotation marks ("") and single quotation marks ('')disable special meaning of redirection characters (< > |) and globbing characters (* ? [ ]) within in double quotation marks, variable and command substitution still occur ex: echo "this | hat" will display an output of this | that echo this | that will display an error. -you can also place a \ in front of any metacharacter to make it a plain character for the shell. ex: echo this \| that will display this | that -to display all shell variables, including both environment and local variables, use the set command ex: $set | head -5 will display all kinds of info

When troubleshooting a potential hardware problem, you need to determine which physical interface is being used for a certain address. One way to accomplish this is with the ping command in order to monitor the activity lights on the device. Which of the following options to ping will flood the interface with ECHO_REQUEST packets?

-f The -f option is a flood ping. This will effectively cause the interface to send and receive large amounts of traffic, usually making it easier to find on a switch. The -a option is an audible ping, emitting a sound on ping. The -c option sends a certain count of pings, and there is no -e option.

Which option to the mount command can be used to simulate the mount process without actually mounting the filesystem?

-f The -f option, also known as fake, is helpful for situations where you need to debug the mount process or when you need to add an entry to /etc/mtab for a previously mounted filesystem. The -l option shows labels, and -v is verbose. There is no -q option.

When performing an rsync across devices, you receive errors that file ownership cannot be preserved, likely due to missing users or groups on the destination system. Which option should be removed from the rsync options in order to not preserve user and group ownership?

-go As specified in the question, you need to remove both group and user ownership, therefore both -g and -o are needed. The other options are not valid, although you can remove individual options from an archive process with --no-g and --no-o, which would be equivalent to removing the -g and -o options from the command.

Which option to SSH enables the use of a key for authentication?

-i The -i option for SSH is followed by the private key to use for authentication. Doing so implies that the public key is in the authorized_keys file on the remote host. The -k option disables the sending of GSSAPI credentials, while -f is used to request backgrounding of SSH. There is no --key option.

mkdir and rmdir options

-p is the parent option for both which means to create any subdirectories needed to create that last subdirectory in the case of mkdir. for rmdir, this option removes the tree starting with the last subdirectory all the way back to the top one -f includes the file rm is for files (-f in remove means you dont get prompted)

main options for diff command

-r = recursively down the directory tree to find all the differences -q = quiets or simplifies the output, telling you the differences on a higher level, rather than in lots of gory detail patch = makes the 2nd host file match the first one

What is the result of running the following command localectl list-locales

It will list all of the available languages and encoding settings that are available on the system

Which command is used to parse log-file entries on a sysemd- based system

Journalctl The journalctl command is used to view and parse log file entries on systemd-based systems that maintain logs in a special format. The logger command can be used to create log entries, and the other commands shown do not exist.

What are SHA and MD5 hashes used for, with regards to archives and files?

They are used to ensure that a file has not changed. When the archive is taken, a file hash is calculated and then stored with the archive. This ensures that when the archive is unpacked, the hash can be checked to ensure that the files have not changed.

when issuing the userdel command, what is the function of the -r flag

This will remove the user's home directory in addition to removing the users account

Which boot process is in the most correct order?

UEFI / GRUB2 / Kernel / systemd This is the correct order: UEFI calls the bootloader, which loads the Kernel, which loads systemd as PID 1.

what enables the virtual machine to be a full participant on the same network as the virtualization host?

a bridged network

What are Binary packages

a collection of applications, documents, libraries and configuration files that can be downloaded and run without needing to be compiled form source

what is the term link

a file with its own inode that points to another file statically linked = process of taking code from commong libraries and making it a part of a runnable applicaiton rather than something brought in from a shared library. has the library in each app. means you can have larger files dynamic linking = The process of sharing library code between applications rather than requiring each application to keep a copy of the library. library is outside of each app and the apps both point to the library. result in smaller files

how to run a script

binary application: $ ./test.sh (for this method the script has to have execute permissions) argument to new shell: $ bash test.sh (just saying bash in front) sourcing: source script_name. script_name

Kernel Module's per the book

can be monolithic or micro - monolithic includes all of the kernel code in a single executable program can be loaded by default as a result of how the kernel was compiled. or can be loaded as needed or manually lsmod displays all kernel modules - displays name of module, size and used by dmesg command can display the module being loaded by the kernel - size of dmesg command is limited., cant see what was loaded months ago rmmod removes kernel modules - will fail if kernel has dependencies. doesnt take care f those insmod command will INSERT the module into memory uname determines names of modules to negate using different commands, most administrators utilize the modprobe command to insert and remove modules from memory - using modprobe you dont need to know where module is located (does this by making use of a databse file called modules.dep) - modules.dep can be ran by the command depmod -r option with modprobe will remove module and its depedencies

debian or ubuntu package (dpkg and apt)

can install, remove and query packages with dpkg (local packages). --purge means you purge packet and configurations --remove means you leave configurations dpkg -i installs a local package to install with al its dependencies and even get more packages from online use APT. apt handles searches remote package repositories and downloading packages apt-get install installs a remote package **dont mix up the two!! for example there is no apt-get --install (apt doesnt do the double dashes)

SElinux Booleans

can modify the behavior of a policy by using booleans. a boolean is a true/false value that changes how SElinux performed MAC (mandatory access control) to determine what a boolean is used for, input semanage command getsebool command displays just the current value of a Boolean to set a Boolean as on or off, input command setsebool

A Linux administrator is confirming information on a system. The administrator issues a series of commands and views the following output:search homebizbook.com nameserver 205.70.100.12 nameserver 205.70.100.13Which of the following commands did the administrator issue?

cat /etc/resolv.conf

Which of the following commands will set an account to expire based on the number of days elapsed since January 1, 1970?

chage -E The chage command can be used for this purpose, and the -E option accepts days since 1/1/1970. There is no -e option to passwd, and -l for usermod will not perform the action described. There is no chguser command.

Git - terms to know

cloning in git means to check out a document and make changes. Cloning is checking out a document from a git library -steps include: creating a local repository for the project under the project_name/.git directory in your home directory, creating a directory where you can directly see files (working area), creating a staging area .gitignore will ignore a file git init will cerate

The cron system

cron is the main job scheduler in Linux -crond is the daemon that runs in the background and executes tasks on behalf of all users - jobs are configured through crontab - crontab -e = edit - editor used to make changes to the crontab through the EDITOR environment variable and vi is default. 5 columns to specify when a job is run 1. minute (0-59) 2. hour, in 24 hour time (0-23) 3. Day of month (1-31) 4. Month (1-12) 5. Day of week (0-7, with 0 and 7 being Sunday) If you want to match all values for a column use an asterick. examples below: o 12 *** = the minute is 0, the hour is 12, job set to run at noon 0 0 1 1 * = the minute and hour are both 0, which means midnight, the day of the month and month are both 1, thich is january 1. the job runs are midnight on new years day aliases to commonly used schedules @reboot - run once after reboot @yearly = run once a year at midnight 1 January @anually = same as @yearly @monthly = run at midnight on the first of the month @weekly= Run once a week on Sunday at midnight @daily = Run once a day at midnight @hourly = Run once an hour, on the hour

The SAN has crashed again, and one of the filesystems in a Linux server has become significantly corrupt as a result. Which command and option can be used to attempt to examine the contents of the drive without causing more damage?

debugfs -c

What is the name of the unit to which a systemd system is booted in order to start other levels?

default..target The default.target is the default target unit that is activated by systemd on boot. The default target then starts other services based on the dependencies.

Unicode

defines each possible character as a code point, which is a number UTF-16 a character encoding format that encodes all chracters in a variable width using blocks of 16 bits. That is, characters are either 2 or 4 bytes each UTF-8 a character encoding format what encodes all characters in a variable width using blocks of 8 bits. That is, characters are from 1 to 4 bytes long. UTF-8 is also backward compatible with 8-bit ASCII

user quota system

designed to limit users to a certain amount of disk space per filesystem aquota.user = specifies the binary file that contains user quota info aquota.group = specifies the binary file that contains group quota informations usrquota = specifies the /etc/fstab option for user quotas grpquota = specifies the /etc/fstab option for group quotas quota concepts -soft limit = limit that can be exceeded, but results in warnings up until grace period is met -hard limit = cannot be exceeded -grace period = soft limit can be exceeded up to hard limit until the grace period value is met

Device Mapper

devices suc has Logical Volume Manager dont have predictable, automatically assigned device names, Instead they use a feature called the device mapper RAID (Redundant array of Inexpensive/independent disks) -created using the mdadm command -- -C specify device name -- -l specify RAID level -- -n number of physical storage - solution to hard disk failure. if one hard disk failed, the data is still available on the second hard disk. it mirrors data between two hard disks - RAID 0 - provides no redundancy but rather increaes available storage by merging multiple hard disks into a single device. - RAID 5 - provides more efficient use of the physical storage devices. writes different data to each physical storage device with teh exception of one device which is used to store parity data Logical Volume Mapper - system physical disks are combined into smaller sets of pools, and the partitions themselves are built from those pools - base unit is physical volume(PV). the PV corresponds t oa hard disk partition or some kind of block storage device coming from a designated storage system caleld a storage area netowkr (SAN). one or more physical volumes are combined to form a pool of storage called a volume group (VG). under the hood the physical volume is chopped up into a series of phsyical extents (PE's) to make allocations easier(see figure 18-2 on notebook). the administrator then carves up the volume group into a series of logical volumes - snapshot taeks a point int time copy of a logical volume and makes it available as another disk Multipath - creates different network paths to a remote storage device

What command would i use to understand how much free space i have left on my file system

df (not free. free displays the amount of free and used memory in the system. does not display disk usage)

Which of the following commands could you use to resolve www.linuxacademy.com to an IP address?

dig www.linuxacademy.com host www.linuxacademy.com

What commands are used to view, configure, and troubleshoot network configurations?

ethtool = make changes or query network driver ifconfig = used to set and display the hosts IP address and network mask ifup / ifdown = bring interface up or down ip - replaces ifconfig, ifup, ifdown and route route = used to set and display the hosts routing and gateway information dhcpcd, dhclient and pump = used to initiate, release, or renew the clients DHCP-assigned address(es) host, nslookup, dig = used to look up DNS names and return information about the targeted host. primarily used for detection and troubleshooting of connections to and from your machine hostname = used to set or view the hosts and domain names for a system netstat = used to view information about the networking subsystem, statistics, and attached hosts/ports. ping = used to quickly establish that a host is alive and responding. essentially a network "hello" traceroute = used to determin the path, names and statuses of the routing devices that traffic uses to reach a given remote host tcpdump = used to capture and inspect the contents of packets from the network

What are the most popular file systems supported by linux

ext2 - Linux extended file system ext3 - is essentially ext2 with journaling ext4 - performance improvements made on ext3 ISO 9660 - CD-ROM filesystem UDF - DVD Filesystem VFAT - 32-bit filesystem readable on Windows (FAT32) NFS - Network Filesystem SMB - Samba filesystem aka CIFS (Common File System (Microsoft default filesharing protocol) XFS - Extended filesystem. higher performance system NTFS - default for Microsoft Windows and incompatible with Linux

Which of the following commands will search for the file examaple.sh in the current directory, recursively?

find . -name example.sh This is the correct format of the find command. . is the current directory, and with no other flags it will search all subdirectories recursively for the file that is indicated by the -name flag.

You are having difficulty with shared libraries on the system. Which of the following commands will print the current directories and libraries in the cache?

ldconfig -p The ldconfig command is used to work with the library cache, and the -p option prints the directories and libraries in the cache. The -C option informs ldconfig to use a different cache. The ldd command prints the library dependencies for a given command, but the options given don't exist for ldd.

locate vs find

locate is faster and database driven. when you run locate you are searching a database rather then a filesystem and only see files you have access to. will find anythign that hs your serach parameters in it. ex: if you search readme, you will find regular files and any part of the path. updated nightly. only looks for items you know are on disk. (-i option is for ignore upper or lower case) run updatedb (update database) to be sure everything is updated. find syntax is (find startpath -options arguments) this is the most accurate but takes time

pertinent ls commands

lscpu - details about CPU. number and speed of each socket lspci - shows alot of info on PCI bus and devices. can identify devices lsscsi - shows info on the SCSI (skuzzy) devises on teh system lsdev - shows devices recognized lsraid - displays RAID devices lsusb - USB info lsblk - displays block devices or disks dmesg - displays the kernel ring buffer

Which of the following commands creates a logical volume with LVM?

lvcreate The lvcreate command is used to create a logical volume from previously created physical devices and volume groups. Using lvcreate is the final of three steps in the process for using LVM prior to actually using the logical volume.

firewalld

on Red Hat distributions firewalld is used to configure iptables - rules are configured into categories called zones and the rules are managed by firewall-cmd - zones include trusted, internal, dmz and external - firewall-cmd affects the active firewall on the system ufw - command used to create iptables - rules are created and stored in /etc/default/ufw and /etc/ufw

pages, slabs and caches

pages - used by kernel to manage memory pages are placed in caches for later reading caches are made up of slabs,; a slab is typically one page ANALOGY!! cache is the city, slab is the neighborhood, page in the block **blocks are read into buffers when a file or set of files is requested from a disk, and then when those buffers are read into a page in memory, that page is a part of a slab or a set of slabs that make up a cache**

You are troubleshooting an authentication issue for a user. You believe the system uses local files and LDAP for authentication. Which of the following lines in /etc/nsswitch.conf shows those authentication mechanisms?

passwd: files ldap Within nsswitch.conf, the passwd line contains information about authentication. The format is as shown in the correct answer. Local authentication is accomplished using the files keyword for the normal passwd file. There is typically a similar line called shadow, assuming that the server is using shadow passwords. The shadow line follows a similar format.

what does the whereis command do?

provides more info than which shows commands binary files, the man page path, and any source files that exists for the command -b = searches for binary -m = seaches for manual pages -s = searches for sources -u = finds unusual or improperly documented entries

RPM deb YUM rpm

rpm is a package that describes as being a type of cpio archive with some added meta information and goes along with deb yum installs RPM and is the manager The rom command manages packages, the yum command handles repositories

A Linux server has been experiencing performance spikes over the course of two weeks. The administrator needs to create a report and determine the cause of the performance spikes. Which of the following commands, along with information in /var/log/messages, will help troubleshoot the issue?

sar

symbolic (soft) vs Hard links

symbolic link - primarily used for shortcut - has its own inode - can span filesystems and drives - changing permissions on a symlink changes the permissions on the target permissions instead - deleting a symlink does not remove the target linked file hard link (2) - used to make a file appear in another place - shares every aspect of the file except name - doesnt span filesystems - doest have its own inode - have to delete all links to delete because it is just a file name **symlink is another actual file. a hard link is just another name to the same file**

chown options

syntax: Chown -options user:group object owner = changes only the user owner owner:group = changes bot the user owner and the group owner owner:: = changes the user owner and sets the group owner to the primary group of the current user :group: = Changes only the group owner and leaves the user owner unaffected

chage options

syntax: chage -option value username acts on all fields in the /etc/shadow file -m = changes MINIMUM value -M = changes maximum value -d = changes the last change value(1 Jan 70) -E = changes expiration date -i = changes inactive value, # of days of inactivity after the account has reached the maximum limit before the user account is locked -W = changes warning value

chgrp options

syntax: chgrp staff file1 -c = shows a line of output only for CHANGES objects -h = Changes symbolic link -R = RECURSIVELY affects the target and all children -v = shows a line of output for every object, regardless of the actions performed on the object

Yo uare viewing the contents of the /etc/init.d directory or the /etc/rc.d/init.d directory on a system and see what looks liek a number of service names. What boot and service management style is the system apprently using?

sysVinit

What command would you use to create a new archive of /tmp/Archive (named archive.tar.bz2) with bz2 compression?

tar cjf archive.tar.bz2 /tmp/Archive tar cjf archive.tar.bz2 /tmp/Archive would create the new archive archive.tar.bz2 of /tmp/Archive with bz2 compression.

YAML adn JSON

these are configuration templates YAML - encompases JSON - used for configuration files wit ha stanza-based format. imminently human friendly and readable JSON - used as a way to serialize data - simpler than YAML - used to conduct data exchange and transfer between API's and their requesting applicaitons or services

iptables command

this creates firewall rules on a system. with iptables, you can: - block network packets - forward network packets to another system, - perform network address translation operations - mangle (modify) network packets filtering points and tables take place as a way for the system to set up a protocol on what comes in and what doesnt. order of rules is important. an actions takes place after a rule called a target: Targets include: ACCEPT- allow packet to continue DROP - dont allow packet to continue; discard REJECT - Do not allow the packet to continue to the nest step but send a response as to why LOG - creation of log entry **DROP is considered more secure than REJECT because reject will give hackers a reason as to why -L command converts port numbers to names -L INPUT filters based on destination On Red Hat based distributions, it is common to use the firewalld utility. firewalld-cmd effects the current firewall

what command do you utilize to limit user account permissions?

ulimit command uses: if you want a user to be unable to create objects over a certain size or use too many system resources options include: -c = limits sizze of core (crash dump) files -d = limits size of DATA -f = limits maximum size of FILES -n = limits number of open files allows -t = limits amount of cpu TIME (in seconds) -u = limits number of processes -v = limits VIRTUAL memory -a = checks a users ulimit settings

SElinux getenforce vs setenforce command

use this command to determine the current SElinux mode to change the SElinux mode use setenforce command 3 SElinux modes Enforcing (performs checks and blocks) permissive (performs checks but doesnt block) disabled (not functioning) sestatus command provides overall status information about SElinux

at command

used for ad hoc jobs queued up in the /var/spool/at directory -at options- midnight noon teatime - 1600 time-of-day date now + time management of at jobs - atq meant at queue. shows summary of jobs -atrm deletes at jobs by job number batch command - extension of at command - meant to run tasks or jobs at no specific time but at a particular threshold of system utilization.

what is the which command used for?

used to determine the full paths of commands that are queried from the PATH variable whereis provides more info than which

As the main system administrator and also security person responsible for your systems, you have noticed some instances of multiple individuals overwriting the /etc/sudoers file on several systems. Which of the following would help alleviate this issue if junior administrators were forced to use it?

visudo visudo was designed to fix the issue of multiple admins editing /etc/sudoers file safely. sudoedit is designed to allow the execution of a command as if by another user

In the /etc/sudoers file, what is the difference between wheel and %wheel?

wheel is a user and %wheel is a group. The % denotes a group in the /etc/sudoers file, and the difference between these is that wheel is a user and %wheel is a group.

mask or unmask in systemd

you can mask a service (link it) to /dev/null so that it will not load in an event that you need to test something else. unmask it so it will load again

When connecting to a computer via a secure shell, where is the fingerprint stored so that it can be referenced to ensure that the remote machine is not an impersonator?

~/.ssh/known_hosts Once the fingerprint of a remote machine has been accepted the first time, the fingerprint is added to the ~/.ssh/known_hosts file so that it can be compared in the future, to ensure the connection is to the intended machine.


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

Workbook Multiple-choice- CH:38,39,40,41,42 (review for final)

View Set

Ch. 12 Object-Oriented Programming: Polymorphism

View Set

Geometry B, Assignment 2. Ordered Pairs: Points in a Plane

View Set