linux在mnt下创建目录
时间: 2023-06-05 14:47:21 浏览: 573
要在Linux的/mnt目录下创建一个新目录,可以使用以下命令:
```
sudo mkdir /mnt/new_directory
```
其中,sudo是以管理员权限运行命令,mkdir是创建目录的命令,/mnt/new_directory是要创建的目录路径。如果需要创建多级目录,可以使用-p选项,例如:
```
sudo mkdir -p /mnt/new_directory/sub_directory
```
这将在/mnt目录下创建一个名为new_directory的目录,并在其中创建一个名为sub_directory的子目录。
相关问题
linux mnt目录是什么
Linux中的/mnt目录是一个用于挂载文件系统的目录。它通常用于挂载外部设备,如USB驱动器、CD-ROM或网络文件系统。在挂载设备之前,需要先创建/mnt目录。挂载设备后,可以在/mnt目录下访问设备中的文件和目录。
linux中mnt/hgfs下为空
在Linux中,`/mnt/hgfs`目录通常用于挂载共享文件夹。如果你发现`/mnt/hgfs`目录为空,可能是因为没有成功挂载共享文件夹。
要挂载共享文件夹到`/mnt/hgfs`目录,你可以按照以下步骤操作:
1. 确保你已经安装了 VMware Tools(如果你是在 VMware 虚拟机中运行 Linux)或者 open-vm-tools(如果你是在虚拟机中运行 Linux)。
2. 打开终端,并使用以下命令创建一个新的目录来挂载共享文件夹:
```
sudo mkdir /mnt/hgfs
```
3. 使用以下命令挂载共享文件夹(假设共享文件夹的名称为`shared_folder`):
```
sudo mount -t vmhgfs .host:/shared_folder /mnt/hgfs
```
如果你在 VMware 虚拟机中运行 Linux,请使用以下命令挂载共享文件夹:
```
sudo vmhgfs-fuse .host:/shared_folder /mnt/hgfs
```
4. 现在,你应该能够在`/mnt/hgfs`目录下看到共享文件夹中的内容了。
如果你按照以上步骤操作仍然无法在`/mnt/hgfs`目录下看到共享文件夹的内容,请确保已经正确安装并配置了 VMware Tools 或 open-vm-tools,并且共享文件夹的名称和路径是正确的。
相关推荐
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)