• Home
  • Windows
    • Windows 10
    • Windows 11
  • Mac
  • iOS
  • iPad
  • iPhone
  • Social Media
  • News
Friday, June 2, 2023
HowToFixIssue
  • Home
  • Windows
    • Windows 10
    • Windows 11
  • Mac
  • iOS
  • iPad
  • iPhone
  • Social Media
  • News
No Result
View All Result
  • Home
  • Windows
    • Windows 10
    • Windows 11
  • Mac
  • iOS
  • iPad
  • iPhone
  • Social Media
  • News
No Result
View All Result
HowToFixIssue
No Result
View All Result
Home Games

50 Most Used Commands On Command Prompt (With Examples)

April 20, 2023
in Games
Reading Time: 65 mins read

InterestingPosts

How To Retrieve AOL Mail

4 Ways To Fix “You Need To Format Before Use”

What Is Pagefile.sys? Do You Need It?

50 Most Used Commands On Command Prompt (With Examples).

Most of us depend on the Graphical User Interface (GUI) because it’s more handy than memorizing the standard command strains. But one factor is definite—you possibly can’t carry out each process within the Windows GUI, and that’s when Command Prompt could be at your service.

This built-in command line interface can produce instant outputs using easy instructions with fewer laptop assets. This manner, you don’t have to navigate by means of completely different windows simply to get a single process accomplished. With this program, you possibly can carry out superior administrative features or troubleshoot completely different Windows points by yourself!

In this text, I’ll talk about 50 instructions you could know to grasp Command Prompt. But for those who’re comparatively new to this utility, I counsel checking our newbie’s information first.

Basic Commands

Before deep diving into the foremost instructions, I’ll begin with the fundamental ones. Whether you’re planning to make use of Command Prompt extensively or simply for normal functions, these are going to be helpful.

Command Function
cls Clears the Command Prompt display screen
exit Quits Command Prompt
assist Provides assist with a sure command
cd Moves you from one listing/drive to a different
clip Copies the content material to Windows Clipboard
ver Displays your current Windows model

CLS

cls

This command merely clears the Command Prompt display screen. If you’re feeling to clear up the working area after executing too many instructions, it may be extraordinarily useful. All you need to do is sort cls and hit Enter.

Syntax: cls

Exit

exit

If you’re planning to shut the Command Prompt software, you don’t require shifting the cursor to press the Close button. Simply run the exit command and this system quits.

You may use the /b parameter to exit from the loaded batch script. This manner, the principle window stays open and solely the batch file is exited. However, for those who use the parameter exterior the script, it can shut the CMD app.

Syntax: exit /b [error code]
the place error code specifies a sure quantity

Help

help

This command is useful for those who come throughout any command and want to know its perform. It supplies you with the syntax together with the completely different parameters (switches).

If you merely execute assist, it shows an inventory of the frequent instructions utilized in Command Prompt.

Syntax: assist

help command

However, not all instructions help this utility. In that case, you could use the /? parameter and this could work for each command.

Syntax: /?

alternative help command

CD or CHDIR

cd

It merely means ‘Change Directory’ and because the identify suggests, it switches you from the present listing primarily based on the desired path.

If you merely execute cd, it can simply show the identify of your present listing. Therefore, it’s vital to be taught the completely different parameters together with their features and syntax:

Parameters Functions Syntax
<drivename>: Displays the drive together with the final listing location cd <drivename>:
<path>: Takes you to the listing as per the desired location cd <path>:
/d Changes listing cd /d [drivename]:
.. Takes you to the earlier/root listing cd..

Note: chdir and cd instructions carry out the identical actions. So, you could change listing using any most well-liked possibility.

Clip

clip

This command copies the output executed from a sure command into the Windows clipboard. In this manner, you possibly can straight copy the info into some other program.

It’s extraordinarily helpful to straight copy the textual content or script recordsdata with out opening them. Here are the parameters related to it:

Parameters Functions Syntax
<command> Copies the output of a sure command to the Windows clipboard <command> | clip
<filename> Copies the content material of a sure file clip < filename

Ver

ver

Command Prompt gives the quickest option to view the model variety of Windows using a easy command. This manner, you possibly can decide whether or not the newest Windows model is put in in your laptop.

Syntax: ver

System Commands

Whether you’re making an attempt to study your laptop or carry out some system-related duties, the next instructions can come in useful:

Command Function
powercfg Controls energy system settings
shutdown Logs off, restarts, or shuts down your laptop
driverquery Displays all of the put in drivers
hostname Displays the identify of the pc’s host
systeminfo Displays detailed details about your system

Powercfg

powercfg l

This Command Prompt utility means that you can management the general energy settings of your laptop. Note that for those who use it with out the suitable parameters, you’ll encounter an “Invalid parameters” error. 

While there are many parameters accessible, I’m solely going to debate the most typical ones under. If you need to be taught more, merely execute powercfg /?. 

Parameters Functions Syntax
/record or /l Displays all of the accessible energy schemes powercfg /record or powercfg /l
/deletesetting Delete a selected energy setting powercfg /deletesetting <sub_guid> <setting_guid>
/setactive Makes a scheme lively powercfg /setactive <scheme_guid>
/getactivescheme Fetches your present energy scheme powercfg /getactivescheme
/hibernate or /h Used to allow/disable hibernation powercfg /hibernate [parameter]
/availablesleepstates or /a Displays the accessible sleep states in your laptop powercfg /availablesleepstates or powercfg /a
/devicequery Displays these units that meet the desired standards (question flag) powercfg /devicequery <queryflag>
/deviceenablewake Allows the desired device to wake the pc from sleep powercfg /deviceenablewake <devicename>
/devicedisablewake Disables the device to wake the pc from sleep powercfg /devicedisablewake <devicename>
/lastwake Displays the exercise that final woke your system from sleep powercfg /lastwake

To be taught the above instructions intimately, I like to recommend executing the powercfg /? <parameter> command.

For instance, for those who want to know more concerning the /record parameter, you possibly can execute powercfg /record.

Shutdown

shutdown

Interestingly, you possibly can flip off your laptop using a single command on Command Prompt. Also, it’s potential to schedule the shutdown course of as you need.

Here are some frequent parameters that could be helpful:

Parameters Functions Syntax
/i Opens up the Remote Shutdown dialogue shutdown /i
/l Logs you out shutdown /l
/r Restarts your laptop shutdown /r
/a Cancels the shutdown operation shutdown /a
/h Hibernates your laptop shutdown /h
/t xxx Sets the time-out interval earlier than the shutdown shutdown /r /t xxx
/f Ends all of the purposes and indicators you out of the pc shutdown /f

Note: Executing shutdown and not using a parameter will run assist or /? for the shutdown command.

Driverquery

driverquery

Moving on, device drivers are integral parts of a pc. If you search info on them, we have already got the Device Manager utility on Windows GUI.

However, for those who want to show detailed driver info whereas engaged on the command-line interface, you could merely sort driverquery and hit Enter.

Along with that, you possibly can make the most of the next parameters every having particular person features:

Parameters Functions Syntax
/s <system> Specifies the identify and IP deal with of your laptop driverquery /s [system]
/u <domain> <username> Specifies the person’s credentials and may solely be used after /s is specified driverquery /s [system] /u [username]
/p <password> Specifies the person’s password and may solely be used after /u is specified driverquery /s [system] /u [username] /p [password]
/fo Displays the output within the specified format–desk, record, or csv /fo [table “” not found /]
/nh “No header”, which means the header is just not displayed (doesn’t work for /fo record) driverquery /fo [table “” not found /]
/nh
/si Displays signed drivers driverquery /si
/v Displays verbose output (doesn’t work for signed drivers) driverquery /v

Hostname

hostname

This command prints the device identify. If you’re uncertain about yours otherwise you’re making an attempt to establish it on one other laptop, merely typing hostname and urgent Enter within the Command Prompt will show the end result.

Syntax: hostname

Systeminfo

systeminfo

Unlike the hostname command, this may print detailed details about your laptop. Basically, it’s like launching the System Information software to verify your PC specs.

Moreover, you should use the identical parameters utilized in devicequery (/s, /u, /p, /fo, /nh, /si, and /v) to print the output in your required format.

Syntax: systeminfo [parameter]

Windows Troubleshooting Commands

If you’re dealing with a Windows-related problem, there could possibly be a number of causes for it—corrupted drive, system recordsdata, images, or more. Usually, working helpful troubleshooters and instructions can repair the issue, and that’s precisely what I’ll cowl on this part.

Command Function
chkdsk Checks your disk drives to establish and repair potential errors or dangerous sectors
sfc Scans the system recordsdata to find out corrupted ones and replaces them with a cached copy
dism Manages Windows images
msdt.exe -id DeviceDiagnostic Starts Hardware and Devices troubleshooter

CHKDSK

chkdsk

This command checks for the native disks on the pc and informs customers about logical and bodily errors. Note that fixing errors is barely potential for those who use the next parameters correctly.

Here, I’ve solely mentioned the frequent ones. But if you wish to be taught more, right here’s a whole information on how to run CHKDSK to restore and repair a tough drive.

Parameters Functions Syntax
<quantity> Scans the desired quantity chkdsk <quantity>:
/f Fixes errors on locked disks (in any other case it first asks you to dismount the amount and completes the scan when you restart your PC) chkdsk /f
/v Displays path and identify of each file for FAT/FAT32 disks and cleanup messages on NTFS chkdsk /v
/r Fixes the bodily disk errors and performs all of the operations that the /f parameter does chkdsk /r
/x Forces the volumes to be dismounted earlier than performing the scan chkdsk /x
/i A faster option to scan for disk errors for NTFS drives chkdsk /i
/offlinescanandfix Performs offline scans to repair disk errors chkdsk /offlinescanandfix

SFC

sfc scannow

The Windows System File Checker (SFC) helps you restore corrupted Windows recordsdata. It works by changing the corrupted recordsdata with a cached copy, which may even optimize the pc’s efficiency.

Here are a few of the most used SFC instructions:

Parameters Functions Syntax
/scannow All system recordsdata are scanned and repaired sfc /scannow
/verifyonly All system recordsdata are scanned (no restore) sfc /verifyonly
/scanfile<file> The user-specified system file is scanned and repaired sfc /scanfile=[file path]
/verifyfile<file> The user-specified system file is scanned (no restore) sfc /verifyfile=[file path]

DISM

dism online

This command begins the Deployment Image Servicing and Management software to configure the options and packages of Windows images. There are loads of DISM instructions to make use of when troubleshooting Windows, together with FFU, WIM, Imaging, and more. But I’ll solely be discussing the frequent parameters.

For your consolation, we now have already offered an in depth information on working completely different DISM instructions.

Parameters Functions Syntax
/on-line Targets working OS  dism.exe /on-line [parameters]
/image Specifies the trail of an offline Windows image dism.exe /image:<path_to_offline_image>
/list-image Displays all recordsdata and folders within the specified Windows image dism.exe /list-image ImageFile:<path_to_image_file>
/delete-image Deletes the desired Windows image from the WIM file dism.exe /delete-image /ImageFile:<path_to_image_file>

Additional Tip: To be taught more about a person command, you possibly can execute the /? parameter on the finish. For instance, for those who want to discover out more on /image, merely execute dism.exe /image /?. 

msdt.exe -id DeviceDiagnostic

msdt to open hardware and devices troubleshooter

The Hardware and Devices troubleshooter is now not accessible with the opposite troubleshooters in Windows Settings. However, the utility can discover and repair associated issues with all {hardware} parts.

In Windows 11, you possibly can launch it using the msdt.exe -id DeviceDiagnostic command on Command Prompt.

File and Directory Management Commands

Managing recordsdata and directories on Command Prompt could be a little difficult. Nevertheless, listed below are a few of the fundamental instructions that may make your duties so much simpler.

Command Function
dir Displays all of the recordsdata and folders inside a listing
copy Copies recordsdata inside the listing or from one to a different listing
transfer Transfers recordsdata from one listing to a different
del Deletes a file or listing
mkdir Creates a brand new listing
ren Changes file identify
rmdir Deletes an present listing
sort Displays content material of a textual content file
assoc Modifies the file sort
fc Compares two recordsdata and shows their variations
attrib Changes a listing’s attributes
tree Graphical illustration of a listing construction of a specified path

DIR

dir

This command shows all of the recordsdata and directories/subdirectories from the desired drive/listing. 

Most customers make the most of this command to record the recordsdata and directories. This is feasible by merely executing the dir command. Along with the listings, it additionally shows the amount’s label, serial quantity, and the full variety of recordsdata and directories.

Apart from that, you too can make the most of the next parameters:

Parameters Functions Syntax
<drive> Displays the recordsdata inside the desired drive dir [drive]:
<path> Displays the recordsdata from the desired location dir [path]:
/b Displays simply the record of things with none extra info dir /b
/s Displays all of the recordsdata contained in the directories, their subdirectories, and recordsdata dir /s
/w Lists all of the recordsdata in a large format dir /w
/d Same as /w however kinds them by column dir /d

Copy

As the identify suggests, this command copies the recordsdata from one location to a different. Note that it’s going to simply create a reproduction as a substitute of shifting it.

Syntax: copy [filename] [path]

copy

For instance, to repeat the instance.txt file from the D drive to the Example folder in the identical drive, right here’s the command I’ll use:

copy instance.txt Example

Move

This command features the identical manner as copy. However, the distinction is that it truly strikes the file from one location to the opposite. It’s principally the cut-and-paste approach we use in Windows GUI.

Syntax: transfer [filename] [path]

move

For instance, to maneuver the instance.txt file from the D drive to the Example folder in the identical drive, right here’s the command I’ll use:

transfer instance.txt Example 

Del or Erase

Both the Del and Erase instructions can be utilized to completely delete a file. This means that you could’t retrieve the file back from the Recycle Bin.

Syntax: del [filename]

del

For instance, to delete the instance.txt file completely, right here’s the command I’ll execute:

del instance.txt

Note: Although we haven’t specified the parameters and attributes for copy, transfer, and del, you possibly can take a look at it for your self using the assistance or /? parameter.

MKDIR or MD

Both the MKDIR and MD instructions are used to create a brand new listing (folder). You can do that within the current listing and even on one other listing straight, which means you don’t require shifting to that particular drive/listing to create one.

Syntax: mkdir [path][directory_name]

mkdir

For instance, if I’m in D drive and want to create a brand new listing, right here’s the command I’ll use:

mkdir MyDirectory

mkdir outside present directory

But if want to create a brand new listing in a selected path, right here’s what I’d execute:

mkdir C:UsersbishuDesktopMyDirectory

Rename or Ren

Ren or Rename command merely reconfigures the file or listing identify. While doing so, be sure you don’t duplicate the identify with some other file/listing.

Syntax: ren [path]/[filename] [new_filename]

Taking the identical instance as above, right here’s how I’m going to rename the 2 recordsdata I had created earlier:

ren MyDirectory MyDir

ren

ren C:UsersbishuDesktopMyDirectory MyDir

ren in another directory

RMDIR or RD

It stands for ‘Remove Directory’ and that’s precisely what the command does. You might also use a shorter command that performs the identical motion–RD.

Here are all of the parameters for the RMDIR command:

Parameters Functions Syntax
<path><dir_name> Deletes the listing as per the precise path rmdir [path][dir_name]
/s Deletes the listing together with all of the recordsdata inside it (asks for affirmation) rmdir /s [path][dir_name]
/q Deletes the listing together with all of the recordsdata inside it (doesn’t ask for affirmation) rmdir /q [path][dir_name]

As an instance, I’m going to point out you ways to delete the MyDirectory file that I created earlier:

rmdir MyDir

rmdir

rmdir C:UsersbishuDesktopMyDir

rmdir outside directory

Type

type

This command is used to show a textual content file’s content material on Command Prompt. This manner, you don’t have to navigate to a sure location, open the file, and once more shut it if not needed.

Syntax: sort [path] [filename]
You might skip [path] for those who’re in the identical listing because the textual content file.

Assoc

assoc

This command is used to show or handle completely different file identify extension associations. Note that you simply require administrative privilege to change the associations.

If you merely execute the assoc command, the command-line utility lists all of the extensions together with their related file varieties.

Syntax: assoc

Also, you possibly can verify which file extensions are related to particular person file varieties. For instance, yow will discover out all of the extensions which can be related to ‘sysfile’ as proven within the under instance.

Syntax: assoc | discover “[filetype]”

Example:assoc | discover “sysfile”

assoc find

It’s potential to change the associations too. You can affiliate any file extension to whichever file sort you need.

Syntax: assoc =

Example: assoc .abc=sysfile

modify assoc

Lastly, you possibly can even delete an affiliation. However, you’ll must restart your laptop to use the modifications.

Syntax: assoc [extension]=

Example: assoc .abc=

remove assoc

FC

fc

FC stands for “File Compare” and because it sounds, it’s used for evaluating two recordsdata to be able to study their variations. As proven within the demonstration above, I’ve in contrast two textual content recordsdata to know the merchandise distinction inside them.

Syntax: fc [file1] [file2]

Here are a few of the helpful parameters for the FC command:

Parameters Functions Syntax
/b Comparison in binary mode fc <file1> <file2> /b
/c Ignores the letter case throughout comparability fc <file1> <file2> /c
/n Displays the road quantity fc <file1> <file2> /n
/u Comparison of Unicode textual content recordsdata fc <file1> <file2> /u
/w Ignores consecutive areas when evaluating fc <file1> <file2> /w

Attrib

attrib

