博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ubuntu nano_在Ubuntu Linux上从Nano更改默认编辑器
阅读量:2518 次
发布时间:2019-05-11

本文共 1525 字,大约阅读时间需要 5 分钟。

ubuntu nano

ubuntu nano

Many of the utilities in Ubuntu Linux use a text editor to allow you to edit configuration options and files. An example of this is using the crontab command, which allows you to edit your cron jobs using the default editor.

Ubuntu Linux中的许多实用程序都使用文本编辑器来允许您编辑配置选项和文件。 例如,使用crontab命令,该命令允许您使用默认编辑器编辑cron作业。

It’s really easy to set the default editor using the update-alternatives command. Open up a terminal window and type in the following command:

使用update-alternatives命令设置默认编辑器确实很容易。 打开一个终端窗口,然后输入以下命令:

sudo update-alternatives --config editor

sudo update-alternatives --config editor

Here’s an example of what you’ll see:

这是您将看到的示例:

$ sudo update-alternatives –config editor

$ sudo update-alternatives –配置编辑器

There are 5 alternatives which provide `editor’. Selection Alternative ———————————————– 1 /usr/bin/vim 2 /bin/ed *+ 3 /bin/nano 4 /usr/bin/vim.basic 5 /usr/bin/vim.tiny Press enter to keep the default[*], or type selection number:

提供“编辑器”的有5种选择。 选择选项———————————————– 1 / usr / bin / vim 2 / bin / ed * + 3 / bin / nano 4 /usr/bin/vim.basic 5 / usr / bin / vim.tiny按Enter键保留默认值[*],或输入选择编号:

You can select the editor you want by just typing in the number. For example, if I want to change the default editor to vim, I would just hit the number 1.

您只需输入数字即可选择所需的编辑器。 例如,如果我想将默认编辑器更改为vim,则只需按数字1。

You can test this out by typing in crontab -e to edit your cron file. You should see the editor that you chose, instead of the default.

您可以通过键入crontab -e来编辑cron文件来进行测试。 您应该看到选择的编辑器,而不是默认的编辑器。

翻译自:

ubuntu nano

转载地址:http://welwd.baihongyu.com/

你可能感兴趣的文章
POJ 3311
查看>>
Button MouseEvent颜色变化
查看>>
Volist标签
查看>>
浅谈模块化
查看>>
14个免费访客行为分析工具
查看>>
beego orm关联查询之多对多(m2m)
查看>>
(转)arguments.callee移除AS3匿名函数的侦听
查看>>
onNewIntent调用时机
查看>>
MYSQL GTID使用运维介绍(转)
查看>>
Fail to start neutron-server
查看>>
景安快运挂在磁盘-支持宝塔
查看>>
word中交叉引用不能更新的解决方法
查看>>
高性能HTTP加速器Varnish(概念篇)
查看>>
Linux 如何写makefile文件
查看>>
flutter_webview_plugin 无法加载网页的异常处理
查看>>
bloc控制读写文件
查看>>
微信小程序
查看>>
洛谷 P1059 明明的随机数
查看>>
window自动任务实现数据库定时备份
查看>>
Windows 7 Ultimate(旗舰版)SP1 32/64位官方原版下载(2011年5月12日更新版)
查看>>