Linux test 2 Flashcards

1
Q

When looking at File system permission, who do each permissions belong too?
(3 groups/ 3 rights folders)

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you change owner on a file

A

chown ‘user’ ‘/filename’
ex:
Sudo chown jdrost /data

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

How do change group ownership?

A

chgrp ‘goupname ‘file/foldername’
ex:
Sudo chgrp projects /data

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

How do you change ACL rights?

A
chmod 'aclvalue'
Read represented as 4
•Write represented as 2
•Execute represented as 1
ex:
sudo chmod 775
makes
rwx-rwx-r-x
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you add a user with another group, while remaining in the current group?

A

-aG

usermod -aG projects jdrost

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

How to add user to a group?

A

usermod -G
ex:
usermod -G itadmins jdrost

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

How to change password for a user?

A

passwd

ex: passwd jdrost

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

How to can change password history options?

A

ls /etc/pam.d

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

What is the field for user id: and encrypted password?

A

less /etc/shadow

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

How do you list known partitions including disk?

A

-fdisk -l

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

How do you look at the physical and logical volumes, and volume groups?

A

pvdisplay
lvdisplay
vgdisplay

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

Sda1 is the _________ partition

A

bootable

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

Sda2 is specified by the path for ______ volume management

A

logical

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

What are the Group Management Command?

A

groupadd
groupmod
groupdel

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

Disks are recognized as _____ _____ system object

A

block file

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

What is the path to disk device?

A

/dev/sdx

- x starts with a and increases for each additional disk

17
Q

Partitions are named sdxn: what is substituted for the n?

A

n starts at 1 and increases for each additional partition

18
Q

How do you display free disk on all volume?

A

df

19
Q

How do you display mounted volumes and their targets?

A

mount

20
Q

Logical volume management adds a layer of abstraction between disks/partitions and ______.

A

volumes

21
Q

Physical Volumes divides into ________ _______ -the size determined when creating it

A

Physical Extents (pe)

22
Q

You can use a disk or partition to create a?

A

Physical Volume

Usually consume entire disk

23
Q

How do you create pv’s, lv’s, vg’s

A

pvcreate
lvcreate
vgcreate

24
Q

What do you do after creating the logical volume?

A

create file system and mount

mount -t xfs /dev/vg/lv /file

25
Q

Use _____ and specify type to create file system on partition

A

mkfs

default is file system is xfs

26
Q

You can specify mount device in _____ via device path or UUID

A

/etc/fstab

27
Q

How do you create a disk ?

A

sd- scuzzy disk

28
Q

creating a logical volume?

A

Need: -L 5g myvg -n mylv

size, name, then name lv

29
Q

How to create a vg?

A

vgcreate myvg /dev/sb’_’