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;
}







3















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










share|improve this question































    3















    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










    share|improve this question



























      3












      3








      3








      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










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 26 '17 at 5:40







      nekketsuuu

















      asked Feb 24 '17 at 7:44









      nekketsuuunekketsuuu

      11817




      11817






















          2 Answers
          2






          active

          oldest

          votes


















          4














          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).






          share|improve this answer


























          • 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













          • Maybe system32 -> System32

            – nekketsuuu
            Feb 24 '17 at 12:32






          • 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






          • 1





            Thanks; I added alias open='cmd.exe /c start ""' to my .bashrc.

            – dimo414
            May 26 '17 at 4:06



















          1














          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"
          }





          share|improve this answer
























            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
            });


            }
            });














            draft saved

            draft discarded


















            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









            4














            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).






            share|improve this answer


























            • 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













            • Maybe system32 -> System32

              – nekketsuuu
              Feb 24 '17 at 12:32






            • 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






            • 1





              Thanks; I added alias open='cmd.exe /c start ""' to my .bashrc.

              – dimo414
              May 26 '17 at 4:06
















            4














            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).






            share|improve this answer


























            • 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













            • Maybe system32 -> System32

              – nekketsuuu
              Feb 24 '17 at 12:32






            • 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






            • 1





              Thanks; I added alias open='cmd.exe /c start ""' to my .bashrc.

              – dimo414
              May 26 '17 at 4:06














            4












            4








            4







            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).






            share|improve this 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: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).







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Feb 24 '17 at 12:30

























            answered Feb 24 '17 at 12:11









            DavidPostillDavidPostill

            108k27235271




            108k27235271













            • 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













            • Maybe system32 -> System32

              – nekketsuuu
              Feb 24 '17 at 12:32






            • 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






            • 1





              Thanks; I added alias 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











            • @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






            • 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






            • 1





              Thanks; I added alias 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













            1














            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"
            }





            share|improve this answer




























              1














              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"
              }





              share|improve this answer


























                1












                1








                1







                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"
                }





                share|improve this answer













                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"
                }






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 6 at 20:58









                Alex GAlex G

                111




                111






























                    draft saved

                    draft discarded




















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Plaza Victoria

                    In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                    How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...