linux终端如何打开文件夹,如何从终端打开文件夹(带GUI)?

问题描述

我想在我的统一面板(ubuntu 12.10)中放置一个链接/快捷方式/启动器。

我在handytutorial.com上按照this tutorial创建了一个自定义启动器并将其拖到面板上。

我只需要知道我必须输入哪个命令。这可能吗?

最佳解决方案

gnome-open在12.04对我不起作用,但打开nautilus /path确实有效。

例如:nautilus /home/john/Downloads。

次佳解决方案

如果问题是如何打开文件/文件夹,答案总是xdg-open。

xdg-open opens a file or URL in the user’s preferred application. If a URL is provided the URL will be opened in the user’s preferred web browser. If a file is provided the file will be opened in the preferred application for files of that type. xdg-open supports file, ftp, http and https URLs.

在这个特定情况下的命令

xdg-open folder

在默认文件管理器中打开文件夹,无论是Nautilus,Dolphin,Thunar还是其他任何东西。

第三种解决方案

打开文件夹的快捷方式?如果这是你想要的,那么命令是:

gnome-open

例如:gnome-open /home/Tiago/Downloads。

如果未安装,请运行sudo apt-get install libgnome2-bin。

第四种方案

使用命令nautilus 。

例如:nautilus /home/oaskamay将打开我的家(~)文件夹。

此外,如果您需要具有root权限的open-up GUI,请运行gksu nautilus 。它也适用于每个GUI front-ends(例如gksu gedit /etc/default/grub)。

重要的是要注意,你永远不应该像sudo gedit /etc/default/grub那样启动GUI应用程序。

第五种方案

xdg-open适用于ubuntu 16.04。我只将此命令的副本复制为open:

sudo cp /usr/bin/xdg-open /usr/bin/open

sudo chmod 775 /usr/bin/open

现在你可以像在mac os上一样使用它:

open ./

参考资料

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值