• Skip to main content
  • Skip to after header navigation
  • Skip to site footer

Free-Mail

  • Events
  • Images
    • Instagram Goodness
  • Music
  • News
  • Software

Use open source commands in Powershell

Use open source commands in Powershell: Use open source commands in Powershell Alan Smithee Sat, 10/22/2022 – 03:00

When you launch an application on an operating system, there are certain code libraries and utility applications that your OS needs to use for that app to run. Your OS knows how to find these libraries and utilities because it has a system path, a map to common shared data that lots of apps need. Every OS has this, but users aren’t usually aware of it because they don’t usually need to care about it. However, when you start coding or using special network utilities or commands, you might care about your own PATH variable.

More great content
Free online course: RHEL technical overview
Learn advanced Linux commands
Download cheat sheets
Find an open source alternative
Explore open source resources

The PATH variable makes it so that you can save commands to a consistent location, and use them from anywhere on your system using the command prompt or the more powerful (and open source) Powershell.

For instance, say you want to install the open source application pscp.exe, a command-line interface to the famous PuTTY OpenSSH client on Windows. You can download it to your hard drive, but how does your command-line know that it exists? Well at first, it doesn’t:
 

 
PS> pscp
pscp: The term 'pscp' is not recognized as the name of a cmdlet, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

If you’re using an open source command line, such as Powershell or Cmder, you get a useful error hinting that this might be a problem with your path (or the lack thereof). Here’s how to solve that problem.

Setting a PATH

  1. First, create a folder called App on your Desktop.

  2. Next, right-click on the Windows menu in the bottom left corner of your screen, and select System.

Image of the Windows menu system.
Image by:

(Alan Smithee, CC BY-SA 4.0)

  1. In the System window that appears, click the link to Advanced system settings on the left of the window.

  2. In the System properties window that appears, click the Environment variables button at the bottom of the window.

Image Windows system enviroment variables.
Image by:

(Alan Smithee, CC BY-SA 4.0)

  1. In the Environment variables window, click the New button under the User variables panel.
Image of new Windows enviroment variables.
Image by:

(Alan Smithee, CC BY-SA 4.0)

  1. In the dialog box that appears, enter PATH for the Variable name field, and %USERPROFILE\Desktop\App for the Variable value field. Click the OK button to save your changes.
Image of Windows path set.
Image by:

(Alan Smithee, CC BY-SA 4.0)

Place commands and applications you want to have access to from a command prompt in Desktop\Apps and Powershell, Cmder, and even Cmd will find them:
 

 
PS> pscp –version
pscp: Release 0.XY
Build platform: 64-bit x86 Windows
PS>

Automatic PATH settings

Many applications get automatically added to the system path during installation. However, not all of them do, either because you missed a check box during the install process, or because the application developer expects you to add it yourself. When automatic paths fail, you now know how to forge your own path.

Set your path on Windows so you can use open source commands.

bash logo on green background
Image by:

Opensource.com

Command line
Windows

What to read next
Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.
Register or Login to post a comment.

: Opensource.com Alan Smithee

Supporting Open Source.

Have you tried: Travelling to South Africa?

Share this:

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Pinterest (Opens in new window) Pinterest
  • Email a link to a friend (Opens in new window) Email
  • More
  • Share on Tumblr (Opens in new window) Tumblr
  • Print (Opens in new window) Print
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Reddit (Opens in new window) Reddit
Published on 22 October 2022 by Alan Category: SoftwareTag: commands, Open, PowerShell, Source

Dry Drowning: What Parents Need to Know

Table of Contents Toggle What is Dry Drowning? How it Happens Warning Signs to Watch For Preventing …

Read moreDry Drowning: What Parents Need to Know

Trending Now: Busisiwe Mkhwebane

These are the latest trending searches on Google right now: Busisiwe Mkhwebane: : Hot Trends Have …

Read moreTrending Now: Busisiwe Mkhwebane

As we Approach 130 Days of Loadshedding the Demand for Replacement Batteries Spikes

As we Approach 130 Days of Loadshedding the Demand for Replacement Batteries Spikes: Today we answer …

Read moreAs we Approach 130 Days of Loadshedding the Demand for Replacement Batteries Spikes

About Alan

Previous Post:WordCamp Granada 2019
Next Post:Trending Now: Cambly

Reach Trust

Reach Trust is a holding trust for a number of companies within the Stratlec Group.

Copyright © 2026 · Free-Mail · All Rights Reserved · Powered by Straton Electrical

Back to top