Cmd commands you must know



Ipconfig: Quickly Find Your IP Address



image of cmd ipconfigYou can find your IP address from the Control Panel, but it takes a few clicks to get there. The ipconfig command is a fast way of determining your computer’s IP address and other information, such as the address of its default gateway—useful if you want to know the IP address of your router’s web interface.
To use the command, just type ipconfig at the Command Prompt. You’ll see a list of all the network connections your computer is using. Look under “Wireless LAN adapter” if you’re connected to Wi-Fi or “Ethernet adapter” if you’re connected to a wired network. For even more details, you can use the ipconfig /all command.


ipconfig /flushdns: Flush Your DNS Resolver Cache


image of ip cmdIf you change your DNS server, the effects won’t necessarily take place immediately. Windows uses a cache that remembers DNS responses it’s received, saving time when you access the same addresses again in the future. To ensure Windows is getting addresses from the new DNS servers instead of using old, cached entries, run the ipconfig /flushdns command after changing your DNS server.


Manage Your IP Address


Changing your IP address can come in handy for various reasons. If you need to change yours, 
type :   ipconfig /release
ipconfig /renew

The first command will release your current IP address while the second command will get a new IP address for your machine.

Flushing your computer’s DNS can be used when a site changes its IP address so you’re not taken in the wrong direction.
 Type :   ipconfig /flushdns
and enjoy that clean start.

SHUTDOWN: Turn Off Computer


image of cmd
The SHUTDOWN command is a pretty versatile command that lets you shutdown the computer but control the behavior of that shutdown. It’s commonly used as a scheduled task or part of an IT batch job after patches have been applied to a computer system.

Typing shutdown /i from the command prompt will initiate a shutdown, but it’ll upon a GUI to give the user an option on whether to restart or do a full shutdown. If you don’t want to have any GUI pop up, you can just issue a shutdown /s command.


There is a long list of other parameters you can use to do a log off, hibernate, restart, and more. Just type shutdown without any arguments to see them all.


CHKDSK: Check Disk

While the SFC command only checks the integrity of core system files, you can use the CHKDSK command to scan an entire drive.
The command to check the C: drive and repair any problems, launch the command window as an administrator and type CHKDSK /f C:.
This command checks for things like:
  • File fragmentation
  • Disk errors
  • Bad sectors
The command can fix any disk errors (if possible). When the command is finished, you’ll see a status of the scan and what actions were taken.


Other Windows CMD Commands

As you can see, there are some powerful and useful things you can do with the Windows command prompt, if you know the right commands.

Believe it or not, there are even more commands that will give you the ability to do some things you probably never realized just by typing a simple command.

BITSADMIN: Initiate upload or download jobs over the network or internet and monitor the current state of those file transfers.
image of cmd color

COLOR: Change the background color of the command prompt window.

COMP: Compare the contents of any two files to see the differences.

FIND/FINDSTR: Search for strings inside of any ASCII files.

PROMPT: Change the command prompt from C:\> to something else.

TITLE: Change the title of the command prompt window.

REGEDIT: Edit keys in the Windows registry (use with caution).

ROBOCOPY: A powerful file copy utility built right into Windows.

No comments:

Post a Comment