如何在Windows中打开和使用命令提示符

入门 (Getting started)

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.

此外,它还允许用户通过单击来配置计算机并运行他们原本无法执行的程序。

打开命令提示符 (Opening the Command Prompt)

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.

使用cdcd ..命令,您可以在目录之间来回移动。 乍一看,这似乎很基础,但是随着您了解更多命令,命令提示符将成为非常有用和高效的工具。

以下是一些常用命令: (Here is a list of common commands:)

用法示例: (Usage Examples:)

制作目录 (Making a Directory)

mkdir name_of_the_directory_you_want_to_make

获取命令信息 (Getting Info on a Command)

your_command /?

删除文件和内容 (Deleting a File and Contents)

rm /s name_of_directory_you_want_to_delete

有用的提示: (Useful tips:)

  • 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键,它将循环浏览以相同字母开头的目录

  • You can use other shells or tools such as git bash or cmder to add more commands and functionality to your command prompt

    您可以使用其他shell或工具(例如git bash或cmder)向命令提示符添加更多命令和功能。
  • 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而不是多次更改目录以进入目录或文件

  • When you hit the up arrow key your previously entered command will appear and if you hit it repeatedly it will cycle through all of your previously entered commands

    当您按下向上箭头键时,您先前输入的命令将会出现,如果您反复按下它,它将循环显示您先前输入的所有命令

翻译自: https://www.freecodecamp.org/news/how-to-use-the-command-prompt-in-windows/

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/390678.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

ACM-ICPC北京赛区2017网络同步赛H

http://hihocoder.com/contest/icpcbeijing2017/problem/8 预处理暴力枚举修改的点 #include <bits/stdc.h> using namespace std; const int maxn 159; const int inf 0x3f3f3f3f; int a[maxn][maxn]; int colsum[maxn][maxn]; int rowsum[maxn][maxn]; int dp[maxn];…

PPPOE拨号上网流程及密码窃取具体实现

楼主学生党一枚&#xff0c;最近研究netkeeper有些许心得。 关于netkeeper是调用windows的rasdial来进行上网的东西&#xff0c;网上已经有一大堆&#xff0c;我就不赘述了。 本文主要讲解rasdial的部分核心过程&#xff0c;以及我们可以利用它来干些什么。 netkeeper中rasdial…

leetcode 160. 相交链表(双指针)

给你两个单链表的头节点 headA 和 headB &#xff0c;请你找出并返回两个单链表相交的起始节点。如果两个链表没有交点&#xff0c;返回 null 。 图示两个链表在节点 c1 开始相交&#xff1a; 题目数据 保证 整个链式结构中不存在环。 注意&#xff0c;函数返回结果后&#…

android开发入门_Android开发入门

android开发入门Android is an open source, Linux-based mobile operating system. Android was developed by the Open Handset Alliance, which was lead by Google and featured contributions from many other companies.Android是基于Linux的开放源代码移动操作系统。 An…

新购阿里云服务器ECS创建之后无法ssh连接的问题处理

作者&#xff1a;13 GitHub&#xff1a;https://github.com/ZHENFENG13 版权声明&#xff1a;本文为原创文章&#xff0c;未经允许不得转载。 问题描述 由于原服务器将要到期&#xff0c;因此趁着阿里云搞促销活动重新购买了一台ECS服务器&#xff0c;但是在初始化并启动后却无…

数据下发非标准用户权限测试

与同事一起沟通了下MDM的Oracle权限部分: create user cx default tablespace cwbaseoe73 identified by Test6530 grant select,update,delete,insert on lcoe739999.lsbzdw to cx grant create table to cx alter user cx quota unlimited on cwbaseoe73 grant create sessio…

leetcode 474. 一和零(dp)

给你一个二进制字符串数组 strs 和两个整数 m 和 n 。 请你找出并返回 strs 的最大子集的大小&#xff0c;该子集中 最多 有 m 个 0 和 n 个 1 。 如果 x 的所有元素也是 y 的元素&#xff0c;集合 x 是集合 y 的 子集 。 示例 1&#xff1a; 输入&#xff1a;strs [“10”…

边缘计算 ai_在边缘探索AI!

边缘计算 ai介绍 (Introduction) What is Edge (or Fog) Computing?什么是边缘(或雾)计算&#xff1f; Gartner defines edge computing as: “a part of a distributed computing topology in which information processing is located close to the edge — where things a…

