本文共 3973 字,大约阅读时间需要 13 分钟。
Windows, MacOS and Linux have command line interfaces. Windows’ default command line is the command prompt. The command prompt allows users to use their computer without pointing and clicking with a mouse.
Windows,MacOS和Linux具有命令行界面。 Windows的默认命令行是命令提示符。 命令提示符允许用户使用计算机而无需用鼠标指向和单击。
The command prompt is a black screen where users type commands to use their computer. The same tasks that can be done by pointing and clicking with a mouse can also be done with the command prompt. The difference is that many tasks such as creating folders and deleting files can be done faster in the command prompt.
命令提示符是黑屏,用户可以在其中键入命令以使用其计算机。 通过鼠标指向和单击可以完成的相同任务也可以在命令提示符下完成。 区别在于,可以在命令提示符下更快地完成许多任务,例如创建文件夹和删除文件。
Also, it allows users to configure their computer and run programs that they otherwise could not do by pointing and clicking.
此外,它还允许用户通过单击来配置计算机并运行他们原本无法执行的程序。
To access the command prompt, click the windows start menu on the Desktop tool bar (you can also press the windows button on your keyboard) and type cmd
and hit enter
. The command prompt will appear, it will display some text like to following below:
要访问命令提示符,请单击桌面工具栏上的Windows开始菜单(也可以按键盘上的Windows按钮),然后键入cmd
并按enter
。 将出现命令提示符,它将显示一些文本,如下所示:
C:\Users\YourUserName>
C:\Users\YourUserName
is called your current working directory (directory is another way to say folder). It is like a street address that tells you where you are on your computer.
C:\Users\YourUserName
称为当前工作目录(目录是另一种表示文件夹的方式)。 就像街道地址一样,它告诉您您在计算机上的位置。
The current working directory can be a guide as you navigate through your computer. On the right of the >
we can type cd
, which stands for Change Directory, and the name of a directory that you want to navigate to. In this case we will type Documents
. Enter cd Documents
and your current working directory should look like the following:
当您浏览计算机时,当前工作目录可以作为指南。 在>
的右侧,我们可以键入cd
,它代表更改目录,以及您要导航到的目录的名称。 在这种情况下,我们将键入Documents
。 输入cd Documents
,您当前的工作目录应如下所示:
C:\Users\YourUserName\Documents>
To go back one directory type and enter cd..
. Your current working directory should return to this:
要返回一个目录,请输入cd..
。 您当前的工作目录应返回到以下位置:
C:\Users\YourUserName>
With the cd
and cd ..
commands you can move back and forth through directories. This might seem very basic at first but as you learn more commands the command prompt will become a very useful and efficient tool.
使用cd
和cd ..
命令,您可以在目录之间来回移动。 乍一看,这似乎很基础,但是随着您了解更多命令,命令提示符将成为非常有用和高效的工具。
mkdir name_of_the_directory_you_want_to_make
your_command /?
rm /s name_of_directory_you_want_to_delete
The command Ipconfig
shows your computer’s ip address
Ipconfig
命令显示您计算机的IP地址
If you type part of a directory’s name and hit the tab
key the command prompt will autocomplete it and if you hit the tab
key repeatedly it will cycle through directories that start with the same letter
如果键入目录名称的一部分并按tab
键,命令提示符将自动完成该目录,如果反复按tab
键,它将循环浏览以相同字母开头的目录
Some tasks require you to run the command prompt as an administrator you clicking the windows button and typing cmd admin
and hit the enter
key
某些任务要求您以管理员身份运行命令提示符,方法是单击Windows按钮并键入cmd admin
然后按enter
键
If you know the path to a file or directory can type cd PATH_TO_YOUR_DIRECTORY
instead of changing directories several times to get to a directory or file
如果您知道文件或目录的路径,则可以键入cd PATH_TO_YOUR_DIRECTORY
而不是多次更改目录以进入目录或文件
翻译自:
转载地址:http://glrwd.baihongyu.com/