alias in Terminal

  • | 2407 points


    I want to setup some alias names for use in the Laragon Terminal program.

    An example is "alias pu=phpunit". I have add this line to Settings > Startup > Enviroment

    If I type "alias pu" it returns "pu=phpunit". If I type pu it gives the message "'pu' is not recognized as an internal or external command, operable program or batch file."

    I want to be able to type pu and get phpunit, or puf function and get phpunit --filter function.

    I must not understand how it is suppose to work. Can anyone explain it to me?

  • | 646 points


    You should update Cmder in : \laragon\Cmder

    • Rename your current \cmder folder in Cmder.bak and create a new one named Cmder
    • Download the last version on
    • Extract files in your newly created folder
    • Launch Cmder and create an alias, it should work

  • | 2407 points

    Thanks for you help. I followed your instructions and it worked as you described. Alias is now working.

    A side effect though is that git has stopped working. I get the following:

    'git' is not recognized as an internal or external command,
    operable program or batch file.

    Same with npm.

  • | 646 points

    Did you download the mini or full version ?
    The mini version doesn't include Git.
    So you can :

    Get the full version and it should work
    Add the PATH environnement variable of Git in Cmder settings > Environnement.
    For example if Git is installed in C:\Program Files, add (on a new line) :

    set PATH=C:\Program Files\git\cmd;%PATH%

    Hope this helps !

  • | 2407 points

    Perfect. Thanks. I did get the mini version.

  • | 53 points

    Hi. I was facing the same problem. Updating the cmder solved the alias problem, but in my case, the php command is no more recognized.
    I tryed switch the php version but nothing works.

    Any idea how to resolve this?

  • | 2407 points

    @henryavila my only thought is the path. Check to see if php is in your path. Mine is listed as C:\laragon\bin\php\php-7.3.2-Win32-VC15-x64;

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.