FENIX_main/notes/fs_hierarchy
2021-01-31 14:08:26 -06:00

259 lines
No EOL
7.1 KiB
Text
Executable file

/ - root directory
/bin - essential command binaries
/boot - bootup files
/dev - device files
/etc - configuration stuffs
/home - User home directories
/lib - essential libraries and kernel modules
/lib64 - 64-bit libraries (on amd64)
/media - removeable media mount point
/mnt - all-purpose mount point
/opt - add-on software packages
/root - root's home directory
/sbin - essential system binaries
/srv - web server stuffs (if we have a web server)
/tmp - volatile temporary files
/usr - user data
/var - variable data
Stuff in /bin:
==============
cat
chgrp
chmod
chown
cp
date
dd
df
dmesg
echo
ed
false
hostname
kill
ln
login
ls
mkdir
mknod
more
mount
mv
netstat
ping
ps
pwd
rm
rmdir
sed
sh
stty
su
sync
tar
test and [
true
umount
uname
Stuff in dev:
=============
null - discards input, produces EOF when read from
zero - discards input, produces a bunch of \0 when read from
full - produces \0 when read from, generates ENOSPC when written to
random - a pseudorandom number generator (cryptographically secure)
urandom - a pseudorandom number generator (not cryptographically secure)
console - system console
stdin - standard input
stdout - standard output
stderr - standard error
ppp - PPP interface
lp* - line printers (e.g. lp0)
ptmx - psuedo-terminal controller
/pts/* - pseudo-terminals (e.g. /pts/0)
tty* - terminals (e.g. tty0)
ttyS* - serial port (e.g. ttyS0)
ttyUSB* - usb serial converter, modem, etc. (e.g. ttyUSB)
fb* - frame buffer (e.g. fb0)
fd* - floppy drive (e.g. fd0-fd7)
hd* - IDE hard drive (ATA drive/ATAPI CD drive)
hda - first channel primary drive
hdb - first channel secondary drive
hdc - second channel primary drive
hdd - second channel secondary drive
e.g. hda1 - first channel, primary drive, first partition
ht* - IDE tape (e.g. ht0), can prefix n for no-rewind
js* - joystick (e.g. js0), prefix d for digital instead of analogue (e.g. djs0)
md* - RAID (metadisk) (e.g. md0)
mouse* - Mouse (e.g. mouse0)
pp* - parallel ports (e.g. pp0)
nvme*n*p* - NVMe (drive controller, drive, partition) (e.g. nvme0n1p1)
mmcblk*p* - MMC (SD cards, etc.) (device, partition) (e.g. mmcblk0p1)
pd* - parallel port IDE devices (e.g. pda0 - first device, first partition)
ram* - ram disks (e.g. ram0)
rpda* - PDAs, like my Dell Axim (e.g. rpda0)
pt* - parallel port ATAPI tape device (e.g. pt0, npt0)
sd* - SCSI/SATA/USB/Firewire mass storage device
e.g. sda1 - first drive, first partition
ses* - enclosure driver (e.g. ses0)
sg* - generic SCSI layer (e.g. sg0)
sr* - ROM driver (optical disks) (e.g. sr0)
scd* - SCSI CD-ROM device, replaces sr* for this (e.g. scd0)
st* - magnetic tape (e.g. st0)
nst* - magnetic tape, no rewind (e.g. st0)
can suffix l, m, or a for modes 1, 2, or 3 (default is 0)
I kinda wanna change some things and remove some others. Like, some, I'll keep.
scd0? Yep. hda for ATA drives? Yep. lp, fb, fd, pp, nvme? Yep. I kinda wanna
split off USB and Firewire mass storage device. Not sure how. ud0 and fwd0,
maybe? Might remove pd for parallel port IDE devices and move PDAs to pda
instead of rpda.
/etc hierarchy:
===============
init.d - scripts for system initialisation
opt - config for /opt
rc[0-6].d - scripts for different runlevels
X11 - config for X (if we actually try to get graphics going)
Stuff in etc:
=============
at.allow - users allowed to use at (doesn't exist by default)
at.deny - users not allowed to use at (exists empty by default)
fstab - static filesystem info
gettydefs? - getty settings?
group - list of groups
host.conf - resolver conf. file
hosts - static hostnames
hosts.allow - host access file for TCP wrappers
hosts.deny - host access file for TCP wrappers
hosts.lpd? - trusted hosts for lpd?
inittab - config file for init
issue - pre-login message/id
ld.so.conf - extra dirs for shared libraries
motd - message of the day
mtab? - dynamic filesystem info
passwd - password file
printcap? - lpd printer capability db?
profile - default sh init file
protocols - IP protocol listings
securetty - TTY access control for root login
services - port names for network services
shadow - shadow password file
shells - pathnames of login shells
/media hierarchy:
=================
floppy - floppy drive (if present)
cdrom - cd drive (if present)
cdrecorder - cd writer (if present)
zip - zip drive (if, for some reason, present)
Stuff for /sbin:
================
shutdown
fastboot
fasthalt
fdisk
fsck
fsck.fxfs - fsck for the FENIX file system
halt
init
mkfs
mkfs.fxfs - make a FENIX file system
mkswap
reboot
swapon
swapoff
tty - the actual program that runs the TTY, not the minor utility
update
/srv hierarchy:
===============
ftp - ftp files
www - http files
/usr hierarchy:
===============
bin - user-facing commands
games - games.
include - C include files
lib - libraries
lib64 - 64-bit libraries (on amd64)
local - local hierarchy; safe from system updates
bin - local binaries
etc - config for local binaries
games - local game binaries
include - local C headers
lib - local libraries
lib64 - local 64-bit libraries (on amd64)
man - local online manuals
sbin - local system binaries
share - local arch-independent hierarchy
src - local source code
sbin - non-vital system binaries
share - architecture-independent files
calendar - files for calendar(1)
dict - word lists for look(1)
doc - documentation
games - files used by games
locale - locale info
man - online manuals
might have language subdirs i.e. man/en/man1, man/en_US/man1, etc.
might also have architechture subdirs i.e. man/en/man8/i386, etc.
man1 - user programs
man2 - system calls
man3 - library calls
man4 - special files
man5 - file formats
man6 - games
man7 - miscellaneous
man8 - system administration
misc - misc. systemwide files
ascii - file w/ ascii character set table
termcap/termcap.db - terminal capability database
nls - message catalogs for native lang support
terminfo - terminfo database
zoneinfo - tz info
src - source code
X11R6 - X11 release 6, if we need it
/var hierarchy:
===============
backups - system backups; probably don't touch, it's reserved
cache - app cache data
fonts - locally generated fonts
man - locally formatted man pages
www - www proxy/cache data
<package> - package specific cache data
crash - crash dumps
cron - crontabs
games - variable game data
lib - variable state info
hwclock - state directory for hwclock (will we have hwclock?)
misc - misc. state data
xdm - X display manager var data (if we have this)
<editor> - editor backup files/state
<pkgtool> - packaging support files
<package> - state data for package
local - var data for /usr/local
lock - lock files
all files are of form LCK..*
log - logs
lastlog - last login of each user
messages - system messages
wtmp - record of logins and logouts
mail - mailbox files
all files are just usernames
msgs - reserved for...something?
opt - var data for /opt
preserve - reserved for vi crash saves
run - data for running processes
spool - app spool data
lpd? - printer spool?
printer - spool for given printer
mqueue? - outgoing mail queue?
news - news spool
uucp - uucp spool
tmp - temp files preserved between reboots
yp? - NIS database files?