brain initiation
This commit is contained in:
27
20230710105621-mounting.org
Normal file
27
20230710105621-mounting.org
Normal file
@@ -0,0 +1,27 @@
|
||||
:PROPERTIES:
|
||||
:ID: c69a77dc-f87f-418c-9870-eedddc43be37
|
||||
:END:
|
||||
#+title: mounting
|
||||
#+filetags: :basics:
|
||||
|
||||
"Mounting" is the process of adding a file system in the existing directory structure. This mounting is necessary to be able to access files of a file system with usual programs. File systems are mounted by means of the ~mount~ program. It is possible to mount file systems temporarily until the next reboot of the system, as well as to anchor the mounts permanently in the system. Temporary mounts are made using the mount command, permanent mounts are entered in the fstab file.
|
||||
There are varying things you can mount. The most prominent option to mount a hard-disk or a folder. To mount a hard-disk you first have to locate the drive you want to mount. This can be done via command line with the tool ~lsblk~ (list blocks). To do that you only have to type the command into the command line:
|
||||
|
||||
#+begin_src bash
|
||||
lsblk
|
||||
#+end_src
|
||||
The output of this command shows the disks that are mounted or ready to mount. As an example the output of [[id:d54bf885-a702-48bb-b108-e9e982bc5952][server-w0]] with the additional hard-disk sda1 mounted to the file system at ~/run/media/smad~
|
||||
#+begin_src bash
|
||||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
||||
sda 8:0 0 465,8G 0 disk
|
||||
└─sda1 8:1 0 465,8G 0 part /run/media/smad
|
||||
nvme0n1 259:0 0 931,5G 0 disk
|
||||
├─nvme0n1p1 259:1 0 300M 0 part /boot/efi
|
||||
└─nvme0n1p2 259:2 0 931,2G 0 part /
|
||||
#+end_src
|
||||
If the Disk you want to mount is not listed in the output of the ~lsblk~ command, then either the drive is not connected or encrypted. If you found your drive and want to mount it to a specific folder, the folder has first to be created, othrtwise the input will be refused. To do that type with [[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]]: ~sudo(optional) mkdir <path/to/folder/foldername>~ in the shell. If that did succesfully create the folder mount the device with the mount command:
|
||||
|
||||
#+begin_src bash
|
||||
sudo mount /dev/<name-of-device> /path/to/mountpoint
|
||||
#+end_src
|
||||
You can choose any location for the mountpoint tho it is in most cases done in the ~/run/media/~ or the ~/mount~ directory. If needed you can change the owner of the directory you created if you had to do so as [[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]].
|
||||
Reference in New Issue
Block a user