Linux Fundamentals

Useful to know (when you forget where new things get installed)

PathDescription
/The top-level directory is the root filesystem and contains all of the files required to boot the operating system before other filesystems are mounted, as well as the files required to boot the other filesystems. After boot, all of the other filesystems are mounted at standard mount points as subdirectories of the root.
/binContains essential command binaries.
/bootConsists of the static bootloader, kernel executable, and files required to boot the Linux OS.
/devContains device files to facilitate access to every hardware device attached to the system.
/etcLocal system configuration files. Configuration files for installed applications may be saved here as well.
/homeEach user on the system has a subdirectory here for storage.
/libShared library files that are required for system boot.
/mediaExternal removable media devices such as USB drives are mounted here.
/mntTemporary mount point for regular filesystems.
/optOptional files such as third-party tools can be saved here.
/rootThe home directory for the root user.
/sbinThis directory contains executables used for system administration (binary system files).
/tmpThe operating system and many programs use this directory to store temporary files. This directory is generally cleared upon system boot and may be deleted at other times without any warning.
/usrContains executables, libraries, man files, etc.
/varThis directory contains variable data files such as log files, email in-boxes, web application related files, cron files, and more.

Explainshell may be useful if something gets proper donked.

Otherwise some combination of -h --help or just a bare command with no arguments churns out all kinds of info without delving into man pages.

EG: git --help

pwd is “where am I?”

apropos is probably gonna be super useful. Kinda finds all the instances of the search term in available commands (if I can’t recall the specific name of a command, but think it exists) EG: apropos usb will spit out:

bhp-config_usb_printer (1) - HP device config us… ipp-usb (8) - Daemon for IPP over USB … lsusb (8) - list USB devices sane-canon630u (5) - SANE backend for the Can… sane-canon_lide70 (5) - SANE backend for the Ca… sane-cardscan (5) - SANE backend for Corex C… sane-epjitsu (5) - SANE backend for Epson-b… sane-find-scanner (1) - find SCSI and USB scann… sane-genesys (5) - SANE backend for GL646, … sane-gt68xx (5) - SANE backend for GT-68XX… sane-kvs1025 (5) - SANE backend for Panason… sane-kvs20xx (5) - SANE backend for Panason… sane-kvs40xx (5) - SANE backend for Panason… sane-ma1509 (5) - SANE backend for Mustek … sane-mustek_usb (5) - SANE backend for Mustek … sane-mustek_usb2 (5) - SANE backend for SQ113 b… sane-pieusb (5) - SANE backend for USB-con… sane-plustek (5) - SANE backend for LM983[1… sane-sm3600 (5) - SANE backend for Microte… sane-sm3840 (5) - SANE backend for Microte… sane-u12 (5) - SANE backend for Plustek… sane-usb (5) - USB configuration tips f… usb-devices (1) - print USB device details usb_modeswitch (1) - control the mode of 'mul… usb_modeswitch_dispatcher (1) - Linux wrapper f… usb_printerid (1) - prints the ID of the pri… usbhid-dump (8) - dump USB HID device repo… usbip (8) - manage USB/IP devices usbipd (8) - USB/IP server daemon usbmuxd (8) - Expose a socket to multi… usbreset (1) - send a USB port reset to

Ok, hackthebox is a bit too particular on its quizes. “bin/bash” and “bash” were incorrect. “/bin/bash” was the right answer. Frustrate.

13:41 into the sudo vid