Linux Fundamentals
Useful to know (when you forget where new things get installed)
| Path | Description |
|---|---|
/ | 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. |
/bin | Contains essential command binaries. |
/boot | Consists of the static bootloader, kernel executable, and files required to boot the Linux OS. |
/dev | Contains device files to facilitate access to every hardware device attached to the system. |
/etc | Local system configuration files. Configuration files for installed applications may be saved here as well. |
/home | Each user on the system has a subdirectory here for storage. |
/lib | Shared library files that are required for system boot. |
/media | External removable media devices such as USB drives are mounted here. |
/mnt | Temporary mount point for regular filesystems. |
/opt | Optional files such as third-party tools can be saved here. |
/root | The home directory for the root user. |
/sbin | This directory contains executables used for system administration (binary system files). |
/tmp | The 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. |
/usr | Contains executables, libraries, man files, etc. |
/var | This 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 devicessane-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 detailsusb_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 devicesusbipd (8) - USB/IP server daemonusbmuxd (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