4 ms·
I can't think of any guides. I picked up most of my know-how through using Linux (Ubuntu, specifically). A couple things for you which may be obvious, but a go
by tbirrell 10y ago
I can't think of any guides. I picked up most of my know-how through using Linux (Ubuntu, specifically).
A couple things for you which may be obvious, but a good place to start nonetheless:
/ - This is Root. Most of your system files are in this directory.
/home/username/ - This is your home directory, a common abbreviation is "~/" (tilde). If you are a windows user, this is the equivalent of the file system you are used to using. In this directory are also many dot files (.ssh/, .local/, etc). these are (usually hidden) system files that are specific to your user. Generally, there are defaults in / (root) and these files customize them for your user only.
Knowing these two things and a handful of basic commands will allow you to get started. Look into the commands 'cd', 'pwd', 'ls', 'sudo', 'touch', 'mkdir'.
- slau 10y agoJust to clarify: you typically don't have any files under `/`. It is literally the `root` of the directory structure. Nothing else. It could theoretically not be mounted at all, if all subdirectories are mounted individually (or it used to, I'm not convinced that's still the case). In addition, you most typically wouldn't find the defaults in `/`, for the reason listed above. The default files copied over by the `useradd` (or `adduser`) command are usually sourced from `/etc/skel`. To answer the OPs question, there are a number of differences in the way different distributions choose to implement their directory structure. That, and the default packages they ship with are the whole reason they exist. My best recommendation is to pick a distro, and learn the generalities you can from it. Most configurations are found in `/etc/`. Most defaults can be found in `/etc/default`. `/opt` is usually after market software, or placed there to not conflict with the base system (for example, the Fedora/CentOS SCL installs newer toolsets, such as GCC/LD/Make into `/opt, though loads of proprietary software also installs there to not have to bother with proper packaging). `/usr` will be where all the system-provided tools and documentation will live. `/var` is used by programs and daemons to store their state. Any directory can live on a different partition or disk. Use the `df -h` command to get an overview of your mount points. Also, unlike Windows, a disk or partition doesn't live next to all the others. They can all be interleaved into the root directory structure. Just because `/` is only 5GB doesn't mean you can't have a 2TB home directory or 30GB of programs and librairies installed.
- loeg 10y ago> It could theoretically not be mounted at all, if all subdirectories are mounted individually (or it used to, I'm not convinced that's still the case). The submounts need something to mount on. Root could conceivably be an in-memory only filesystem with a few directories automatically populated for submounts to mount on, though.
- Hello71 10y agothat's called initramfs.
- throwawayish 10y agoIn the case of Linux there's actually a (specially renamed) instance of a tmpfs mounted on /. Usually the real system root is mounted over that.