Linux files structure Flashcards

(28 cards)

1
Q

What does -rw-r–r– mean?

A
  • is it directory? (-/d)
  • access rights for owner 3
  • access rights for memebrs of files group 3
  • access rights for everyone else 3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does second argument (1) mean?

-rw-r–r– 1 root root 1186219 2017-04-03 11:05 kubuntu-leaflet.png

A

Number of hard links

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

Why are root args duplicated?

-rw-r–r– 1 root root 1186219 2017-04-03 11:05 kubuntu-leaflet.png

A

First is owner of file, second is name of group that own the file

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

LESS command

  1. Move to the end of file?
  2. Move to the beggining of file?
  3. Search for occurence of text?
  4. Search for the next occurence of previous search?
  5. See help for all LESS options?
A
  1. Shift + g
  2. g
  3. /text + enter
  4. n
  5. h
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Simple copy paste trick?

A

Double click on a word in terminal, right click to paste it

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

What is /bin directory?

A

Contains binaries used by system to boot and run

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

What is /boot directory?

A

Contains linux kernel, RAM disk image, boot loader

/boot/vmlinuz is linux kernel

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

What is /dev directory?

A

Contains device nodes.

Device is also a file for linux.

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

What is /home directory?

A

base directory for each user.

Ordinary users should only have rights to modify files in home dirs

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

What is /etc directory?

A

Contains system configuration files.
Also contains shell scripts, that start system services.

/etc/crontab defines automated cron jobs
/etc/fstab defines storage devices with their mount points
/etc/passwd contains list of user accounts

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

What is /lib directory?

A

Contains shared library files by core system programs.

Similiar to windows DLL in Windows

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

What is /lost+found directory?

A

Contains recovery data in case of failure of some device or formatted partition

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

What is /media directory?

A

Contains mount points for removable media, like USB

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

What is /mnt directory?

A

In Olders systems contains mount points for removable devices

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

What is /opt directory?

A

Contains optional software, e.g. commercial programs

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

What is /proc directory?

A

It is virtual file system maintained by kernel. Contains information how kernel sees computer.

17
Q

What is /root directory?

A

Home directory for root account

18
Q

What is /sbin directory?

A

Contains system binaries, reserved for superuser

19
Q

What is /tmp directory?

A

Storage of temporary files

20
Q

What is /usr directory?

A

Contains all program files used by regular users

21
Q

What is /usr/bin directory?

A

Contains executable programs installed by linux itself

22
Q

What is /usr/lib directory?

A

Contains shared libraries for /usr/bin dir

23
Q

What is /usr/local?

A

Initialy empty, contains programs for system wide usage

24
Q

What is /usr/sbin directory?

A

Contains more system administration programs

25
What is /usr/share directory?
Contains all shared data used by programs in /usr/bin
26
What is /usr/share/doc directory?
Documentation for most packages installed in system
27
What is /var directory?
Contains data that is most likely to chane in time, e.g. database data, logs
28
What is /var/log directory?
Contains log files of system activity Important files: /var/log/messages /var/log/syslog