How To Start A Program With Its Name





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







2















I've installed Matlab on my Ubuntu 18.04. Every time I want to open it I need to call it.



/usr/local/MATLAB/R2017a/bin/matlab


I think it is too long and waste of a little time. There has to be an easier way to open it. How can I open it simply by writing its name or is there any easier way?










share|improve this question


















  • 1





    You can add it to "path", or create an alias.

    – Pilot6
    Mar 16 at 9:09


















2















I've installed Matlab on my Ubuntu 18.04. Every time I want to open it I need to call it.



/usr/local/MATLAB/R2017a/bin/matlab


I think it is too long and waste of a little time. There has to be an easier way to open it. How can I open it simply by writing its name or is there any easier way?










share|improve this question


















  • 1





    You can add it to "path", or create an alias.

    – Pilot6
    Mar 16 at 9:09














2












2








2


2






I've installed Matlab on my Ubuntu 18.04. Every time I want to open it I need to call it.



/usr/local/MATLAB/R2017a/bin/matlab


I think it is too long and waste of a little time. There has to be an easier way to open it. How can I open it simply by writing its name or is there any easier way?










share|improve this question














I've installed Matlab on my Ubuntu 18.04. Every time I want to open it I need to call it.



/usr/local/MATLAB/R2017a/bin/matlab


I think it is too long and waste of a little time. There has to be an easier way to open it. How can I open it simply by writing its name or is there any easier way?







filesystem installed-programs






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 16 at 9:08









sarpsarp

4828




4828








  • 1





    You can add it to "path", or create an alias.

    – Pilot6
    Mar 16 at 9:09














  • 1





    You can add it to "path", or create an alias.

    – Pilot6
    Mar 16 at 9:09








1




1





You can add it to "path", or create an alias.

– Pilot6
Mar 16 at 9:09





You can add it to "path", or create an alias.

– Pilot6
Mar 16 at 9:09










2 Answers
2






active

oldest

votes


















2














Add this to your ~/.bashrc file



export PATH=/usr/local/MATLAB/R2017a/bin:$PATH





share|improve this answer





















  • 3





    It didn't work at first, but a little research on the net solved it. It should be without "matlab" at the end. Like this: export PATH=/usr/local/MATLAB/R2017a/bin:$PATH

    – sarp
    Mar 16 at 9:27





















2














You can either add /usr/local/MATLAB/R2017a/bin/ to your PATH or create another script in a proper directory of executables in your home.



To do the second one follow the steps below.




  1. Create a folder named bin in your home directory. (Note: This assumes the directory ~/bin/ is included in your PATH. If it isn't, you need to add it to your path first.)

  2. Create a text file named matlab (the command you want to use) in the the aforementioned crated folder (i.e. in ~/bin/).


  3. Add the following lines to the matlab file



    #!/bin/bash
    /usr/local/MATLAB/R2017a/bin/matlab


  4. Save the matlab file and make it executable.






share|improve this answer


























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    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%2faskubuntu.com%2fquestions%2f1126129%2fhow-to-start-a-program-with-its-name%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









    2














    Add this to your ~/.bashrc file



    export PATH=/usr/local/MATLAB/R2017a/bin:$PATH





    share|improve this answer





















    • 3





      It didn't work at first, but a little research on the net solved it. It should be without "matlab" at the end. Like this: export PATH=/usr/local/MATLAB/R2017a/bin:$PATH

      – sarp
      Mar 16 at 9:27


















    2














    Add this to your ~/.bashrc file



    export PATH=/usr/local/MATLAB/R2017a/bin:$PATH





    share|improve this answer





















    • 3





      It didn't work at first, but a little research on the net solved it. It should be without "matlab" at the end. Like this: export PATH=/usr/local/MATLAB/R2017a/bin:$PATH

      – sarp
      Mar 16 at 9:27
















    2












    2








    2







    Add this to your ~/.bashrc file



    export PATH=/usr/local/MATLAB/R2017a/bin:$PATH





    share|improve this answer















    Add this to your ~/.bashrc file



    export PATH=/usr/local/MATLAB/R2017a/bin:$PATH






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Mar 16 at 12:31









    pomsky

    33.6k11105137




    33.6k11105137










    answered Mar 16 at 9:13









    matcheekmatcheek

    1436




    1436








    • 3





      It didn't work at first, but a little research on the net solved it. It should be without "matlab" at the end. Like this: export PATH=/usr/local/MATLAB/R2017a/bin:$PATH

      – sarp
      Mar 16 at 9:27
















    • 3





      It didn't work at first, but a little research on the net solved it. It should be without "matlab" at the end. Like this: export PATH=/usr/local/MATLAB/R2017a/bin:$PATH

      – sarp
      Mar 16 at 9:27










    3




    3





    It didn't work at first, but a little research on the net solved it. It should be without "matlab" at the end. Like this: export PATH=/usr/local/MATLAB/R2017a/bin:$PATH

    – sarp
    Mar 16 at 9:27







    It didn't work at first, but a little research on the net solved it. It should be without "matlab" at the end. Like this: export PATH=/usr/local/MATLAB/R2017a/bin:$PATH

    – sarp
    Mar 16 at 9:27















    2














    You can either add /usr/local/MATLAB/R2017a/bin/ to your PATH or create another script in a proper directory of executables in your home.



    To do the second one follow the steps below.




    1. Create a folder named bin in your home directory. (Note: This assumes the directory ~/bin/ is included in your PATH. If it isn't, you need to add it to your path first.)

    2. Create a text file named matlab (the command you want to use) in the the aforementioned crated folder (i.e. in ~/bin/).


    3. Add the following lines to the matlab file



      #!/bin/bash
      /usr/local/MATLAB/R2017a/bin/matlab


    4. Save the matlab file and make it executable.






    share|improve this answer






























      2














      You can either add /usr/local/MATLAB/R2017a/bin/ to your PATH or create another script in a proper directory of executables in your home.



      To do the second one follow the steps below.




      1. Create a folder named bin in your home directory. (Note: This assumes the directory ~/bin/ is included in your PATH. If it isn't, you need to add it to your path first.)

      2. Create a text file named matlab (the command you want to use) in the the aforementioned crated folder (i.e. in ~/bin/).


      3. Add the following lines to the matlab file



        #!/bin/bash
        /usr/local/MATLAB/R2017a/bin/matlab


      4. Save the matlab file and make it executable.






      share|improve this answer




























        2












        2








        2







        You can either add /usr/local/MATLAB/R2017a/bin/ to your PATH or create another script in a proper directory of executables in your home.



        To do the second one follow the steps below.




        1. Create a folder named bin in your home directory. (Note: This assumes the directory ~/bin/ is included in your PATH. If it isn't, you need to add it to your path first.)

        2. Create a text file named matlab (the command you want to use) in the the aforementioned crated folder (i.e. in ~/bin/).


        3. Add the following lines to the matlab file



          #!/bin/bash
          /usr/local/MATLAB/R2017a/bin/matlab


        4. Save the matlab file and make it executable.






        share|improve this answer















        You can either add /usr/local/MATLAB/R2017a/bin/ to your PATH or create another script in a proper directory of executables in your home.



        To do the second one follow the steps below.




        1. Create a folder named bin in your home directory. (Note: This assumes the directory ~/bin/ is included in your PATH. If it isn't, you need to add it to your path first.)

        2. Create a text file named matlab (the command you want to use) in the the aforementioned crated folder (i.e. in ~/bin/).


        3. Add the following lines to the matlab file



          #!/bin/bash
          /usr/local/MATLAB/R2017a/bin/matlab


        4. Save the matlab file and make it executable.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 19 at 10:14

























        answered Feb 15 at 11:46









        pomskypomsky

        33.6k11105137




        33.6k11105137






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • 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%2faskubuntu.com%2fquestions%2f1126129%2fhow-to-start-a-program-with-its-name%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

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?