Unit 1 - Moving into admin Flashcards

1
Q

What does it mean that Linux is a file-based system?

A

Everything in linux is either a file or directory.

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

What does a file become when it is executed? And can they also be seen as a file?

A

A process.

And yes that can also be seen as a file in the ‘proc’ directory.

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

What does the /bin directory contain?

A

Contains commands that the user can run but will also be used by system as well during the boot process.

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

What does /boot directory contain?

A

Contains everything needed during boot process.

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

What does /dev directory contain?

A

Contains directory for devices.

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

What does /home directory contain?

A

Contains user files.

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

What does the /tmp directory contain?

A

It contains temporary files for User’s and System.

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

What does the /var directory contain?

A

System files that can change.

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

What does the /etc directory contain?

A

System files that do not change.

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

What does the /lib directory contain?

A

Stores sytem libraries.

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

What does the /proc directory contain?

A

Files which represent the running system. (process info pseudo system)

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

What does the /sbin directory contain?

A

Commands only used by admin.

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

What does the /usr directory contain?

A

Commands never used during boot-up.

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

What are the four files that user details are stored in?

A
  • /etc/passwd - User details
  • /etc/shadow - User password
  • /etc/groups - Group details
  • /etc/gshadow - Group password
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What do you see when you do cat /etc/passwd?

A
  • 7 Columns
    1) Username
    2) x
    3) UID
    4) GID
    5) Finger info
    6) Home directory
    7) Log-in shell
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What do you see when you do head -3 /etc/shadow?

A

userName:PasswordMD5Hashed:

17
Q

What do you see when you look inside /etc/group?

A

userName:x:GID:AnotherOtherUsersAdded

18
Q

What do you see when you look inside /etc/gshadow?

A

groupName:x:

19
Q

What does the ‘cut’ command do and what are the options -d” “ and -f used for?

A

The cut command is used to chop lines.

  • -d is used to set a delimiter
  • -f is used to specify a column
20
Q

What command do you use to change ownership?

A

chown .

21
Q

What command do you use to change group ownership?

A

chgrp

22
Q

What does the ‘.’ immediately after file permissions in an ls -l output indicate?

A

That there are alternative methods of access to file/directory.

SELinux security context

23
Q

What does the ‘+’ immediately after file permissions in an ls -l output indicate?

A

There are a combination of access methods.

24
Q

What does the numerical value following the permission show?

A

The number of hard links there exists to the file.

25
Q

What does ‘getfacl’ do?

A

It displays the access list for the specified file.

26
Q

How is the default permissions set?

A

They are set using a ‘umask’ value which is taken away from 777.

27
Q

What is the command used to create a hard link to a file?

A

ln

28
Q

What is the command used to create a soft link to a file?

A

ln -s

29
Q

If you delete the source hard link file does the new hard link file still remain? Is this different in soft link files?

A

With hard link files they still remain but with softlink files they do not.

30
Q

If a change is made to a linked file is this change reflected in the source file and vice versa?

A

Yes.

31
Q

What is another word for soft link?

A

Symbolic Link.

32
Q

What is the difference between hard link and soft link?

A

Hard links point to the actual block in memory whereas soft links point to original file which point to actual block in memory.

33
Q

What is a daemon?

A

A process started upon booting which runs in the background.

34
Q

Discussion question.

A

Future of file permission:
–Is User/Group/Other sufficient?
–Simple control methods? ACL…
–Complex control methods? SELinux