EXAM DECK Flashcards
where is umask?
find processes by user?
find a service. NOW
bashrc
ps -u username
systemctl list-unit-files –type=service
do cronjob at 1330 everyday
do a cronjob mon-friday anytime
do a cronjob mon-friday 1330
cronjob order: minute, hour, day, month, week
30 13 * * * /file
* * * * 1-5 /file
30 13 * * 1-5 /file
to create a logrotate file for something, use logrotate.conf to view syntax. Can find it w/locate
*.err
*.emerg
resize a lv AND filesystem
resize extents AND filesystem
DONT FORGET THE FUCKING R YOU RETARD!!!!!
if asked to create logrotate files, reference logrotate.conf for available options, and files in logrotate.d for SYNTAX
lvextend -r -L +#M/G /dev/vg/lg
lvextend -r -l +#M/G /dev/vg/lg
Change uid
Add user to sec group
Useradd -u ### user
Useradd -G group user
Make sure nfs-server is ENABLE AND STARTED!!!!
getenforce 0/1 makes selinux permissive or enforced
enable/disable selinux then REBOOT
go to /etc/sysconfig/selinux
Find all booleans THEN key in on a specific one.
Set a boolean for something.
Use the example in the semanage-port man page to change ports for selinux
getsebool -a | grep <name></name>
Refer to listed booleans and type setsebool -P <name></name>
Use semanage-fcontext man page to change context for files/directories
Restore the context after doing this
Go to httpd config file and change DocumentRoot’s
AFTER DOING ALL THIS RESTART HTTPD
-restorecon -Rv /directory
go to /etc/httpd/conf/httpd.conf and change BOTH roots to directory that was created.
compress with gzip
compress with bzip
compress with xzip
tar -czvf
tar -cjvf
tar -cJvf
run cronjob as different user
crontab -e -u username
Where to find ssh config file?
Make graphical sessions forward in ssh
use locate sshd_config
Un-hash X11 forwarding
To do minimal installation, go to “Software Selection”
to partition, chose “Installation Destination” > “custom” > “done”. On manual partitioning page, choose “standard” then click “+” below to add requested mount points AND capacities
-Also create a root user AND a user with sudo priv (choose “make this user administrator”
make it where new users get a file called newfile
xfat need -n for labels NOT -L
touch /etc/skel/newfile
paths for podman generate
root?
rootless/normie user?
-/etc/systemd/system/ <name></name>
- ~/.config/systemd/user/ <name></name>
*also have to create directory for nomie, THEN use podman generate to create name of service
create a tuned.conf file
TAR IS FOR WHOLE DIRCETORIES NOT FILES!! NAME OF TAR MUST GO FIRST!
[sysctl]
vm.swappiness=##