suid - Allow the operation of suid, and sgid bits. They are mostly used to allow users on a computer system to execute binary executables with temporarily elevated privileges in order to perform a specific task.

nodiratime - Do not update directory inode access times on the filesystem. Can help performance (see atime options).

relatime - Update inode access times relative to modify or change time. Access time is only updated if the previous access time was earlier than the current modify or change time. (Similar to noatime, but doesn't break mutt or other applications that need to know if a file has been read since the last time it was modified.) Can help performance (see atime options).

flush - The vfat option to flush data more often, thus making copy dialogs or progress bars to stay up until all data is written.

تلميحات و حيل

معرف قسم التبديل Swap UUID

In case your swap partition doesn't have an UUID, you can add it manually. This happens when the UUID of the swap is not shown with the lsblk -f command. Here are some steps to assign a UUID to your swap:

Identify the swap partition:

# swapon -s

Disable the swap:

# swapoff /dev/sda7

Recreate the swap with a new UUID assigned to it:

# mkswap -U random /dev/sda7

Activate the swap:

# swapon /dev/sda7

Filepath spaces

If any mountpoint contains spaces, use the escape character \ followed by the 3 digit octal code 040 to emulate them:

اﻷقراص الخارجية

External devices that are to be mounted when present but ignored if absent may require the nofail option. This prevents errors being reported at boot.

/etc/fstab

/dev/sdg1 /media/backup jfs defaults,nofail 0 2

خيارات atime

The use of noatime, nodiratime or relatime can improve drive performance. Linux by default uses atime, which keeps a record (writes to the drive) every time it reads anything. This is more purposeful when Linux is used for servers; it doesn't have much value for desktop use. The worst thing about the default atime option is that even reading a file from the page cache (reading from memory instead of the drive) will still result in a write! Using the noatime option fully disables writing file access times to the drive every time you read a file. This works well for almost all applications, except for a rare few like Mutt that need the such information. For mutt, you should only use the relatime option. Using the relatime option enables the writing of file access times only when the file is being modified (unlike noatime where the file access time will never be changed and will be older than the modification time). The nodiratime option disables the writing of file access times only for directories while other files still get access times written. The best compromise might be the use of relatime in which case programs like Mutt will continue to work, but you'll still have a performance boost because files will not get access times updated unless they are modified.

Note:noatime already includes nodiratime. You do not need to specify both.[1]

نظام ملفات tmpfs

tmpfs is a temporary filesystem that resides in memory and/or your swap partition(s), depending on how much you fill it up. Mounting directories as tmpfs can be an effective way of speeding up accesses to their files, or to ensure that their contents are automatically cleared upon reboot.

Some directories where tmpfs is commonly used are /tmp, /var/lock and /var/run. Do NOT use it on /var/tmp, because that folder is meant for temporary files that are preserved across reboots. Arch uses a tmpfs /run directory, with /var/run and /var/lock simply existing as symlinks for compatibility. It is also used for /tmp in the default /etc/fstab.

Note: When using systemd, temporary files in tmpfs directories can be recreated at boot by using tmpfiles.d.

By default, a tmpfs partition has its maximum size set to half your total RAM, but this can be customized. Note that the actual memory/swap consumption depends on how much you fill it up, as tmpfs partitions do not consume any memory until it is actually needed.

To use tmpfs for /tmp, add this line to /etc/fstab:

/etc/fstab

tmpfs /tmp tmpfs nodev,nosuid 0 0

You may or may not want to specify the size here, but you should leave the mode option alone in these cases to ensure that they have the correct permissions (1777). In the example above, /tmp will be set to use up to half of your total RAM. To explicitly set a maximum size, use the size mount option:

/etc/fstab

tmpfs /tmp tmpfs nodev,nosuid,size=2G 0 0

Here is a more advanced example showing how to add tmpfs mounts for users. This is useful for websites, mysql tmp files, ~/.vim/, and more. It's important to try and get the ideal mount options for what you are trying to accomplish. The goal is to have as secure settings as possible to prevent abuse. Limiting the size, and specifying uid and gid + mode is very secure. For more information on this subject, follow the links listed in the #See also[broken link: invalid section] section.

See the mount command man page for more information. One useful mount option in the man page is the default option. At least understand that.

Reboot for the changes to take effect. Note that although it may be tempting to simply run mount -a to make the changes effective immediately, this will make any files currently residing in these directories inaccessible (this is especially problematic for running programs with lockfiles, for example). However, if all of them are empty, it should be safe to run mount -a instead of rebooting (or mount them individually).

After applying changes, you may want to verify that they took effect by looking at /proc/mounts and using findmnt:

طرق الاستخدام

Generally, I/O intensive tasks and programs that run frequent read/write operations can benefit from using a tmpfs folder. Some applications can even receive a substantial gain by offloading some (or all) of their data onto the shared memory. For example, relocating the Firefox profile into RAM shows a significant improvement in performance.

Improving compile times

Note: The tmpfs folder (/tmp, in this case) needs to be mounted without noexec, else it will prevent build scripts or utilities from being executed. Also, as stated above[broken link: invalid section], the default size is half of the available RAM so you may run out of space.

You can run makepkg with a tmpfs folder for the build directory (which is also a setting in /etc/makepkg.conf):

$ BUILDDIR=/tmp/makepkg makepkg

الكتابة على قسم FAT32 كمستخدم عادي

To write on a FAT32 partition, you must make a few changes to your /etc/fstab file.

/etc/fstab

/dev/sdxY /mnt/some_folder vfat user,rw,umask=000 0 0

The user flag means that any user (even non-root) can mount and unmount the partition /dev/sdX. rw gives read-write access;
umask option removes selected rights - for example umask=111 remove executable rights. The problem is that this entry removes executable rights from directories too, so we must correct it by dmask=000. See also Umask.

Without these options, all files will be executable. You can use the option showexec instead of the umask and dmask options, which shows all Windows executables (com, exe, bat) in executable colours.

For example, if your FAT32 partition is on /dev/sda9, and you wish to mount it to /mnt/fat32, then you would use: