Unit 1 - Moving into admin Flashcards
What does it mean that Linux is a file-based system?
Everything in linux is either a file or directory.
What does a file become when it is executed? And can they also be seen as a file?
A process.
And yes that can also be seen as a file in the ‘proc’ directory.
What does the /bin directory contain?
Contains commands that the user can run but will also be used by system as well during the boot process.
What does /boot directory contain?
Contains everything needed during boot process.
What does /dev directory contain?
Contains directory for devices.
What does /home directory contain?
Contains user files.
What does the /tmp directory contain?
It contains temporary files for User’s and System.
What does the /var directory contain?
System files that can change.
What does the /etc directory contain?
System files that do not change.
What does the /lib directory contain?
Stores sytem libraries.
What does the /proc directory contain?
Files which represent the running system. (process info pseudo system)
What does the /sbin directory contain?
Commands only used by admin.
What does the /usr directory contain?
Commands never used during boot-up.
What are the four files that user details are stored in?
- /etc/passwd - User details
- /etc/shadow - User password
- /etc/groups - Group details
- /etc/gshadow - Group password
What do you see when you do cat /etc/passwd?
- 7 Columns
1) Username
2) x
3) UID
4) GID
5) Finger info
6) Home directory
7) Log-in shell
What do you see when you do head -3 /etc/shadow?
userName:PasswordMD5Hashed:
What do you see when you look inside /etc/group?
userName:x:GID:AnotherOtherUsersAdded
What do you see when you look inside /etc/gshadow?
groupName:x:
What does the ‘cut’ command do and what are the options -d” “ and -f used for?
The cut command is used to chop lines.
- -d is used to set a delimiter
- -f is used to specify a column
What command do you use to change ownership?
chown .
What command do you use to change group ownership?
chgrp
What does the ‘.’ immediately after file permissions in an ls -l output indicate?
That there are alternative methods of access to file/directory.
SELinux security context
What does the ‘+’ immediately after file permissions in an ls -l output indicate?
There are a combination of access methods.
What does the numerical value following the permission show?
The number of hard links there exists to the file.