[SC-CSTD] FW: [tech-vi Announce List] How To Perform Common Tasks in Windows Command Prompt

Frank Loza floza58 at bellsouth.net
Sat Oct 22 00:21:42 UTC 2022


 

 

From: tech-vi at groups.io <tech-vi at groups.io> On Behalf Of David Goldfield
Sent: Friday, October 21, 2022 7:11 PM
To: List <tech-vi at groups.io>
Subject: [tech-vi Announce List] How To Perform Common Tasks in Windows Command Prompt

 

Tomshardware - Friday, October 21, 2022 at 5:16 PM


How To Perform Common Tasks in Windows Command Prompt


Windows is much more than a graphical user interface. For those of us old enough to remember, we started our PC journey with MS-DOS and then Microsoft Windows. The command prompt was where we worked and we had to learn a few tricks to get the job done. Fast forward to today and we have complex graphical user interfaces that work extremely well, but sometimes the command prompt is just quicker.

In this how to, we have collected a number of common GUI tasks, and shown how the command prompt can be used to get the same job done. These commands will work with Windows 7,8,10 and 11.


Accessing the Command Prompt


1. Click on Start and search for cmd, click on Run as Administrator. With administrator powers you can do some damage, so double check what you are typing before you press the Enter key.

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 


Clearing the Command Prompt


The command prompt can sometimes become cluttered, but we can soon fix that by clearing the screen with the cls command. Type the command and press Enter to gain valuable space in your command prompt.

cls

Get Your Network Connection Details


  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

We can easily get our network connection details via the Network and Internet section of Settings, but what if you need them in the command prompt? The ipconfig command provides us with our IPv4 and IPv6 addresses, DNS details and other basic networking information.

1. In the command prompt, type ipconfig and press Enter. This produces a basic overview of the network connections currently in use.

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

2. In the same prompt type ipconfig /all and press Enter. Using ipconfig with the /all switch shows a detailed breakdown of all the active network interfaces. These include our Bluetooth adapter and a virtual Ethernet adapter for our Virtualbox VMs.

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 


Filtering Output With Findstr


  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

Commands can generate a lot of output. So how can we filter out the noise and target the data that we need? Using the findstr command we can pass strings to search for in the output of a command.

Here is an example using the ipconfig /all command, piping the output via “|” to become the input of findstr, where we specify the search string in quotes. In this example we are searching for the Host Name of our machine.

ipconfig /all | findstr “Host Name”

The findstr command can be used with many different commands, and using extra pipes we can direct the output to other tools / applications.


Checking Your Connection


Part of testing a network is checking that we can connect to another machine and with ping we can check our internal and external connections.

To check an internal connection, we will need to know the IP address of a device on the network. For that you will need to scan for devices on your network. <https://www.tomshardware.com/how-to/scan-for-network-devices>  Once we have the IP address we can use ping to check the connection.

ping 192.168.0.8

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

To check an external connection, we can use ping with an external IP address. Our go to IP address is one of Google’s DNS servers.

ping 8.8.8.8

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 


IP Address Release and Renewal


Sometimes we need to release or renew the IP address of an adapter and this can be easily done via the prompt.

1. Use ipconfig /release to release all active connections. This will release all connections, Ethernet, Wi-Fi and Bluetooth.

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

2. Use ipconfig /release *Eth* to close all connections matching the “Eth”. This will close all Ethernet connections, but keep others open.

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

3. Use ipconfig /renew to renew all IPv4 connections. This will force all of the adapters using IPv4 to renew their IP addresses.

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

4. Use ipconfig /renew6 to renew all ipv6 connections.

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 


Managing Tasks from the Command Prompt


The Windows Task Manager is the place to manage running tasks on your system, but we can also manage tasks directly from the command prompt with tasklist and taskkill.

1. List all of the running tasks by entering the command and pressing Enter. This will produce a list of applications, memory usage and a Process ID (PID).

tasklist

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

2. Use findstr to filter the tasks. In our example we are looking for “Inkscape”.

tasklist | findstr “inkscape”

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

3. Use taskkill to kill the session using its PID. In our example Inkscape’s PID is 1544.

taskkill /PID 1544

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 


File Associations


We take it for granted that when we click on a file, it opens in the correct application. While we can edit the default application for a file type via the GUI, we can also do this via the command prompt. The assoc command is how we list and add a file association.

1. List the current files and their associated applications using assoc, press Enter to run.

assoc

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

2. Search for specific file associations using findstr and a string to search for. In our example let's search for the application associated with CSV files.

assoc | findstr csv

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

3. Associate CSV files to a text file, opened by Notepad. This is safer than opening the file directly in Microsoft Excel, where we can check the file before importing into Excel.

assoc .csv=txtfile

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

4. Repeat the search using assoc. You will now see that .csv files are linked to text files.

assoc | findstr csv

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 


Saving to the Clipboard


  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

Saving the output of a command to the clipboard can be a laborious task. Highlight the text, right click, copy and then paste into the document. But what if we could save the output on the fly? Using clip we can pipe the output of a command to the clipboard, from where we can paste it into a document.

1. Run the assoc command and pipe the output to the clipboard. The output of the command is redirected to the clipboard.

assoc | clip

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

2. Open a text editor and paste the contents of the clipboard.

  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 


Detailed System Information


  <https://vanilla.futurecdn.net/tomshardware/media/img/missing-image.svg> 

(Image credit: Tom's Hardware) 

 If you need to know everything about your system then the systeminfo command is for you. This command will output information such as

*	Memory
*	CPU
*	Hotfixes
*	Network
*	BIOS

Run the command from the command prompt. The output can be piped to clip for easy reading in a text editor.

systeminfo

Automatically Reboot into the BIOS


If you want to make changes – switching your boot order, for example – using your computer’s UEFI setup program, then you either need to know the right key to hit to enter your BIOS <https://www.tomshardware.com/reviews/bios-keys-to-access-your-firmware,5732.html> . Or you can use this command to do it all for you.

shutdown /r /fw /f /t 0

The basic shutdown command can take a number of switches.

/r to reboot

/fw to boot the BIOS

/f to force applications to close

/t 0 to reboot now, with 0 referring to zero seconds.

https://www.tomshardware.com/how-to/use-windows-command-prompt

 

     David Goldfield 

Assistive Technology Specialist

 

Feel free to visit my Web site

WWW.DavidGoldfield.info <http://WWW.DavidGoldfield.info> 

_._,_._,_

  _____  

Groups.io Links:

You receive all messages sent to this group. 

View/Reply Online (#2828) <https://groups.io/g/tech-vi/message/2828>  | Reply To Group <mailto:tech-vi at groups.io?subject=Re:%20%5Btech-vi%20Announce%20List%5D%20How%20To%20Perform%20Common%20Tasks%20in%20Windows%20Command%20Prompt>  | Reply To Sender <mailto:david.goldfield at outlook.com?subject=Private:%20Re:%20%5Btech-vi%20Announce%20List%5D%20How%20To%20Perform%20Common%20Tasks%20in%20Windows%20Command%20Prompt>  | Mute This Topic <https://groups.io/mt/94487227/318502>  | New Topic <https://groups.io/g/tech-vi/post> 
Your Subscription <https://groups.io/g/tech-vi/editsub/318502>  | Contact Group Owner <mailto:tech-vi+owner at groups.io>  | Unsubscribe <https://groups.io/g/tech-vi/leave/11013341/318502/1820159643/xyzzy>  [floza58 at bellsouth.net]

_._,_._,_

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nfbnet.org/pipermail/sc-cstd_nfbnet.org/attachments/20221021/1efcb310/attachment.html>


More information about the SC-CSTD mailing list