Skip to content

Find the path to a command

August 22, 2012

Purpose

This page will show you how to find the path to a command in both Windows and Linux. For example, say you have multiple versions of java JDK installed on your computer and you want to see which version is actually being called when you type in the “java” command into your command prompt or terminal. These commands will help you determine which version is called instead of having to go through your environment variables.

Windows

Use the “where” keyword in the DOS command prompt

Example:

$ where java

Linux

Use the “which” keyword in the terminal

Example:

$ which java
Advertisements

From → Guide

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: