How to use start command in bash on Windows
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I want to use Windows' start
command in bash on Ubuntu on Windows (i.e., WSL).
However, I couldn't use it by simply typing start
:
nek@NEK:/mnt/c/Users/Nek$ start test.txt
Command 'start' is available in '/sbin/start'
The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
start: command not found
And I noticed that start.exe
might not exist.
C:UsersNek>where start
INFO: Could not find files for the given pattern(s).
Is start
a builtin command? Can we use start
in bash?
Environment
- Windows 10 build 14393.693 (Update: This version is old for executing
.exe
files on bash. I should update Windows build >= 14951, and then follow the answer.) - Bash on Ubuntu on Windows (bash 4.3.11(1)-release x86_64-pc-linux-gnu, Ubuntu 14.04)
Related Links
"How can I “open” a file from WSL with the default application?" -- superuser
"Interop between Windows and Bash" -- Windows Command Line Tools For Developers
windows windows-subsystem-for-linux
add a comment |
I want to use Windows' start
command in bash on Ubuntu on Windows (i.e., WSL).
However, I couldn't use it by simply typing start
:
nek@NEK:/mnt/c/Users/Nek$ start test.txt
Command 'start' is available in '/sbin/start'
The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
start: command not found
And I noticed that start.exe
might not exist.
C:UsersNek>where start
INFO: Could not find files for the given pattern(s).
Is start
a builtin command? Can we use start
in bash?
Environment
- Windows 10 build 14393.693 (Update: This version is old for executing
.exe
files on bash. I should update Windows build >= 14951, and then follow the answer.) - Bash on Ubuntu on Windows (bash 4.3.11(1)-release x86_64-pc-linux-gnu, Ubuntu 14.04)
Related Links
"How can I “open” a file from WSL with the default application?" -- superuser
"Interop between Windows and Bash" -- Windows Command Line Tools For Developers
windows windows-subsystem-for-linux
add a comment |
I want to use Windows' start
command in bash on Ubuntu on Windows (i.e., WSL).
However, I couldn't use it by simply typing start
:
nek@NEK:/mnt/c/Users/Nek$ start test.txt
Command 'start' is available in '/sbin/start'
The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
start: command not found
And I noticed that start.exe
might not exist.
C:UsersNek>where start
INFO: Could not find files for the given pattern(s).
Is start
a builtin command? Can we use start
in bash?
Environment
- Windows 10 build 14393.693 (Update: This version is old for executing
.exe
files on bash. I should update Windows build >= 14951, and then follow the answer.) - Bash on Ubuntu on Windows (bash 4.3.11(1)-release x86_64-pc-linux-gnu, Ubuntu 14.04)
Related Links
"How can I “open” a file from WSL with the default application?" -- superuser
"Interop between Windows and Bash" -- Windows Command Line Tools For Developers
windows windows-subsystem-for-linux
I want to use Windows' start
command in bash on Ubuntu on Windows (i.e., WSL).
However, I couldn't use it by simply typing start
:
nek@NEK:/mnt/c/Users/Nek$ start test.txt
Command 'start' is available in '/sbin/start'
The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
start: command not found
And I noticed that start.exe
might not exist.
C:UsersNek>where start
INFO: Could not find files for the given pattern(s).
Is start
a builtin command? Can we use start
in bash?
Environment
- Windows 10 build 14393.693 (Update: This version is old for executing
.exe
files on bash. I should update Windows build >= 14951, and then follow the answer.) - Bash on Ubuntu on Windows (bash 4.3.11(1)-release x86_64-pc-linux-gnu, Ubuntu 14.04)
Related Links
"How can I “open” a file from WSL with the default application?" -- superuser
"Interop between Windows and Bash" -- Windows Command Line Tools For Developers
windows windows-subsystem-for-linux
windows windows-subsystem-for-linux
edited May 26 '17 at 5:40
nekketsuuu
asked Feb 24 '17 at 7:44
nekketsuuunekketsuuu
11817
11817
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Is start a builtin command?
Yes.
Internal commands
The Windows CMD shell CMD.exe contains a number of 'internal'
commands, additional 'external' commands are also supplied as separate
executable files. External commands are generally stored in the
C:WINDOWSSystem32 folder, this folder is part of the system PATH .
This arrangement means that both internal and external commands are
always available no matter what your current directory happens to be.
ASSOC, BREAK, CALL ,CD/CHDIR, CLS, COLOR, COPY, DATE, DEL, DIR, DPATH,
ECHO, ENDLOCAL, ERASE, EXIT, FOR, FTYPE, GOTO, IF, KEYS, MD/MKDIR,
MKLINK (vista and above), MOVE, PATH, PAUSE, POPD, PROMPT, PUSHD, REM,
REN/RENAME, RD/RMDIR, SET, SETLOCAL, SHIFT, START, TIME, TITLE, TYPE,
VER, VERIFY, VOL
Source syntax-internal
Can we use start in bash?
Yes. Start a command shell and run the start command.
Example:
cmd.exe /c start "" test.txt
If this doesn't work specify the full path as follows:
/mnt/c/Windows/system32/cmd.exe /c start "" test.txt
Further Reading
An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
cmd - Start a new CMD shell and (optionally) run a command/executable program.
start - Start a program, command or batch script (opens in a new window).
Thanks for your answer, but the commandcmd
is not found on bash. Am I missing something? (Currently, I doubt whether build version is old.)
– nekketsuuu
Feb 24 '17 at 12:25
@nekketsuuu You need to add.exe
Try usingcmd.exe ...
or specify the full path/mnt/c/Windows/system32/cmd.exe ...
. Answer updated.
– DavidPostill♦
Feb 24 '17 at 12:28
Maybe system32 -> System32
– nekketsuuu
Feb 24 '17 at 12:32
1
In my trial,/mnt/c/Windows/system32/cmd.exe ...
caused a bash errorNo such file or directory
, and/mnt/c/Windows/System32/cmd.exe ...
causedcannot execute binary file: Exec format error
. So I'll update Windows Insider Build and try again. Anyway, Thank you for your answer!
– nekketsuuu
Feb 24 '17 at 12:54
1
Thanks; I addedalias open='cmd.exe /c start ""'
to my.bashrc
.
– dimo414
May 26 '17 at 4:06
|
show 5 more comments
The above answer didn't work for me - cmd.exe is expecting a windows path (C:thisthat
) rather than a linux path. The following shell function got me up and running:
function start {
wpath="$(/bin/wslpath -w '$@')"
cmd.exe /c start "" "$wpath"
}
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1182275%2fhow-to-use-start-command-in-bash-on-windows%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is start a builtin command?
Yes.
Internal commands
The Windows CMD shell CMD.exe contains a number of 'internal'
commands, additional 'external' commands are also supplied as separate
executable files. External commands are generally stored in the
C:WINDOWSSystem32 folder, this folder is part of the system PATH .
This arrangement means that both internal and external commands are
always available no matter what your current directory happens to be.
ASSOC, BREAK, CALL ,CD/CHDIR, CLS, COLOR, COPY, DATE, DEL, DIR, DPATH,
ECHO, ENDLOCAL, ERASE, EXIT, FOR, FTYPE, GOTO, IF, KEYS, MD/MKDIR,
MKLINK (vista and above), MOVE, PATH, PAUSE, POPD, PROMPT, PUSHD, REM,
REN/RENAME, RD/RMDIR, SET, SETLOCAL, SHIFT, START, TIME, TITLE, TYPE,
VER, VERIFY, VOL
Source syntax-internal
Can we use start in bash?
Yes. Start a command shell and run the start command.
Example:
cmd.exe /c start "" test.txt
If this doesn't work specify the full path as follows:
/mnt/c/Windows/system32/cmd.exe /c start "" test.txt
Further Reading
An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
cmd - Start a new CMD shell and (optionally) run a command/executable program.
start - Start a program, command or batch script (opens in a new window).
Thanks for your answer, but the commandcmd
is not found on bash. Am I missing something? (Currently, I doubt whether build version is old.)
– nekketsuuu
Feb 24 '17 at 12:25
@nekketsuuu You need to add.exe
Try usingcmd.exe ...
or specify the full path/mnt/c/Windows/system32/cmd.exe ...
. Answer updated.
– DavidPostill♦
Feb 24 '17 at 12:28
Maybe system32 -> System32
– nekketsuuu
Feb 24 '17 at 12:32
1
In my trial,/mnt/c/Windows/system32/cmd.exe ...
caused a bash errorNo such file or directory
, and/mnt/c/Windows/System32/cmd.exe ...
causedcannot execute binary file: Exec format error
. So I'll update Windows Insider Build and try again. Anyway, Thank you for your answer!
– nekketsuuu
Feb 24 '17 at 12:54
1
Thanks; I addedalias open='cmd.exe /c start ""'
to my.bashrc
.
– dimo414
May 26 '17 at 4:06
|
show 5 more comments
Is start a builtin command?
Yes.
Internal commands
The Windows CMD shell CMD.exe contains a number of 'internal'
commands, additional 'external' commands are also supplied as separate
executable files. External commands are generally stored in the
C:WINDOWSSystem32 folder, this folder is part of the system PATH .
This arrangement means that both internal and external commands are
always available no matter what your current directory happens to be.
ASSOC, BREAK, CALL ,CD/CHDIR, CLS, COLOR, COPY, DATE, DEL, DIR, DPATH,
ECHO, ENDLOCAL, ERASE, EXIT, FOR, FTYPE, GOTO, IF, KEYS, MD/MKDIR,
MKLINK (vista and above), MOVE, PATH, PAUSE, POPD, PROMPT, PUSHD, REM,
REN/RENAME, RD/RMDIR, SET, SETLOCAL, SHIFT, START, TIME, TITLE, TYPE,
VER, VERIFY, VOL
Source syntax-internal
Can we use start in bash?
Yes. Start a command shell and run the start command.
Example:
cmd.exe /c start "" test.txt
If this doesn't work specify the full path as follows:
/mnt/c/Windows/system32/cmd.exe /c start "" test.txt
Further Reading
An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
cmd - Start a new CMD shell and (optionally) run a command/executable program.
start - Start a program, command or batch script (opens in a new window).
Thanks for your answer, but the commandcmd
is not found on bash. Am I missing something? (Currently, I doubt whether build version is old.)
– nekketsuuu
Feb 24 '17 at 12:25
@nekketsuuu You need to add.exe
Try usingcmd.exe ...
or specify the full path/mnt/c/Windows/system32/cmd.exe ...
. Answer updated.
– DavidPostill♦
Feb 24 '17 at 12:28
Maybe system32 -> System32
– nekketsuuu
Feb 24 '17 at 12:32
1
In my trial,/mnt/c/Windows/system32/cmd.exe ...
caused a bash errorNo such file or directory
, and/mnt/c/Windows/System32/cmd.exe ...
causedcannot execute binary file: Exec format error
. So I'll update Windows Insider Build and try again. Anyway, Thank you for your answer!
– nekketsuuu
Feb 24 '17 at 12:54
1
Thanks; I addedalias open='cmd.exe /c start ""'
to my.bashrc
.
– dimo414
May 26 '17 at 4:06
|
show 5 more comments
Is start a builtin command?
Yes.
Internal commands
The Windows CMD shell CMD.exe contains a number of 'internal'
commands, additional 'external' commands are also supplied as separate
executable files. External commands are generally stored in the
C:WINDOWSSystem32 folder, this folder is part of the system PATH .
This arrangement means that both internal and external commands are
always available no matter what your current directory happens to be.
ASSOC, BREAK, CALL ,CD/CHDIR, CLS, COLOR, COPY, DATE, DEL, DIR, DPATH,
ECHO, ENDLOCAL, ERASE, EXIT, FOR, FTYPE, GOTO, IF, KEYS, MD/MKDIR,
MKLINK (vista and above), MOVE, PATH, PAUSE, POPD, PROMPT, PUSHD, REM,
REN/RENAME, RD/RMDIR, SET, SETLOCAL, SHIFT, START, TIME, TITLE, TYPE,
VER, VERIFY, VOL
Source syntax-internal
Can we use start in bash?
Yes. Start a command shell and run the start command.
Example:
cmd.exe /c start "" test.txt
If this doesn't work specify the full path as follows:
/mnt/c/Windows/system32/cmd.exe /c start "" test.txt
Further Reading
An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
cmd - Start a new CMD shell and (optionally) run a command/executable program.
start - Start a program, command or batch script (opens in a new window).
Is start a builtin command?
Yes.
Internal commands
The Windows CMD shell CMD.exe contains a number of 'internal'
commands, additional 'external' commands are also supplied as separate
executable files. External commands are generally stored in the
C:WINDOWSSystem32 folder, this folder is part of the system PATH .
This arrangement means that both internal and external commands are
always available no matter what your current directory happens to be.
ASSOC, BREAK, CALL ,CD/CHDIR, CLS, COLOR, COPY, DATE, DEL, DIR, DPATH,
ECHO, ENDLOCAL, ERASE, EXIT, FOR, FTYPE, GOTO, IF, KEYS, MD/MKDIR,
MKLINK (vista and above), MOVE, PATH, PAUSE, POPD, PROMPT, PUSHD, REM,
REN/RENAME, RD/RMDIR, SET, SETLOCAL, SHIFT, START, TIME, TITLE, TYPE,
VER, VERIFY, VOL
Source syntax-internal
Can we use start in bash?
Yes. Start a command shell and run the start command.
Example:
cmd.exe /c start "" test.txt
If this doesn't work specify the full path as follows:
/mnt/c/Windows/system32/cmd.exe /c start "" test.txt
Further Reading
An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
cmd - Start a new CMD shell and (optionally) run a command/executable program.
start - Start a program, command or batch script (opens in a new window).
edited Feb 24 '17 at 12:30
answered Feb 24 '17 at 12:11
DavidPostill♦DavidPostill
108k27235271
108k27235271
Thanks for your answer, but the commandcmd
is not found on bash. Am I missing something? (Currently, I doubt whether build version is old.)
– nekketsuuu
Feb 24 '17 at 12:25
@nekketsuuu You need to add.exe
Try usingcmd.exe ...
or specify the full path/mnt/c/Windows/system32/cmd.exe ...
. Answer updated.
– DavidPostill♦
Feb 24 '17 at 12:28
Maybe system32 -> System32
– nekketsuuu
Feb 24 '17 at 12:32
1
In my trial,/mnt/c/Windows/system32/cmd.exe ...
caused a bash errorNo such file or directory
, and/mnt/c/Windows/System32/cmd.exe ...
causedcannot execute binary file: Exec format error
. So I'll update Windows Insider Build and try again. Anyway, Thank you for your answer!
– nekketsuuu
Feb 24 '17 at 12:54
1
Thanks; I addedalias open='cmd.exe /c start ""'
to my.bashrc
.
– dimo414
May 26 '17 at 4:06
|
show 5 more comments
Thanks for your answer, but the commandcmd
is not found on bash. Am I missing something? (Currently, I doubt whether build version is old.)
– nekketsuuu
Feb 24 '17 at 12:25
@nekketsuuu You need to add.exe
Try usingcmd.exe ...
or specify the full path/mnt/c/Windows/system32/cmd.exe ...
. Answer updated.
– DavidPostill♦
Feb 24 '17 at 12:28
Maybe system32 -> System32
– nekketsuuu
Feb 24 '17 at 12:32
1
In my trial,/mnt/c/Windows/system32/cmd.exe ...
caused a bash errorNo such file or directory
, and/mnt/c/Windows/System32/cmd.exe ...
causedcannot execute binary file: Exec format error
. So I'll update Windows Insider Build and try again. Anyway, Thank you for your answer!
– nekketsuuu
Feb 24 '17 at 12:54
1
Thanks; I addedalias open='cmd.exe /c start ""'
to my.bashrc
.
– dimo414
May 26 '17 at 4:06
Thanks for your answer, but the command
cmd
is not found on bash. Am I missing something? (Currently, I doubt whether build version is old.)– nekketsuuu
Feb 24 '17 at 12:25
Thanks for your answer, but the command
cmd
is not found on bash. Am I missing something? (Currently, I doubt whether build version is old.)– nekketsuuu
Feb 24 '17 at 12:25
@nekketsuuu You need to add
.exe
Try using cmd.exe ...
or specify the full path /mnt/c/Windows/system32/cmd.exe ...
. Answer updated.– DavidPostill♦
Feb 24 '17 at 12:28
@nekketsuuu You need to add
.exe
Try using cmd.exe ...
or specify the full path /mnt/c/Windows/system32/cmd.exe ...
. Answer updated.– DavidPostill♦
Feb 24 '17 at 12:28
Maybe system32 -> System32
– nekketsuuu
Feb 24 '17 at 12:32
Maybe system32 -> System32
– nekketsuuu
Feb 24 '17 at 12:32
1
1
In my trial,
/mnt/c/Windows/system32/cmd.exe ...
caused a bash error No such file or directory
, and /mnt/c/Windows/System32/cmd.exe ...
caused cannot execute binary file: Exec format error
. So I'll update Windows Insider Build and try again. Anyway, Thank you for your answer!– nekketsuuu
Feb 24 '17 at 12:54
In my trial,
/mnt/c/Windows/system32/cmd.exe ...
caused a bash error No such file or directory
, and /mnt/c/Windows/System32/cmd.exe ...
caused cannot execute binary file: Exec format error
. So I'll update Windows Insider Build and try again. Anyway, Thank you for your answer!– nekketsuuu
Feb 24 '17 at 12:54
1
1
Thanks; I added
alias open='cmd.exe /c start ""'
to my .bashrc
.– dimo414
May 26 '17 at 4:06
Thanks; I added
alias open='cmd.exe /c start ""'
to my .bashrc
.– dimo414
May 26 '17 at 4:06
|
show 5 more comments
The above answer didn't work for me - cmd.exe is expecting a windows path (C:thisthat
) rather than a linux path. The following shell function got me up and running:
function start {
wpath="$(/bin/wslpath -w '$@')"
cmd.exe /c start "" "$wpath"
}
add a comment |
The above answer didn't work for me - cmd.exe is expecting a windows path (C:thisthat
) rather than a linux path. The following shell function got me up and running:
function start {
wpath="$(/bin/wslpath -w '$@')"
cmd.exe /c start "" "$wpath"
}
add a comment |
The above answer didn't work for me - cmd.exe is expecting a windows path (C:thisthat
) rather than a linux path. The following shell function got me up and running:
function start {
wpath="$(/bin/wslpath -w '$@')"
cmd.exe /c start "" "$wpath"
}
The above answer didn't work for me - cmd.exe is expecting a windows path (C:thisthat
) rather than a linux path. The following shell function got me up and running:
function start {
wpath="$(/bin/wslpath -w '$@')"
cmd.exe /c start "" "$wpath"
}
answered Feb 6 at 20:58
Alex GAlex G
111
111
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1182275%2fhow-to-use-start-command-in-bash-on-windows%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown