0% found this document useful (0 votes)
12 views2 pages

steps_windows-os-basic-cli-commands

This document is a cheat sheet for basic Windows OS command line interface (CLI) commands, providing a list of commands along with their descriptions and usage examples. It covers various commands for file manipulation, system information, network management, and more. The cheat sheet serves as a quick reference for users to efficiently navigate and utilize the Windows command line.

Uploaded by

edelisakson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

steps_windows-os-basic-cli-commands

This document is a cheat sheet for basic Windows OS command line interface (CLI) commands, providing a list of commands along with their descriptions and usage examples. It covers various commands for file manipulation, system information, network management, and more. The cheat sheet serves as a quick reference for users to efficiently navigate and utilize the Windows command line.

Uploaded by

edelisakson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Windows OS Basic CLI Commands Cheat Sheet

by steps via cheatography.com/76111/cs/18824/

Commands

Help or /? gets available commands, or displays help info for commands echo /?

echo prints following info to STDOUT echo hello world

type prints file contents to STDOUT type helloW​orl​d.txt

> redirect; sends output to file command > filename

>> append command >> filename

< type's filename and sends text to command command < filename

2> sends error message to file echpo 2> error.txt

| pipes output from left to right command1 | command 2

hostname displays hostname of system hostname

ver displays windows version ver

vol displays disk volume label and serial number vol

systeminfo config inform​ation for local or remote machine;includes service pack levels syste​minfo

set used to manage variables set


mySwee​tVa​ria​ble​=wh​atI​tEq​uals

cd "​change direct​ory​"; displays the name of current or changes directory cd c:\

dir "​dir​ect​ory​"; used to display contents of files and sub direct​ories of current working directory dir c:\myD​ire​ctory

mkdir/md make directory md


c:\myD​ire​cto​ry​\chi​ldD​ire​ctory

rmdir/rd remove directory rd


c:\myD​ire​cto​ry​\chi​ldD​ire​ctory

more prints to STDOUT, but one screen at a time more really​Lon​gTe​xt.txt

copy copies one or more files to another location copy file.txt


c:\new​Loc​ati​on​\fil​e.txt

xcopy copies files and filders xcopy c:\mis​pla​ced​Dir​ectory


c:\cor​rec​t\r​igh​tSp​otD​ire​ctory

move moves files from one folder till another move .\docu​men​t.txt
c:\doc​ume​nt.txt

ren/rename rename a file or files ren monday.txt Tuesday

del deletes one or more files del basura.txt

find search for a text string in a file & display all the lines where it is found find \I "hard to find text

findstr search for a text string in a file & display all the lines where it is found; supports regular findstr /r "​^[1​-9]​[0-​9]"
expres​sions sales.txt

attrib displays or changes files attributes if a file has the System or Hidden attribute set, you attrib +H +S
must clear that attribute before you can change any other attrib​utes makeMe​Hid​den​And​Sys​tem.txt

By steps Published 14th February, 2019. Sponsored by ApolloPad.com


cheatography.com/steps/ Last updated 14th February, 2019. Everyone has a novel in them. Finish Yours!
Page 1 of 2. https://apollopad.com
Windows OS Basic CLI Commands Cheat Sheet
by steps via cheatography.com/76111/cs/18824/

Commands (cont)

icacls change file and folder permis​sions - display or modify Access Control Lists (ACLs) for files and Read the Damned Help File
folders RTFM (Read The F@#$ing Manual)

fc compare the contents of two files or sets of files; display any lines which do NOT match fc fileOn​e.txt fileTw​o.txt

comp compare two files (or sets of files) ; display items that do not match comp fileOne fileTwo

shutdown shutdown or restart a computer shutdown /t 120

tasklist displays all running applic​ations and services with their Process ID (PID) This can be run on either tasklist /FI "​IMA​GENAME eq
a local or a remote computer Calcul​ato​r.e​xe"

sc Service Control - Create, Start, Stop, Query or Delete any Windows SERVICE. The command sc query type= driver RTFM
options for SC are case sensitive

net manage network resources net group "​adm​ini​str​ators'


/domain RTFM

ipconfig displays network adaptor inform​ation ipconfig /all

ping test a network connection - if succes​sful, ping returns the ip address ping -n 1 8.8.8.8

tracert "​tracer route" tracks path to destin​ation and counts hops (can also resolve ip addresses if used on tracert WRKST002
domain names)

netstat display current TCP/IP network connec​tions and protocol statistics netstat -a RTFM

time displays time time /T

date displays date date /T

Success and failures for commands are based on the Exit Code of the command.
In most cases the Exit Code is the same as the ErrorLevel
Numeric handles:

STDIN = 0 Keyboard input


STDOUT = 1 Text output
STDERR = 2 Error text output
UNDEFINED = 3-9

Make Macro For Answer Sheet Creation

doskey banner​=(echo. ^& echo *** Step $* *** ^& echo.) ^>​^> c:\loc​ati​on​\ans​wer​s.txt

MAKE SURE YOU PUT YOUR ANSWER FILE IN THE RIGHT PLACE

By steps Published 14th February, 2019. Sponsored by ApolloPad.com


cheatography.com/steps/ Last updated 14th February, 2019. Everyone has a novel in them. Finish Yours!
Page 2 of 2. https://apollopad.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy