Mounting drives at boot in Linux
How to set entries in
Or if you have Plasma desktop and want a GUI editor
You’ll need to provide sudo password upon saving the file.
Check mounted location
findmnt --target dir
Mount NAS drive at boot
Add the entry in
/etc/fstab like this.
- The end of sharename (
//192...) should not leave a trailing
- Spaces in sharename should be replaced by
- The local folder you want to mount on (
.../onedrive) should be empty.
uidis not set, it defaults to
root. It could cause some issure for normal users.
/root/.credfor storing username and password instaed of setting
username=<username>,password=<password>in the options.
Then set permission to root only
sudo mount -ato apply changes to
- You may need to enable
NetworkManager-wait-online.servicefor network drives.
tmpfs is a non-persistent (cleared after reboot) temporay filesystem resides in RAM, especially suitable for
/tmp or I/O intensive tasks (e.g. compiling, web servers).
For Linux systems with
/tmp is automatically mounted as
If it’s not the case, there is the script to fix it @AskUbuntu.
An alternative to symlinks.
fstab entry is: