Linux – How to use start command in bash on Windows

windowswindows-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:\Users\Nek>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

Best Answer

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:\WINDOWS\System32 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).
Related Question