This command manages the attributes for recordsdata and folders. You can set no matter attribute you want—Hidden, Read-Only, System, and more. To set an attribute, use ‘+’ and to take away, use ‘-’.

Syntax: attrib [+/-][attribute_value] [file/folder name]

Attribute Value Description
H Hidden
R Read-only
A Archive
S System
O Offline
I Not content material Indexed
X No scrub
V Integrity
P Pinned
U Unpinned
B SMR Blob

Note: I haven’t talked about the parameters for attrib (/s, /d, and /l). You can use the /? swap to be taught more about them.

Tree

tree

If you’re wishing to view the subdirectories within a listing or a drive, the tree command will make it look graphically pleasing. It buildings the doc in an easy-to-view format. All you need to do is run the tree command and specify the trail if required. 

Syntax: tree [path]

Below are the 2 parameters you possibly can undertake with the tree command:

Parameters Functions Syntax
/a Displays the strains using textual content characters as a substitute of graphical illustration tree <path> /a
/f Displays all of the gadgets within the drive/listing tree <path> /f

Disk/Drive Management Commands

Along with file and listing administration, it’s additionally potential to configure disks and drives in Command Prompt.

Here are the 7 most used instructions for this function:

Command Function
vol Displays the disk quantity’s label and serial quantity
format Formats a sure drive within the specified file system
diskpart Manages storage drive partitions
defrag Defragments the desired laborious drive
diskusage Displays the quantity of used and free area accessible on the precise disk

Vol

vol

This is a command to rapidly verify the amount identify or serial quantity. All you need to do is execute vol with the drive letter.

Syntax: vol [dirve_letter]:

Format

format

While there already exists easy-to-use GUI purposes for formatting your disk drives, it’s by no means a foul concept to be taught this on Command Prompt.

If you need to format a tough drive having only one partition, the format command ought to work out for you. However, the higher possibility could be using diskpart, which I shall talk about under.

Here, I’ll solely point out the frequent parameters. Nonetheless, you possibly can undergo the opposite information that ought to enable you format a tough drive from CMD intimately.

Parameters Functions Syntax
/v Specifies the amount label of the drive you’re making an attempt to format format /v:<label>
/q Performs a fast format format <drivename>: /q
/fs Formats the drive with particular file system format <drivename>: /fs:<filesystem>
/p Completely wipes the drive format <drivename>: /p:<rely>

Diskpart

diskpart

This is a command-line interpreter that provides disk administration options on Command Prompt. With this utility, you possibly can assign drive letters, handle the drive attributes, configure partitions, show disk info, format a drive, and rather more.

Type diskpart and this could launch the interpreter. However, you require administrative privilege to make use of it. 

In the desk under, I’ve talked about probably the most used instructions in Diskpart. If you want to be taught more about disk partitions using the diskpart command, you possibly can take a look at our devoted guides for each HDD and SSD.

Command Functions Syntax
record Displays the volumes, disks, partitions, or digital disks primarily based on the parameter specified record <quantity/disk/partition/vdisk>
choose Selects a quantity, disk, partition, or digital disk primarily based on the parameter specified choose <quantity/disk/partition/vdisk>
create Creates a quantity, partition, or digital disk file primarily based on the parameter specified create <partition/disk/vdisk> <parameters>
assign Assign a drive letter or mount level to the chosen quantity assign <letter=[letter_number]/mount=[path]>
format Formats a disk format <parameter>
exit Exits the Diskpart interpreter exit

Defrag

defrag

Defragmentation merely means reorganizing the info inside an HDD to attain higher efficiency (not really helpful on SSD).

Like some other motion, Windows already gives a devoted utility.

However, for those who want to know this intimately, Command Prompt gives tons of parameters that ought to enable you out. Note that this command requires administrative privilege.

Parameters Functions Syntax
<driveletter>: Defrags the desired drive (conventional defragmentation, default parameter is ready to /d) defrag <driveletter>:
/a Analyzes the chosen drive defrag <driveletter>: /a
/b Performs boot optimization on the chosen drive defrag <driveletter>: /b
/c Runs operations on all of the volumes defrag <driveletter>: /c
/h Runs operations in regular precedence defrag <driveletter>: /h
/u Prints the progress defrag <driveletter>: /u

Diskusage

diskusage

This won’t be probably the most used command however is certainly price it. You can get the summarized particulars on the chosen disk’s utilization very quickly.

Simply executing the diskusage command ought to do the job (notice that you’ll want to open CMD as an administrator). Along with that, you possibly can check out the next parameters that could be useful:

Parameters Functions Syntax
/c Displays the lead to CSV format diskusage /c <drive>:
/h Displays the lead to human-readable format diskusage /h <drive>:
/s  Displays measurement for system recordsdata solely diskusage /s <drive>:

Networking Commands

Unlike others, networking instructions are extensively used primarily for troubleshooting functions. In truth, fetching IP addresses or configuring network settings is way simpler on Command Prompt than using GUI parts.

If you’re a networking fanatic, listed below are the instructions that you’ll want to give attention to: 

Command Function
internet Manage network and its settings
ipconfig Displays detailed details about your network configuration
netsh Starts the Netsh immediate that permits you to handle network configurations
netstat Displays lively network connections
ping Verifies IP-level connectivity and reachability
tracert Checks the pc’s path to hook up with the network
pathping Traces the path to the goal and likewise shows the statistics (mixture of ping and tracert)
getmac Displays the MAC deal with
nslookup Displays the details about domains and IP addresses

Net

net start

You can use this command to handle completely different networking companies. It comes with a number of choices every performing a specialised process.

Here, I’ve solely talked about the most typical ones. You can execute the internet command and not using a parameter to get more.

Option Function
accounts Configures login necessities
laptop Manages computer systems within the domain
proceed Restarts a service
begin Starts a networking service
cease Stops a networking service
view Displays all of the units in a network
statistics Displays network statistics

Ipconfig

ipconfig command

This command is for network configuration and administration. You can view the detailed Windows TCP/IP info, launch/renew IP addresses, flush the DNS cache, and rather more.

Executing ipconfig with out parameters shows the IPv4, IPv6, subnet masks, and default gateway for each adapter. For different functions, you possibly can undertake the next parameters:

Parameters Functions Syntax
/all Displays TCP/IP configuration for all adapters ipconfig /all
/flushdns Flushses the DNS consumer resolver cache ipconfig /flushdns
/launch <adapter> Releases the DHCP configuration for the desired adapter (you possibly can merely execute the /launch parameter to launch the configuration for all of the adapters directly) ipconfig /launch <adapter>
/renew <adapter> Renews DHCP configuration for the desired adapter (if not specified, renews for all of the adapters) ipconfig /renew <adapter>

Netsh

netsh

This is one other important networking command used for managing network configurations. You can execute netsh to launch the devoted shell. After that, you possibly can carry out desired networking operations using a few of the well-known parameters from the under desk:

Commands Functions
dhcpclient Manages the DHCP consumer service
dnsclient Manages DNS consumer settings
firewall Manages the Windows firewall service
interface Manages bodily or digital network adapters
lan Manages LAN settings in your laptop
wlan Manages wi-fi network settings in your laptop
namespace Manages namespace configurations
offline Sets the mode to offline
on-line Sets the mode to on-line
stop/exit/bye Exits the Netsh shell
winsock Manages Winsock settings

Additional Tip: You can additional study every of the above command’s arguments using ? within the netsh shell or use the /? parameter with the netsh command.

Netstat

netstat

This command lists the lively connections in your laptop. It shows the protocol, native in addition to international deal with, and the present state. Just executing the netstat command will record the lively TCP connections.

To show different protocols, listed below are some parameters you should use:

Parameters Functions Syntax
-a Displays all of the lively TCP and UDP connections  netstat -a
-b Displays all lively connections together with every course of (requires admin privilege) netstat -b
-e Displays the interface statistics netstat -e

Ping

ping

This command is extensively used for testing host-server reachability and web connectivity. Executing ping shows the IP deal with statistics and the approximate spherical journeys in milliseconds.

Here are just a few parameters that I like to recommend making an attempt out: 

Parameters Functions Syntax
-t Continues displaying stats till interrupted by urgent CTRL+C ping -t <target_name>
-n<rely> Displays stats primarily based on the desired variety of echo Request messages ping -n <quantity> <target_name>
-l<size> Displays stats primarily based on the desired size ping -l <quantity> <target_name>

Tracert

tracert

This command traces the path to a sure IP or domain by sending ICMP or ICMPv6 messages with growing TTL values. It’s extraordinarily helpful throughout network troubleshooting because it informs customers concerning the routing points and validates the network paths.

Implementing the tracert command and not using a parameter traces the route of the desired domain/IP over a most of 30 hops.

Nevertheless, you might make use of the next parameters to realize extra networking info:

Parameters Functions Syntax
-h<max_hops> Displays ends in ‘n’ no. of most hops specified tracert -h <hops_in_number> <target_name>
-d Doesn’t resolve IP deal with making the outcomes seem a lot sooner tracert -d <target_name>
-w<timeout> Specifies the utmost time to attend for echo Reply message (if not, shows *) tracert -w <max_time> <target_name>
-4 Uses IPv4 to hint the route tracert -4 <target_name>
-6 Uses IPv6 to hint the route tracert -6 <target_name>

Pathping

pathping

This command is a mixture of Tracert and Ping. When executed and not using a parameter, it traces the path to the goal over a most of 30 hops and computes statistics for 125 seconds (by default).

Here are a few of the most used pathping parameters:

Parameters Functions Syntax
-h<max_hops> Displays outcomes primarily based on the utmost hops specified pathping -h <quantity> <goal>
-p<interval> Waits between consecutive pings earlier than displaying the stats pathping -p <max_period> <goal>
-w<timeout> Specifies the utmost time to attend for every reply pathping -w <max_time> <goal>
-4 Only makes use of IPv4 pathping -4 <goal>
-6 Only makes use of IPv6 pathping -6 <goal>

Getmac

getmac in cmd

If you want to get the MAC deal with of your laptop, you possibly can execute the getmac command and this may show the end result very quickly. The end result contains each the bodily deal with and the transport identify.

Along with that, I extremely advocate making an attempt out the next parameters:

Parameters Functions Syntax
/s <laptop> Displays the outcomes for the desired laptop identify of IP deal with getmac /s <laptop>
/fo <desk/record/csv> Displays within the specified format getmac /fo <desk/record/csv>
/nh Displays within the desk or CSV format excluding the column header getmac /nh

NSLookUp

nslookup

This is yet one more command-line utility that features quite a few instructions to get hold of domain identify or IP deal with info. To begin the immediate, merely sort nslookup within the Command Prompt and hit Enter.

While there are numerous parameters for nslookup, I’m solely going to give attention to just a few frequent ones within the desk under:

Commands Functions
finger Connection with finger server
ls Displays DNS domain info
lserver Changes default server to the desired DNS using present server
server Changes server to the desired DNS using default server
set Different parameters (all, class, d2, and so forth.) are used to set varied DNS-related settings

Miscellaneous

If you could have carried out every of the instructions I’ve mentioned, you need to now be proficient sufficient to make use of Command Prompt. However, the aforementioned instructions aren’t sufficient to grasp this Windows command-line interface. 

There are hundreds more, and it’s unimaginable for me to incorporate all of them on this single put up.

For now, I’d advocate making an attempt out the next instructions that would come in useful when you’re on the best way to mastering Command Prompt:

Command Function
tasklist Displays all of the at the moment working processes
taskkill Kills a course of
powershell Starts Windows PowerShell session
set Manages Windows atmosphere variables
begin Runs the desired program
bcdboot Repairs the boot atmosphere
date Displays immediately’s date
immediate Changes the cmd textual content
shade Customizes foreground and background shade

Tasklist

tasklist

You can use this command to show the at the moment working processes in your laptop. Executing tasklist lists down the identify of the method, its PID, session identify, session quantity, and reminiscence utilization. Also, you possibly can check out the next parameters:

Parameters Functions Syntax
/s <laptop> Displays all of the processes of the desired laptop identify or IP deal with tasklist /s <laptop>
/m Displays all of the modules of at the moment working processes tasklist /m
/fo <desk/record/csv> Displays the ends in a specified format tasklist /fo <desk/csv/record>
/nh Displays the ends in desk or CSV format with out the header column tasklist /nh
/svc Displays all of the companies related to the at the moment working processes tasklist /svc

Taskkill

taskkill

While the tasklist command shows the processes, taskkill kills/ends them. You can use both course of ID or image identify to do that process. Therefore, you’ll want to make the most of any of the next frequent parameters:

Parameters Functions Syntax
/pid <processID> Kills the method as per the desired course of ID taskkill /pid <processID>
/im <image_name> Kills the method as per the desired image identify taskkill /im <imageName>
/f Ends the method forcefully taskkill /f <pid/im> <processID/imageName>
/t Ends the method together with all of the baby processes taskkill /t <pid/im> <processID/imageName>

Powershell

powershell on cmd

If you favor Windows PowerShell over CMD, you possibly can truly run the Command Prompt as a Powershell window. Just sort powershell and hit Enter. You’ll possible get the PS prefix indicating that you could now run all of the Powershell cmdlets right here.

Syntax: powershell

Set

set

This command is used for configuring the Windows atmosphere variables. To show all of the accessible ones, you should use the set command with none parameters. In order to set a brand new atmosphere variable, you should use a variable identify and supply the mandatory worth.

Syntax: set [variable_name] = [value]

setting environment variable

Likewise, it’s potential to delete any atmosphere variable too. Below is the syntax that ought to clear your doubt.

Syntax: set [variable_name] =

deleting environment variable

The set command on Command Prompt has the next two parameters with particular person performance:

Parameters Functions Syntax
/a Sets the variable identify as a line of enter set /a <variable>=<expression>
/p Sets the worth as a numerical expression set /p <variable_name>=<promptString>

Start

start

You can use this command to launch a brand new Command Prompt window. Without the usage of any parameter, it can merely launch the brand new immediate. However, using the next parameters may also help you carry out simply greater than that:

Parameters Functions Syntax
“title” Launches the CMD window with the desired title begin “<title_name>”
/d <path> Starts the CMD window with the desired path begin /d <path>
<min> or <max> Launches the CMD windows in restored or maximized window begin <min/max>
/wait Starts the applying and waits for it to finish (which means you can not execute additional instructions in the principle immediate) begin /wait

BCDBoot

bcdboot

Most customers make the most of this command to restore the boot atmosphere from the Windows Recovery Environment. It works by copying the Windows set up recordsdata to a system partition. You must execute bcdboot with the next parameters:

Parameters Functions Syntax
/l Specifies an optionally available language throughout BCD retailer initialization bcdboot <supply> /l <locale> 
/s Specifies the system partition’s label the place the BCD recordsdata will likely be copied to bcdboot <supply> /s <partition>
/d Preserves the prevailing default windows boot entry bcdboot <supply> /d <path>
/bcdclean Cleans the BCD retailer bcdboot <supply> /bcdclean

Date

date

This is one other helpful command to rapidly verify the present date. You can show or set a brand new date as per your requirement. If you execute simply the date command, the immediate shows the date and asks you to set a brand new one. But for those who rapidly need to verify the date, use the /t parameter.

Syntax: date /t

Prompt

prompt

This command gives customization of the textual content that seems in entrance of the cursor (by default, it’s the present listing path). 

You can change this to any character string of your selection or predefined characters (like present date, drive, path, occasions, windows model, and so forth.) using particular codes. You can verify using the /? Parameter. To swap back to the conventional format, execute the immediate with none parameters.

Syntax: immediate [text/special_code]

Color

Certainly, you could have considered customizing the Command Prompt. To your shock, it’s potential to tweak the default black (background) and white (foreground/textual content) mixture. For this, you require specifying two hex digits—the primary representing the background and the second similar to the textual content.

Syntax: shade [hexcode]

Hex Digit Color
0 Black
1 Blue
2 Green
3 Aqua
4 Red
5 Purple
6 Yellow
7 White
8 Grey
9 Light Blue
A Light Green
B Light Aqua
C Light Red
D Light Purple
E Light Yellow
F Bright White

As per the above desk, let’s say you desire a pink background with mild blue textual content. So, you’ll must execute the next command:
shade 49

color

While you’re at it, notice that you simply can not set the identical background and foreground colours. Even for those who do it, the command won’t execute and also you’ll be left with the prevailing mixture.

To swap back to default, run the colour command with none parameter.


Check out more article on – How-To tutorial and latest highlights on – Gaming News


Tags: CommandCommandsExamplesFix Gaming IssueFix Gaming IssuesHow To FixHow to Fix GameHow to Fix Gaming IssueHow To Fix IssueHow to Fix Video GamesHow-To-1-GamesPromptTechNewsWindows

Recommended.

How to Download and Install Minecraft Maps in 2022 (Guide)

How to Download and Install Minecraft Maps in 2022 (Guide)

May 10, 2023
How to Get Spectator Mode in Minecraft Bedrock Edition (2022)

How to Get Spectator Mode in Minecraft Bedrock Edition (2022)

May 8, 2023

Trending.

No Content Available
  • About
  • Advertise
  • Privacy & Policy
  • Contact
All about technical, android, mobile, windows relating website. We provide you with the latest technology straight from the industry.

© 2023 How To Fix Issue - All rights reserved.

No Result
View All Result
  • Home
  • Windows
    • Windows 10
    • Windows 11
  • Mac
  • iOS
  • iPad
  • iPhone
  • Social Media
  • News

© 2023 How To Fix Issue - All rights reserved.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
SAVE & ACCEPT
This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.