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?

21
Q

What command do you use to change group ownership?

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
What does 'getfacl' do?
It displays the access list for the specified file.
26
How is the default permissions set?
They are set using a 'umask' value which is taken away from 777.
27
What is the command used to create a hard link to a file?
ln
28
What is the command used to create a soft link to a file?
ln -s
29
If you delete the source hard link file does the new hard link file still remain? Is this different in soft link files?
With hard link files they still remain but with softlink files they do not.
30
If a change is made to a linked file is this change reflected in the source file and vice versa?
Yes.
31
What is another word for soft link?
Symbolic Link.
32
What is the difference between hard link and soft link?
Hard links point to the actual block in memory whereas soft links point to original file which point to actual block in memory.
33
What is a daemon?
A process started upon booting which runs in the background.
34
Discussion question.
Future of file permission: –Is User/Group/Other sufficient? –Simple control methods? ACL... –Complex control methods? SELinux