JavaScript中的全局变量介绍

Global variables are declared outside of a function for accessibility throughout the program, while local variables are stored within a function using var for use only within that function’s scope. If you declare a variable without using var, even if it’…

初识spring-boot

使用Spring或者SpringMVC的话依然有许多东西需要我们进行配置&#xff0c;这样不仅徒增工作量而且在跨平台部署时容易出问题。 使用Spring Boot可以让我们快速创建一个基于Spring的项目&#xff0c;而让这个Spring项目跑起来我们只需要很少的配置就可以了。Spring Boot主要有如…

leetcode 879. 盈利计划(dp)

这是我参与更文挑战的第9天 &#xff0c;活动详情查看更文挑战 题目 集团里有 n 名员工&#xff0c;他们可以完成各种各样的工作创造利润。 第 i 种工作会产生 profit[i] 的利润&#xff0c;它要求 group[i] 名成员共同参与。如果成员参与了其中一项工作&#xff0c;就不能…

区块链101:区块链的应用和用例是什么?

区块链技术是一场记录系统的革命。 比特币是历史上第一个永久的、分散的、全球性的、无信任的记录分类帐。自其发明以来&#xff0c;世界各地各行各业的企业家都开始明白这一发展的意义。 区块链技术的本质让人联想到疯狂&#xff0c;因为这个想法现在可以应用到任何值得信赖的…

java请求接口示例_用示例解释Java接口

java请求接口示例介面 (Interfaces) Interface in Java is a bit like the Class, but with a significant difference: an interface can only have method signatures, fields and default methods. Since Java 8, you can also create default methods. In the next block y…

如何建立搜索引擎_如何建立搜寻引擎

如何建立搜索引擎This article outlines one of the most important search algorithms used today and demonstrates how to implement it in Python in just a few lines of code.本文概述了当今使用的最重要的搜索算法之一&#xff0c;并演示了如何仅用几行代码就可以在Pyth…

用Docker自动构建纸壳CMS

纸壳CMS可以运行在Docker上&#xff0c;接下来看看如何自动构建纸壳CMS的Docker Image。我们希望的是在代码提交到GitHub以后&#xff0c;容器镜像服务可以自动构建Docker Image&#xff0c;构建好以后&#xff0c;就可以直接拿这个Docker Image来运行了。 Dockerfile 最重要的…

Linux学习笔记15—RPM包的安装OR源码包的安装

RPM安装命令1、 安装一个rpm包rpm –ivh 包名“-i” : 安装的意思“-v” : 可视化“-h” : 显示安装进度另外在安装一个rpm包时常用的附带参数有&#xff1a;--force : 强制安装&#xff0c;即使覆盖属于其他包的文件也要安装--nodeps : 当要安装的rpm包依赖其他包时&#xff0…

leetcode 518. 零钱兑换 II

给定不同面额的硬币和一个总金额。写出函数来计算可以凑成总金额的硬币组合数。假设每一种面额的硬币有无限个。 示例 1: 输入: amount 5, coins [1, 2, 5] 输出: 4 解释: 有四种方式可以凑成总金额: 55 5221 52111 511111 示例 2: 输入: amount 3, coins [2] 输出: 0 解…

软件测试中什么是正交实验法_软件工程中的正交性

软件测试中什么是正交实验法正交性 (Orthogonality) In software engineering, a system is considered orthogonal if changing one of its components changes the state of that component only. 在软件工程中&#xff0c;如果更改系统的组件之一仅更改该组件的状态&#xf…

leetcode 279. 完全平方数(dp)

题目一 给定正整数 n&#xff0c;找到若干个完全平方数&#xff08;比如 1, 4, 9, 16, …&#xff09;使得它们的和等于 n。你需要让组成和的完全平方数的个数最少。 给你一个整数 n &#xff0c;返回和为 n 的完全平方数的 最少数量 。 完全平方数 是一个整数&#xff0c;其…

github代码_GitHub启动代码空间

github代码Codespaces works like a virtual Integrated Development Environment (IDE) on the cloud.代码空间的工作方式类似于云上的虚拟集成开发环境(IDE)。 Until now, you had to make a pull request to contribute to a project. This required setting up the enviro…