Skip to main content

How To Use Windows Command Prompt - What It Is and How to Use It



In Windows operating systems, the Command Prompt is a program that emulates the input field in a text-based user interface screen with the Windows graphical user interface (GUI). It can be used to execute entered commands and perform advanced administrative functions

Command Prompts: Basic CMD





1. List installed drivers: use "driverquery"
   use "driverquery -v" for more information

2. "ipconfig" - provides ip address along with local network information

3. "systeminfo"  - provide information about PC's hardware like motherboard, ram, & processor

4. "ping <site address/ ip/ domain>" - lets know how long it took to transmit that data and get a response

5. "sfc/scannow" - scan and repair window system files, but the console must be run as an administrator
                  /VERIFYONLY: Check the integrity but don’t repair the files.
                  /SCANFILE: Scan the integrity of specific files and fix if corrupted.
                  /VERIFYFILE: Verify the integrity of specific files but don’t repair them.
                  /OFFBOOTDIR: Use this to do repairs on an offline boot directory.
                  /OFFWINDIR: Use this to do repairs on an offline Windows directory.
                  /OFFLOGFILE: Specify a path to save a log file with scan results.

6  "tasklist" - provides list of all tasks running on your pc
                use "tasklist -v" for more details

7. Change the directory/folder-
    "cd\" - to go to top of the directory tree
    use "cd <folder_name>" - to go to specific folder, the subfolder must be seperated by backslash character: \
    use  "cd.." to go one folder up

8.  change the drive: use "d:" to change the drive from "C:" to "D:", type d: and then press Enter

                      if u r now on the "D:" drive and you want to go to the window folder from the "C:" drive, type "cd/d C:\windows" and press Enter

9. Create a new directory/folder;
    use "mkdir <folder_name>"
    if u r working on "C:", to create a new folder in "D:", type "mkdir d:\<folder_name>"  and press Enter;

10. use "cls" to clear existing commands

11. "tracert <domain/ip/siteaddress>" - it provides 1.no of hops(inermediate servers) before getting into the destination 2.time it takes to get to each hop 3. The IP and sometimes name of each hops

12. Power Configuration: use "powercgf -energy"
13. Shutdown: use "shutdown/i" for whether to restart or full shutdown
              use "shutdown/s" for full shutdown
              use "shutdown" to see full of parameters like log off, hibernate, restart and more

14. "chkdsk/f C: " used to scan an entire drive
                   This command checks for things like:
                   File fragmentation
                   Disk errors
                   Bad sectors

15. SCHTASKS: schedule tasks
16. ATTRIB: change file attribute

And some other useful commands are:

BITSADMIN: Initiate upload or download jobs over the network or internet and monitor the current state of those file transfers.
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.

More could be found here: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands                  

Comments

Popular posts from this blog

How To Run C# .Net Programming Language On Windows using Visual Studio(vs code 2019 version) and using command prompts

  There are two ways to run C# code on Windows:  1. Through Microsoft Visual Studio software -Open Visual Studio.( click here to download it: https://visualstudio.microsoft.com/downloads/) -On the menu bar, choose File -> New -> Project. -Choose Visual C# from templates, and then choose Windows. -Choose Console Application. -Specify a name for your project and click OK button. -This creates a new project in Solution Explorer. -Write code in the Code Editor. -Click the Run button or press F5 key to execute the project. A Command Prompt window appears that contains the line Hello World. 2. Through Windows Command Prompt: -You can compile a C# program by using the command-line instead of the Visual Studio IDE - -Open a text editor and add the above-mentioned code. -Save the file as helloworld.cs -Open the command prompt tool and go to the directory where you saved the file. -Type csc helloworld.cs and press enter to compile your code. -If there are no errors in your code, t...

Life Hack Home Tools Time Saving

Elon Musk`s Neuralink shows how monkey plays Pong with his mind, Pager, a nine-year-old macaque monkey, had a Neuralink chip implanted

- “A monkey is literally playing a video game telepathically using a brain chip,” Must said in a tweet. “First @Neuralink product will enable someone with paralysis to use a smartphone with their mind faster than someone using thumbs,” he added. Musk further added: “Later versions will be able to shunt signals from Neuralinks in the brain to Neuralinks in body motor/sensory neuron clusters, thus enabling, for example, paraplegics to walk again”. Musk said that Neuralink put a computer chip into the monkey’s skull and used “tiny wires” to connect it to its brain. “That would be pretty cool,” said Musk, who is CEO of Neuralink, in addition to SpaceX and Tesla. Headquartered in San Francisco, Neuralink’s team of around 100 people is trying to develop an implementable computer-brain interface. The aim of Neuralink is to increase the rate at which information can flow from the human brain to a machine.In 2020, the company publicly shared a wireless version of the Link that was abl...