Automatically mount at startup: Difference between revisions

From WickyWiki
mNo edit summary
m typo
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
[[Category:201604]]
[[Category:201604]]


TODO / DOING
To find the correct UUID of your drive:


See
<syntaxhighlight lang=bash>
* https://help.ubuntu.com/community/AutomaticallyMountPartitions
blkid
</syntaxhighlight>
 
Returns:
 
<blockquote>
<pre>
...
/dev/sda2: LABEL="Ubuntu" UUID="12312312312312312" TYPE="ext4"
/dev/sda3: LABEL="Data" UUID="45645645645645645" TYPE="ntfs"
...
</pre>
</blockquote>
 
To get your user-id:
 
<syntaxhighlight lang=bash>
id -u $USERNAME
</syntaxhighlight>
 
Or:
 
<syntaxhighlight lang=bash>
echo $UID
</syntaxhighlight>


Edit fstab:
Now edit fstab:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
sudo gedit /etc/fstab
sudo gedit /etc/fstab
</syntaxhighlight>
</syntaxhighlight>
Add the following line:
<blockquote>
<pre>
...
UUID=45645645645645645 /media/Data auto defaults,uid=1000,nosuid,nodev,nofail,x-gvfs-show 0 0
...
</pre>
</blockquote>
For more info on the possible options:
* https://help.ubuntu.com/community/AutomaticallyMountPartitions


See also:
See also:
* [[Trashcan support on NTFS volumes]]
* [[Nautilus action when media inserted]]
* [[Nautilus action when media inserted]]
* [[Require sudo password for mounting]]
* [[Require sudo password for mounting]]
* [[Nautilus disable auto mount]]
* [[Nautilus disable auto mount]]

Latest revision as of 07:10, 14 May 2016


To find the correct UUID of your drive:

blkid

Returns:

...
/dev/sda2: LABEL="Ubuntu" UUID="12312312312312312" TYPE="ext4" 
/dev/sda3: LABEL="Data" UUID="45645645645645645" TYPE="ntfs" 
...

To get your user-id:

id -u $USERNAME

Or:

echo $UID

Now edit fstab:

sudo gedit /etc/fstab

Add the following line:

...
UUID=45645645645645645 /media/Data auto defaults,uid=1000,nosuid,nodev,nofail,x-gvfs-show 0 0
...

For more info on the possible options:

See also: