Linux test 2 Flashcards
When looking at File system permission, who do each permissions belong too?
(3 groups/ 3 rights folders)
User who owns file, group who owns file, other (everyone else)
ex:
-rw-rw-r– (9bits)
(r-read, w-write, e-execute. D-directory, l-link)
How do you change owner on a file
chown ‘user’ ‘/filename’
ex:
Sudo chown jdrost /data
How do change group ownership?
chgrp ‘goupname ‘file/foldername’
ex:
Sudo chgrp projects /data
How do you change ACL rights?
chmod 'aclvalue' Read represented as 4 •Write represented as 2 •Execute represented as 1 ex: sudo chmod 775 makes rwx-rwx-r-x
How do you add a user with another group, while remaining in the current group?
-aG
usermod -aG projects jdrost
How to add user to a group?
usermod -G
ex:
usermod -G itadmins jdrost
How to change password for a user?
passwd
ex: passwd jdrost
How to can change password history options?
ls /etc/pam.d
What is the field for user id: and encrypted password?
less /etc/shadow
How do you list known partitions including disk?
-fdisk -l
How do you look at the physical and logical volumes, and volume groups?
pvdisplay
lvdisplay
vgdisplay
Sda1 is the _________ partition
bootable
Sda2 is specified by the path for ______ volume management
logical
What are the Group Management Command?
groupadd
groupmod
groupdel
Disks are recognized as _____ _____ system object
block file
What is the path to disk device?
/dev/sdx
- x starts with a and increases for each additional disk
Partitions are named sdxn: what is substituted for the n?
n starts at 1 and increases for each additional partition
How do you display free disk on all volume?
df
How do you display mounted volumes and their targets?
mount
Logical volume management adds a layer of abstraction between disks/partitions and ______.
volumes
Physical Volumes divides into ________ _______ -the size determined when creating it
Physical Extents (pe)
You can use a disk or partition to create a?
Physical Volume
Usually consume entire disk
How do you create pv’s, lv’s, vg’s
pvcreate
lvcreate
vgcreate
What do you do after creating the logical volume?
create file system and mount
mount -t xfs /dev/vg/lv /file
Use _____ and specify type to create file system on partition
mkfs
default is file system is xfs
You can specify mount device in _____ via device path or UUID
/etc/fstab
How do you create a disk ?
sd- scuzzy disk
creating a logical volume?
Need: -L 5g myvg -n mylv
size, name, then name lv
How to create a vg?
vgcreate myvg /dev/sb’_’