1

I used the Disks utility to format my 2nd internal ssd. I added a whole-device partition without a name, and added a filesystem (ext4) name. Everything's working ok: it mounts at startup; the filesystem shows on the desktop (although I don't require that; I mostly use terminal). I already copied 400G of files to it, which took hours, so I'd prefer not to reformat it.

Currently to access a directory I have to type, schematically: /media/my-user-name/partition-name/directory-name. I want instead to type /some-short-name/directory-name, where some-short-name is at most three letters.

Now, I know that the shortest mount point name, "/", is already taken :) Disks shows the current mount point as /mnt/long-gibberish-UUID. Being a relative Ubuntu newbie, I guess /media got into the picture because it's a default for non-root storage devices.

What should I do?

brec
  • 233

1 Answers1

2

If you want to change directory to [the file system in] your second drive, 'to-drive-two', I suggest the following alias:

alias 22='cd /media/my-user-name/partition-name/directory-name'

Store it along with the already existing aliases in your bash configuration file ~/.bashrc. (Activate in the current terminal window with source ~/.bashrc; It will be activated automatically in all new terminal windows that you open. So go to drive 2 with the command 22

If you want to use a shortcut, it is called symbolic link in Linux, for example, you can have a link in your home directory (alongside Documents, Downloads etc) to the file system in your second drive,

cd
ln -s '/media/my-user-name/partition-name/directory-name' 2

Then you can use ~/2 instead of the long name when listing files, copying files etc.

sudodus
  • 47,684