Linux Shell and Directory Structure Flashcards
In the terminal which one is a superuser notation and regular user:
1) “$”
2) “#”
“#” = Superuser
$ = User
Explain each level of file permissions (see example below)
- rwx r-x –x
Type: File
rwx : read,write,and execute for the owner
r-x : read and execute for group
–x: execute for the user/everyone else
Explain each level of file permissions (see example below)
d rw- r– r-x
Type: Directory
rw- : read,write for the owner
r– : read for group
r-x: read and execute for the user/everyone else
what does the “file” command do?
Provides file type with description
What is the /boot directory for?
Stores Linux kernel and boot loader files
- Kernel file is vmlinuz
What is the /etc directory for?
Contains configuration files for a system. All files in /etc should be text files
What are the following /etc subdirectories used for?
/etc/passwd
/etc/fstab
/etc/hosts
/etc/init.d
/etc/passwd - contains user accounts and essential user information
/etc/fstab - table of devices that get mounted when system boots
/etc/hosts - lists network host names and ip addresses
/etc/init.d - contains scripts that start various system services
What is the /bin and /usr/bin directory for?
/bin - essential programs that the system requires to operate
/usr/bin - contains applications for the system’s users
What is the /sbin and /usr/sbin directory for?
they both contain programs for system administration, mostly for use by the superuser (files apart of official distribution)
What is the /usr directory for?
Support user applications
“/usr/share/man” = where “man” pages are kept
What is the /usr/local directory for?
Software that is not part of the official distribution
What is the /var directory for?
contains files that change as the system is running
‘/var/log’ - where logs are traditionally stored
What is the /tmp directory for?
Where programs can write their temporary files to
What is the /dev directory for?
Where devices are available to the system. Does not contain files in the usual way
All devices that the kernel understands are represented here
What is the /proc directory for?
entirely virtual - provides insights into the kernel itself
“cat /proc/cpuinfo/”