Share
Embed
Linux Dateisystem
Was ist ein Dateisystem?
Welche Verzeichnisse existieren in jedem Linux
System?
Wo darf ich als Benutzer einfach Daten ändern?
Wo sollte man nicht einfach etwas ändern?
Was ist POSIX oder Linux Standard Base?
Unterschiede zu anderen Betriebssystemen
Christian Münch
March 16, 2022
Transcript
19 slides
-
Fragen Was ist ein Dateisystem? Welche Verzeichnisse existieren in jedem
Linux System? Wo darf ich als Benutzer einfach Daten ändern? Wo sollte man nicht einfach etwas ändern? Was ist POSIX oder Linux Standard Base? Unterschiede zu anderen Betriebssystemen 2 2 Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
POSIX Portable Operating System Interface Für UNIX entwickelte Programmierschnittstelle Die
gängigen Dateisysteme (ext4, zfs, ...) halten sich an den POSIX Standard Kompatible Systeme sind z.B. Minix, macOS, HP- UX, Solaris "Everything is a file" 3 3 Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
Ist Linux POSIX kompatibel? je und nein Es gibt spezielle
Linux Distributionen die POSIX kompatibel sind. Linux ist weitestgehend POSIX kompatibel 4 4 Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
Linux Standard Base (LSB) Arbeitsgruppe der Linux Foundation Versucht Standards
zwischen Linux Distrubutionen schaffen Distributionen (Debian, SuSE, Redhat, Ubuntu, ...) Möchte keine POSIX Kompatibilität um jeden Preis Filesystem Hierarchy Standard (FHS) 5 5 Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
LSB Informationen lsb_release -a No LSB modules are available. Distributor
ID: Ubuntu Description: Ubuntu 16.04.6 LTS Release: 16.04 Codename: xenial 6 6 Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
Datei Hierarchie Linux Stammtisch Worms - Linux Stammtisch Worms -
https://wolust.de https://wolust.de - @cmuench - @cmuench 7 7 -
/ /bin /boot /dev /etc /home /root /tmp 8 8
Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
/lib /media /proc /run /sbin /srv /usr /var /opt 9
9 Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
Wichtige Unterverzeichnisse /usr/bin /usr/sbin /usr/local /usr/lib /usr/src /var/log /var/lib /var/spool
10 10 Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
Wo sollte ich meine Dateien ablegen? 11 11 Linux Stammtisch
Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
Wo sollte man nichts manuell anpassen? 12 12 Linux Stammtisch
Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
Unterschiede zu anderen Betriebssystemen Keine Laufwerksbuchstaben Links und Symlinks Mount
13 13 Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
Nützliche Tools Alles unter /bin (ls, mount, mkdir, rmdir, rm,
mv, mount, umount, df) tree ranger ... und noch 10.000 andere 14 14 Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
Mount mount -t iso9660 -o ro /dev/cdrom /mnt 15 15
Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
Mount $> mount /dev/sda5 on / type ext4 (rw,errors=remount-ro) proc
on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) /dev/sda7 on /backup type vfat (rw) /dev/sdb on /media/myusb type vfat (rw,nosuid,nodev,uid=1000,gid=1000,s 16 16 Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
fstab $> cat /etc/fstab proc /proc proc nodev,noexec,nosuid 0 0
/dev/sda5 / ext4 errors=remount-ro 0 1 /dev/sda6 /mydata ext2 defaults 0 2 /dev/sda7 /backup vfat defaults 0 3 17 17 Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
$> ls -l /usr/local total 36 drwxr-xr-x 2 root root
4096 Oct 2 03:35 bin drwxr-xr-x 2 root root 4096 Nov 29 2018 etc drwxr-xr-x 2 root root 4096 Nov 29 2018 games drwxr-xr-x 2 root root 4096 Nov 29 2018 include drwxr-xr-x 4 root root 4096 Nov 29 2018 lib lrwxrwxrwx 1 root root 9 Nov 29 2018 man -> share/man drwxr-xr-x 3 root root 4096 Jan 26 2019 mrpe drwxr-xr-x 2 root root 4096 Dec 31 2018 sbin drwxr-xr-x 6 root root 4096 Dec 31 2018 share drwxr-xr-x 2 root root 4096 Nov 29 2018 src 18 18 Linux Stammtisch Worms - Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench -
Resourcen https://en.wikipedia.org/wiki/POSIX https://en.wikipedia.org/wiki/Linux_Standard_Base https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Sta 19 19 Linux Stammtisch Worms -
Linux Stammtisch Worms - https://wolust.de https://wolust.de - @cmuench - @cmuench