Deck 4 Flashcards

1
Q

sed -r with ‘/’ as delimiter and what else what else to be valid?

-sig…allows a process to finish up before being killed

PREROUTING is a PROXY SERVER command in iptables

A

-double quotes

-term

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

-ip route add ADDS what?

this command (if [ -f “$filename” ]; then) NEEDS to have teh FUCKING ; before the ‘then’

A

-pull

-a PERSISTENT route

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

copy a ssh key file to a server using scp and…

A

-ssh-copy-id

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

semange manages SELinux policies. semange -…= ADDS a new rule for a port (semanage port -a -t http_port_t -p tcp 6379)

/etc/systemd/…. = holds system journal

umask default is 666 for files, 777 for directories. Values subtracted from this represent what the permissions will be for whoever (HINT: they have to EQUAL 7)

A

-a

-journald.conf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

if logsearch.service shows a timeout in log, increase the….

df -i= checks INODES (good for if disk appears bit full)
fdisk -l =checks….

lsblk= shows MOUNT points and other info about block devices

A

TimeoutStartUSec config

-partitions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

du -…= shows disk USAGE

….-n 20 shows LAST 20 lines

Containers are stateless

A

-sh

-tail

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

an ….is a static specification for a container

docker …shows actively running containers

docker images shows docker images

A

-image

-ps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

docker run and the…number can be used to run

docker build builds…

set SGID bits with 2 (ex 2744), set SUID bits with…

A

-image

-custom images

-4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

getenforce is a SELinux term

used to restore context of files and directories in SELinux

A

-restorecon

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

docker run -it creates an…container to do bash stuff

docker run does NOT do an interactive/adminstrative interface

install virtual machines with what command?

A

-interactive

-virt install

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

….sh is used to manage virtual machines

free commands shows RAM. Free -h shows used and unused memory and…usage

visudo checks errors in ….file

A

-vir

swap

-sudoer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

docker image tag test allows assigning?

iptable forward is for LEAVING, input is for COMING. ALSO IPTABLES HAS NO COLONS!!!!

/boot/efi is mount point for…

A

-versions

UEFI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

for remotes apps that need/have GUIs, $…..must be set so their gui(s) can be viewed locally

initrd loads when system BOOTS

A

-DISPAY

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

sda is SATA! SDA IS SATA!

-git pull is used to UPDATE an already there local repo. git…creates the repo locally on your machine

git clone copies ALL files from a REMOTE repo. git pull copies only MODIFIED files

A

-clone

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

ln -s creates a…

terraform output has {}

A

-softlink

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

mkswap to create swap space, then….to turn on swap. Useful if you have use fdisk -l and see no swap space

-uniq -d shows

if mount point “does not exist”, create a

A

-swapon

-repeated lines

directory for it.

17
Q

lsmod shows….like kvm, ccm, etc

before using locate command to find recently downloaded files, us ……db

sysconfig/network contains….info

A

-modules

-updatedb

hostname

18
Q

-f disables when using useradd -d/var/www/ -g service_accounts -G www -f 0 command

modify /etc/default/ grub NOT…

A

-grub.cfg (config) file

19
Q

echo tmp&raquo_space; .gitignore does what?

echo $(env TZ=America/Chicago date)&raquo_space; mylog.txt

-env command runs program without changing current one,

A

adds tmp directory and its files to gitignore file so they are IGNORED

-temporarily changes timezone to Chicago and appends that info to mylog.txt

20
Q

systemd-…. blame diagnoses slow boot issues. give list of services/start times

modprobe -r removes a driver, modprobe and the driver name adds it

….allows dynamic printer detection

A

-analyze

-cups

21
Q

git…helps you get info from a repo

tar -czh is used for….

to install a tar executable (somename tar.gz), use tar, configue and….

A

-config

-tarring symbolic links (c=tar, z=compress w/gzip, h=creates link)

-make

22
Q

to have su privilege, user needs to be in….group

to load a module into the kernel, use…command

A

-wheel

-modprobe

23
Q

sysctl -p with ip forward=1 will make ip forwarding…

git checkout is used to switch…

lsattr shows an immutable bit (i)

A

-persistent

-branches

24
Q

immutable bit stops mods and deletion of a directory. sticky bit only stops…and renaming

chattr+… ONLY allows appending to a file. Can’t modify other contents

apt (being replaced by dnf) and yum both handle dependencies, …doesn’t.

A

-deletion

-a

rpm

25
Q

fsck is for ext file systems. repair xfs filesystems with xfs_…..

user and group id values are in etc/…..

——a——– in file attributes means?

A

-repair

-login.defs

can only APPEND to file. Nothing else

26
Q

cpio -o vs -i?

you can also set them there sticky bits by adding a.. (ex. chmod…755)

niceness goes from -20 to 19. -20 is highest priority, 19 is the lowest priority

A

-o can output to a file, -i inputs FROM a file.
-1

27
Q

dnf history and dnf history undo last is best commands to remove a package

to resolve a linux system not booting, boot on a live CD and Execute grub-install /dev/sdX and reboot

resolve full root filesystem in this order: pvcreate, lvresize, and vgextend

A
28
Q

single user mode in GRUB is entered by adding rescue target and ….in the kernel line

iptables -t filter -A INPUT -p tcp –dport 4000:5000 -j ACCEPT. -t adds to a table, -j…..

iptables -i and -z

A

-bin/bash

-jumps to target

29
Q

df is first command to run if you learn a filesystem is full. to find out what is USING that space, use…

use…command than fsck on a partition when trying to repair partition

A

-du

-telinit 1

30
Q

mdadm -manage (remove then fail)….a RAID array as bad.

to kill a process by user, use pkill …. username

A

marks

-u

31
Q

ps -ef locates..

with Debian/Ubuntu, you MUST do apt…before apt upgrade

ansible playbooks are written in….language

A

-runaway processes

-apt update

-yaml

32
Q

/etc/named…… has default config for BIND software package

use pkill to kill a process by name (or a pattern)

docker rm —state exited does what?

A

-conf

-remove containers in an exited state

33
Q

setting shell to /sbin/nologin disables/limits iterative logins. /bin/nologin also does that too.

A