Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| zh:docs:guide-user:base-system:user.beginner.cli [2019/11/01 14:17] – [重要的命令] longgenxing | zh:docs:guide-user:base-system:user.beginner.cli [2020/11/10 09:23] – xiu | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// | ||
| - | |||
| ====== Command-line interpreter ====== | ====== Command-line interpreter ====== | ||
| ====== 使用命令行工具 ====== | ====== 使用命令行工具 ====== | ||
| Line 104: | Line 102: | ||
| There is a ton of commands with a ton of options. On a full blown Linux distribution you would issue a '' | There is a ton of commands with a ton of options. On a full blown Linux distribution you would issue a '' | ||
| - | **中文翻译**:系统有巨量的命令还有巨量的选项。在一个完整的Linux发行版本中,你可以使用“man 命令名称”命令来了解命令和它的选项。OpenWrt最小化配备地风格,以至于就没包含这个功能(译者注:指man帮助功能)。所以,你可以在另外一台包含了帮助文件的Linux机器上,或者在网页上去了解帮助内容:比如通过 [[https:// | + | **中文翻译**:系统有巨量的命令还有巨量的选项。在一个完整的Linux发行版本中,你可以使用“man |
| **'' | **'' | ||
| - | **提示** 在火狐浏览器中,你可以使用 [[https:// | + | **中文翻译**:**提示** 在火狐浏览器中,你可以使用 [[https:// |
| ===== editing files ===== | ===== editing files ===== | ||
| + | ===== 文本编辑 ===== | ||
| To edit a file you need an editor, to edit a text file, you would use a text editor. | To edit a file you need an editor, to edit a text file, you would use a text editor. | ||
| + | |||
| + | **中文翻译**:要想编辑文件你得有个编辑器才行,编辑一个文本文件,你就得用文本编辑器。 | ||
| The standard text editor included is '' | The standard text editor included is '' | ||
| Line 117: | Line 118: | ||
| * to enter insert mode press either [i] for // | * to enter insert mode press either [i] for // | ||
| * '' | * '' | ||
| + | |||
| + | **中文翻译**:标准的文本编辑器是'' | ||
| + | * vi编辑器有两种模式:命令行模式 和 插入编辑模式 | ||
| + | * 先按下ESC键进入到命令行模式 | ||
| + | * 先按下键盘i键进入到插入编辑模式,或者按下a键进入到追加编辑模式 | ||
| + | * vi启动时首先进入的是命令行模式 | ||
| === starting vi === | === starting vi === | ||
| + | === 启动vi编辑器 === | ||
| Start with '' | Start with '' | ||
| + | |||
| + | **中文翻译**:使用vi命令启动编辑器。运行'' | ||
| === editing === | === editing === | ||
| + | === 编辑 ==== | ||
| In order to edit the file, you have to be in //insert mode//. Press [i] or [a]. | In order to edit the file, you have to be in //insert mode//. Press [i] or [a]. | ||
| + | |||
| + | **中文翻译**:要编辑一个文件,你就要进入插入编辑模式。按i或者a键进入该模式。 | ||
| === exiting vi === | === exiting vi === | ||
| + | === 退出vi编辑器 === | ||
| In order to get out of vi, you have to be in //command mode//. Press [Esc] (the escape key). Then issue one of the following commands: | In order to get out of vi, you have to be in //command mode//. Press [Esc] (the escape key). Then issue one of the following commands: | ||
| * '': | * '': | ||
| Line 130: | Line 144: | ||
| * '': | * '': | ||
| * '': | * '': | ||
| + | |||
| + | **中文翻译**:为了退出vi编辑器,你必须切换到 命令行模式 才行。按下ESC键就可以进入命令行模式。然后敲下面的这些命令: | ||
| + | * 输入“: | ||
| + | * 输入“: | ||
| + | * 输入“: | ||
| + | * 输入“: | ||
| === configuring vi === | === configuring vi === | ||
| + | === 配置vi编辑器 === | ||
| Vi can be configured in //command mode// by setting certain variables: | Vi can be configured in //command mode// by setting certain variables: | ||
| * '': | * '': | ||
| * '': | * '': | ||
| + | |||
| + | **中文翻译**:vi编辑器的参数可以在命令行模式下进行配置: | ||
| + | * 输入“: | ||
| + | * 输入“: | ||
| === alternative text editors === | === alternative text editors === | ||
| + | === 其他替代的文本编辑器 === | ||
| If you do not like '' | If you do not like '' | ||
| * '' | * '' | ||
| Line 147: | Line 173: | ||
| * You may need to restart the system to let vim be installed properly. | * You may need to restart the system to let vim be installed properly. | ||
| + | **中文翻译**:如果你不喜欢vi编辑器,你可以尝试joe、mg、nano、vim、vim-full、vim-help、vim-rumtime、zile,介绍如下: | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * 还有好多其他的文本编辑器在OpenWrt的软件库里:-) | ||
| + | * 你安装好vim之后得重启设备才能让它正常工作。 | ||
| ===== Scripting language ===== | ===== Scripting language ===== | ||
| + | ===== 脚本语言 ===== | ||
| OpenWrt uses [[https:// | OpenWrt uses [[https:// | ||
| + | **中文翻译**:OpenWrt默认使用 [[https:// | ||
| ===== Executing shell scripts ===== | ===== Executing shell scripts ===== | ||
| + | ===== 执行命令行控制台脚本文件 ===== | ||
| Shell scripts can be executed with: | Shell scripts can be executed with: | ||
| + | |||
| + | **中文翻译**:控制台脚本可以像下面这么执行: | ||
| '' | '' | ||
| Line 157: | Line 196: | ||
| After changing the executable bit its also possible to run it without the sh in front: | After changing the executable bit its also possible to run it without the sh in front: | ||
| + | **中文翻译**:如果修改了文件属性里的执行位,也可以达到不加sh就能执行的目的: | ||
| + | *为文件添加可直接执行的属性 | ||
| < | < | ||
| chmod +x / | chmod +x / | ||
| + | </ | ||
| + | |||
| + | *直接访问并执行文件 | ||
| + | < | ||
| / | / | ||
| </ | </ | ||
| Line 164: | Line 209: | ||
| ===== File Managers ===== | ===== File Managers ===== | ||
| + | ===== 文件管理器 ===== | ||
| You may also want to try '' | You may also want to try '' | ||
| + | |||
| + | **中文翻译**:你可以使用[[wp> | ||
| Line 172: | Line 220: | ||
| ===== Further Help ===== | ===== Further Help ===== | ||
| + | ===== 更多帮助信息 ===== | ||
| * [[https:// | * [[https:// | ||
| * [[http:// | * [[http:// | ||
| + | ===== 翻译信息 ===== | ||
| + | LongGenxing | ||
| + | xiu 20201110 修正了两处错别字 | ||