DECK 2 Flashcards

1
Q

chown user /dir/files

changing ownership doesn’t affect permissions

chgrp group /dir/file

A

makes the user of those files

changes groups that owns files

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

read 4 = can open and list
write 2 = modify and create/delete
execute 1= can run and change (cd)

when…is applied, it makes files and dir executable.

special x (X), is recursive

A

-x

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

chmod 750 myfile

if you have write permissions for a directory you can delete ANY non-sticky/immutable file.

chmod g+s dir= applies SGID to a directory

chmod +…dir = applies sticky bit

chmod 3770 dir = does BOTH SGID AND sticky

A

give rwx to owner, rx to group, nothing (-) to others

-t

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

umask is locate in /etc/….

set user-specific overrides in ~/.bashrc

default permissions for directories are 666, default for files is 777

umask 0022?

A

bashrc

-first 0 is special permissions that are set by SGID/sticky,

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

MUST CHANGE UMASK IN /etc/bashrc IF YOU WANT IT TO BE PERSISTENT!

. .bashrc applies umask changes IMMEDIATELY

ip link sh shows?

A

-current device and bios name and NIC info

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

hostname set-hostname is used to set hostnames

hostnames are resolved in /etc/…. and is useful for LOCAL host only

/etc/resolv.conf contains…

/etc/nsswitch.conf does what?

A

-hosts

-DNS entries

determine order of resolution of hostnames

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

when you change your hostname, add it to /etc/hosts:

ex: xxx.xxx.xxx.xxx hostname.com hostname

use ip NOT ipconfig

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

chmod a+x filename

chmod u-x filename

chmod -R a+X dirname

A

Makes a file exec (x) for all (a). Can also use u/g/o as well, of course

Takes away (-) exec on a file

Makes a dir exec (X) BUT, thia capital X only applies to EXISTING files with exec permissions

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

systemd service that manages network configuration

Configuration is stored in files in /etc/NetworkManager/system-connections

nmcli and nmtui are also net config tools

A

NetworkManager

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

in NetworkManager, devices are…

….. has permissions to modify settings in NetworkManage

Non-privileged users logged in can change net settings but NOT via…

nmcli general permissions shows current permissions

A

-network interfaces

-dbus

-ssh

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

USE NMTUI FOR EXAM!

if connection doesn’t automatically come up, do what in NMTUI

Make sure you ACTIVATE or DE-ACTIVATE in nmtui (depending on what you are accomplishing)

A

-check connection is set to “automatically connect”

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

TROUBLESHOOTING NETWORK

ping6 test IPV6. must use…in with LINK LOCAL address (ex: ping6ff02::1%ens33

ip route prints route table, ip -6 route does that for ipv6, tracepath/6 does that for ips/websites

…anaylses socket stats

A

-nic name

-ss

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

if you can’t ping, you probably don’t have …

A

-default route

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

RPM

rpm -qa= shows all INSTALLED packages
rpm -qf filename = shows?
list files installed from a package?
show scripts executed while installing package? rpm -q –……

A

-which installed package owns a filename

-rpm -ql

–scripts

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

rpm2cpio package-1.0.rpm | cpio -tv=

rpm2cpio package-1.0.rpm | cpio -idmv=

A

shows contents of a package

extracts package in current directory

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

dnf is used to install repos. Preferred over yum

….-manager= used to access REDHAT repos

dnf config-manager –enable nameofrepo

dnf config-manager= adds a 3rd party repo

EX: dnf config-manager –add repo=”file:///repo/AppStream”

A

subscription

enables a repo manually

17
Q

:go to /etc/yum.repos.d/ to….

A

view repos

18
Q

dnf info give info about a package.

dnf list shows all packages. an…symbol means package is installed. repo_ means the package….

dnf provides */something

dnf install installs, dnf removes (dependencies too), dnf update (updates a package)

dnf update….updates kernel and keeps old as backup

A

-@, CAN be installed

goes deep to find a package containing something

-kernel

19
Q

dnf handles dependencies, rpm doesn’t

purpose of AppStream and BaseOS?

A

-separate OS packages/dependencies from App packages/dependencies