Skip to content

Commit

Permalink
update file system "special names" to correct /usr
Browse files Browse the repository at this point in the history
Made some other small changes, but this was mainly to "fix" the misleading
"/usr is 'user'" nmemonic.
See https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/usr.html
  • Loading branch information
davewhiteland committed Sep 13, 2024
1 parent 8a347ad commit 8a5ecb8
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions collections/_file-system/special-filenames.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,40 @@ Some filenames have special meaning:
| name | meaning |
| --------- | -------------------------------------------------------------------- |
| `.config`<br>`.secrets` | Filenames beginning with `.` are [hidden files]({{ site.baseurl }}/files/hidden files) and will not normally be displayed when you ask for a directory listing. |
| `~` | Your home directory.<br>This is usually the current directory when you first log in. |
| `~` | Your home directory.<br>This is the current directory when you first log in. If you make or download any files, this is where you usually save them. |
| `~olivia` | User `olivia`'s home directory (you won't necessarily have [permission]({{ site.baseurl }}/files/permissions) to look inside it). |

Most Unix systems have conventions for the name of system directories too. A
few of them are described below. It's a good idea to become familiar with these
so you can find your way about. Remember these are only conventions, so
individual systems can — and will — do things differently:
individual systems might do things a little differently:

| name | use |
| ---------- | --------------------------------------------------------------- |
| `/bin` | Binary files — files that contain the instructions the machine follows for implementing commands or programs. |
| `/home` | Often the directory containing all the users' home directories. |
| `/sbin` | System binaries, like `/bin` but with executables critical for system operation.|
| `/tmp` | Temporary files |
| `/usr` | "User" files — generally more for the users than the system. |
| `/bin` | Binary files — files that contain the instructions the machine follows for implementing commands or fundamental utilities. |
| `/dev` | Devices — file representations of things like printers and terminals. |
| `/home` | The directory containing each user's home directory. For example, Olivia's home directory would be `/home/olivia` (which is the [absolute file path](../absolute-paths) of `~olivia`, above). |
| `/sbin` | System binaries, like `/bin` but with executables critical for system operation. |
| `/tmp` | Temporary files. |
| `/usr `<a href="#footnote-1"><sup>1</sup></a> | Executables, libraries, and shared resources that are not part of the core system. |
| `/var` | "Variable" files — files expected to change a lot. |
| `/var/log` | System log files. |
| `/var/tmp` | Temporary files. |


Note that these are all conveniently expressed as
[absolute file paths](../absolute-paths): they are found in the
[root directory](../root).

<p class="footnote"><sup id="footnote-1">1</sup>
Originally, <code class="language-plaintext highlighter-rouge">/usr</code>
was an abbreviation for "user" because it contained the users' files, but in
today's Unix systems that's what the
<code class="language-plaintext highlighter-rouge">/home</code> directory is
for. So it's more helpful to remember
<code class="language-plaintext highlighter-rouge">/usr</code> as an
abbreviation of "user system resources". If you install a new application,
it probably ends up here.
</p>



Expand Down

0 comments on commit 8a5ecb8

Please sign in to comment.