Questions tagged [filesystem]

Questions dealing with Ubuntu's layout of files, permissions, and files that reside in special locations on disk.

In Ubuntu, as in other Linux systems, files are arranged in a single tree with everything under / : the root directory.

A useful reference is the Linux Filesystem Hierarchy Standard, which sets out requirements and guidelines for Unix-like file systems in detail.

Some examples: the kernel and bootloader files are found in /boot, system executables are usually in /bin /usr and /sbin, configuration files are mostly found in /etc, variable files, such as system logs, are in /var, and normal users' home directories are in /home.

A key attribute of Linux file systems is the control of permissions for each file in the system. This stems from the design of Unix systems as inherently multi-user. Files are always owned by some user and some group, and the ability to read, change or "execute" a file are separately defined for the owner, the group, and everyone else. Normal users own the files in their home directories, while the majority of other files are owned by root. In Ubuntu, root normally has no password, and normal users gain permission to modify files owned by other users, including root, with the use of sudo.

A simplified graphical summary:

2698 questions
1076
votes
13 answers

How do I determine the total size of a directory (folder) from the command line?

Is there a simple command to display the total aggregate size (disk usage) of all files in a directory (folder)? I have tried these, and they don't do what I want: ls -l, which only displays the size of the individual files in a directory, nor df…
David Barry
  • 10,863
  • 3
  • 15
  • 8
624
votes
23 answers

How do I free up more space in /boot?

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates. After…
user6722
  • 6,515
  • 3
  • 15
  • 13
451
votes
2 answers

Mount error: "unknown filesystem type 'exfat'"

When trying to mount an exfat filesystem, I get the following error: Error mounting /dev/sda6 at /media/gkp/Backup: Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid" "/dev/sda6" "/media/gkp/Backup"' exited with non-zero exit status…
Ganesh
  • 4,519
  • 2
  • 11
  • 3
432
votes
2 answers

Differences between /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin

I have six directories with command files. These are /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin and /usr/local/sbin. What are the differences between these? If I'm writing my own scripts, where should I add them? Related: How to understand…
user125111
373
votes
8 answers

How is the /tmp directory cleaned up?

How is the /tmp directory cleaned up? Is it automatic? If so, how frequently is it cleaned up?
Olivier Lalonde
  • 55,051
  • 62
  • 122
  • 146
349
votes
6 answers

fsck error on boot: /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

I dual boot Ubuntu and Windows 7. I was browsing on FireFox in Ubuntu and all of a sudden I get some error message, so I rebooted. Now when I try to boot into Ubuntu I get this message: fsck from util-linux 2.26.2 /dev/sda6 contains a file system…
Jordy
  • 3,591
  • 3
  • 12
  • 4
319
votes
11 answers

How do I view all available HDD's/partitions?

I found a 6 GB IDE HDD in my basement. I want to plug it in and see what might be on it. The drive seems to be recognized in BIOS. I can't find it in Ubuntu to view files, and Ubuntu is the only OS on that particular computer. I was wondering if…
Casey Hungler
  • 3,481
  • 4
  • 17
  • 15
283
votes
19 answers

How can I securely erase a hard drive?

I'm planning on selling a USB external hard drive that currently contains an old Ubuntu installation with stored passwords and banking information. How can I securely erase the drive before selling it?
ændrük
  • 74,042
  • 71
  • 228
  • 362
253
votes
6 answers

How to understand the Ubuntu file system layout?

In Windows there’re perhaps only a couple of important folders (by important I mean important in my logical picture of the Windows file system) in the installation drive (in my case C:\). Namely Program Files and Windows. I simply stay away from…
Shashank Sawant
  • 2,799
  • 5
  • 18
  • 23
251
votes
3 answers

What is the difference between /etc/init/ and /etc/init.d/?

What is the difference between /etc/init/ and /etc/init.d/? More generally, what meaning does the .d suffix convey to a directory?
Olivier Lalonde
  • 55,051
  • 62
  • 122
  • 146
225
votes
10 answers

What is the Linux equivalent to Windows' Program Files?

Under Windows, most applications and application data are stored in a special directory known as C:\Program Files (and occasionally C:\Program Files (x86)). What is the Ubuntu/Linux equivalent to this path? Is there even one?
user11154
219
votes
6 answers

How do I remount a filesystem as read/write?

I'm trying to mount an hfsplus filesystem in a Xubuntu 12.04 VM (kernel version 3.2.0-23-generic) but when I type mount -o remount,rw /dev/sdb3 in command line it returns not mounted or bad option. Any help would be appreciated.
Alkthree
  • 2,497
  • 2
  • 15
  • 13
206
votes
19 answers

How to fix "sudo: unable to open ... Read-only file system"?

The title might not be as descriptive as I would like it to be but couldn't come up with a better one. My server's file system went into Read-only. And I don't understand why it does so and how to solve it. I can SSH into the server and when trying…
John
  • 2,233
  • 2
  • 15
  • 11
198
votes
4 answers

Why are hard links not allowed for directories?

I am using Ubuntu 12.04. When I try to create a hard link for any directory, it fails. I can create hard links for files inside file system boundary. I know the reason why we cannot create hardlinks for files beyond file system. I tried these…
Nischay
  • 3,473
  • 3
  • 18
  • 24
177
votes
4 answers

How to get a drive formatted with exfat working?

In Ubuntu 13.04 there was an option to use the PPA by Relan in order to get ExFat functionality. Seeing that in Ubuntu this functionality is now available from the repositories without the PPA I tried this but failed to make it work. So my question…
davorao
  • 6,909
  • 6
  • 20
  • 18
1
2 3
99 100