20210628 - Upgrade of php fixed the page rendering issue.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
slackbook:working_with_filesystems [2012/09/12 21:34 (UTC)]
mfillpot updated code block to syntax highlighting
slackbook:working_with_filesystems [2012/10/24 09:40 (UTC)] (current)
alienbob [Using mount] Fixed a paragraph which was erroneously copied from the previous chapter
Line 138: Line 138:
 ===== Using mount =====  ===== Using mount ===== 
  
-Unlike other filesystems which hold files and directoriesswap +Now that we've learned what (some of) the different filesystems 
-partitions hold virtual memoryThis is very useful as it prevents the +available in Linux areit's time we looked at how to use them. 
-system from crashing should all your RAM be consumed. Instead, the +In order to read or write data on a filesystem, that filesystem 
-kernel copies portions of the RAM into swap and frees them up for other +must first be mountedTo do this, we (naturally) use mount(8). 
-applications to use. Think of it as adding virtual memory to your +The first thing we must do is decide where we want the filesystem 
-computervery slow virtual memoryswap is typically a fail-safe and +located. Recall that there are no such things are drive letters 
-shouldn'be relied upon for continual use. Add more RAM to your system +denoting filesystems in Linux. Instead, all filesystems are mounted 
-if you find yourself using lots of swap+on directories. The base filesystem on which you install Slackware 
 +is always located at ''/'' and others are always located in 
 +subdirectories of ''/''. ''/mnt/hd'' is a common place to temporarily 
 +locate a partition, so we'll use that in our first example. 
 +In order to mount a filesystem's contents, we must tell mount what 
 +kind of filesystem we havewhere to mount it, and any special 
 +options to use. 
 + 
 +<code> 
 +darkstar:~# mount -t ext3 /dev/hda3 /mnt/hd -o ro 
 +</code> 
 + 
 +Let's disect this. We have an ext3 filesystem located on the third 
 +partition of the first IDE device, and we've decided to mount its 
 +contents on the directory /mnt/hd. Additionally, we have mounted it 
 +read-only so no changes can be made to these contents. The [-t ext3] 
 +argument tells mount what type of filesystem we are using, in this 
 +case it is ext3. This lets the kernel know which driver to use. 
 +Often mount can determine this for itself, but it never hurts to 
 +explicitly declare it. Second, we tell mount where to locate the 
 +filesystem's contents. Here we've chosen ''/mnt/hd''. Finally, 
 +we must decide what options to use if any. These are declared with 
 +the [-o] argument. A short-list of the most common options follows
  
 **Table 11.2. Common mount options** **Table 11.2. Common mount options**
Line 164: Line 186:
  
  
-<code bash>+<code>
 darkstar:~# mount -t vfat /dev/hda4 /mnt/hd -o uid=alan darkstar:~# mount -t vfat /dev/hda4 /mnt/hd -o uid=alan
 </code> </code>
Line 179: Line 201:
  
  
-<code bash>+<code>
 darkstar:~# cat /etc/fstab darkstar:~# cat /etc/fstab
 /dev/hda1        /                reiserfs    defaults                 1 /dev/hda1        /                reiserfs    defaults                 1
Line 195: Line 217:
  
  
-<code bash>+<code>
 darkstar:~# mount /dev/cdrom darkstar:~# mount /dev/cdrom
 darkstar:~# mount /home darkstar:~# mount /home
Line 224: Line 246:
  
  
-<code bash>+<code>
 darkstar:~# chmod +x /etc/rc.d/rc.rpc darkstar:~# chmod +x /etc/rc.d/rc.rpc
 darkstar:~# /etc/rc.d/rc.rpc start darkstar:~# /etc/rc.d/rc.rpc start
Line 236: Line 258:
  
  
-<code bash>+<code>
 darkstar:~# mount -t nfs darkstar.example.com:/home /home darkstar:~# mount -t nfs darkstar.example.com:/home /home
 </code> </code>
Line 293: Line 315:
  
  
-<code bash>+<code>
 darkstar:~# mount -t cifs //darkstar/home /home -o username=alan,password=secret darkstar:~# mount -t cifs //darkstar/home /home -o username=alan,password=secret
 </code> </code>
Line 313: Line 335:
  
  
-<code bash>+<code>
 darkstar:~# echo "username=alan" > /etc/creds-home darkstar:~# echo "username=alan" > /etc/creds-home
 darkstar:~# echo "password=secret" >> /etc/creds-home darkstar:~# echo "password=secret" >> /etc/creds-home

In Other Languages
QR Code
QR Code slackbook:working_with_filesystems (generated for current page)