如何在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.pswp.cn/news/390678.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/390678.shtml
英文地址,請注明出處:http://en.pswp.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…