使用Kubuntu运行命令对话框(Alt + F2)

Kubuntu linux is a variant of Ubuntu that uses the KDE desktop environment instead of Gnome. The KDE desktop can be installed on Ubuntu easily, however.

Kubuntu linux是Ubuntu的一种变体,它使用KDE桌面环境而不是Gnome。 但是,可以轻松地将KDE桌面安装在Ubuntu上

The quickest way to run a command on Ubuntu or Kubuntu is to use the Alt+F2 shortcut key. This pops up a dialog that looks like this:

在Ubuntu或Kubuntu上运行命令的最快方法是使用Alt + F2快捷键。 这会弹出一个对话框,如下所示:

You can type any command that you would regularly use from a terminal window and it will run. Using the Options button gives you a number of other interesting options. Let’s try a simple ls -l command:

您可以在终端窗口中键入通常要使用的任何命令,它将运行。 使用“选项”按钮可为您提供许多其他有趣的选项。 让我们尝试一个简单的ls -l命令:

We’ve checked the “Run in terminal window” checkbox so that the output of the command will show up in a terminal window. On Ubuntu this doesn’t seem to work right, but in Kubuntu or KDE this is really useful. Either hit enter or click the Run button, and you’ll see something like this:

我们已经选中了“在终端窗口中运行”复选框,以便命令的输出将显示在终端窗口中。 在Ubuntu上,这似乎无法正常工作,但是在Kubuntu或KDE中,这确实有用。 按Enter键或单击“运行”按钮,您将看到类似以下内容:

This is extremely useful for quickly getting the results of commands like ifconfig where you just need the output of the command.

这对于快速获取仅需要命令输出的ifconfig之类的命令的结果非常有用。

Another neat feature is that the Run Command remembers the settings for each command. In the last command we typed ‘ls -l’ and checked the “run in terminal window” box. When we type in something else, the settings are defaulted:

另一个简洁的功能是,“运行命令”会记住每个命令的设置。 在最后一个命令中,我们键入“ ls -l”并选中“在终端窗口中运行”框。 当我们输入其他内容时,默认设置为:

But if we start typing ‘ls -l’ again, it automatically checks the checkbox that we set before:

但是,如果我们再次开始输入'ls -l',它将自动检查我们之前设置的复选框:

The other options include running a command as a different user and setting the priority of the command. For the most part, you’ll just type sudo or gksu before the command if it needs to run as root, but if you were trying to run a command as a different user entirely, it would be useful.

其他选项包括以其他用户身份运行命令以及设置命令的优先级。 在大多数情况下,如果命令需要以root用户身份运行,则只需在命令前键入sudo或gksu,但是如果您尝试完全以其他用户身份运行命令,则将很有用。

翻译自: https://www.howtogeek.com/howto/ubuntu/using-the-kubuntu-run-command-dialog-altf2/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值