Ubuntu 简明教程
Ubuntu - Command Line
Ubuntu 是一个基于 Linux 的操作系统,而大多数 Linux 用户更熟悉命令行界面。在本教程中,我们将介绍在 Ubuntu 中使用的一些流行命令行。
Ubuntu is a Linux based operating system and most Linux users are more familiar with the command line interface. In this chapter, we will go through some of the popular command line’s used in Ubuntu.
Invoking the Command Line
要调用命令行,请转到搜索选项,并在搜索框中输入命令关键字。
To invoke the command line, go to the search option and enter the command keyword in the search box.

搜索结果将显示“终端”选项。双击以获取命令行,如下图所示。
The search result will give the Terminal option. Double-lick to get the command line as shown in the following screenshot.

Directory Listing
最容易开始的命令是目录列表命令,用于列出目录内容。
The easiest command to start with, is the directory listing command which is used to list the directory contents.
Parameters
-
Option − These are the options to be specified with the ls command.
-
Directoryname − This is the optional directory name that can be specified along with the ls command.
Example
在以下示例中,我们只需发出 ls 命令即可列出目录内容。
In the following example, we just issue the ls command to list the directory contents.

当前目录的目录列表将显示为输出。
The directory listing of the current directory will be shown as the output.
ls 命令的另一种变体是列出目录,但在每行项目上显示更多详细信息。这在以下屏幕截图中使用 ls –l 命令显示。
Another variant of the ls command is to list the directory, but with more details on each line item. This is shown in the following screenshot with the ls –l command.

Command Help
若要获取有关命令的更多信息,我们可以使用“ man ”命令。
To get more information on a command, we can use the ‘man’ command.