Software Development https://purushotam.in/ en Create alias for frequently used commands https://purushotam.in/notes/create-alias-frequently-used-commands <span property="schema:name">Create alias for frequently used commands</span> <span rel="schema:author"><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">purushotam</span></span> <span property="schema:dateCreated" content="2021-03-04T15:43:13+00:00">Thu, 03/04/2021 - 16:43</span> <div property="schema:text" class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>No one wants to waste time on unnecessary things, especially a developer. If you frequently use a command on your terminal/command line, I would recommend creating a command alias to save some seconds (I guess).</p> <p>I would make it quick, let's assume you want to navigate to some directory from anywhere and you want to avoid typing cd .... bla bla bla bla. So, let's make the alias for this.</p> <p>Open the terminal and edit the .bash_profile</p> <p><code>sudo nano ~/.bash_profile</code></p> <p>Add the following line in the file </p> <p><code>alias ms='cd ~/Sites/my_site'</code></p> <p>Save the file, exit and restart the terminal. and try your command, for the above case it's 'ms'. And here you go, you saved some milliseconds or seconds ;)</p> <p> </p> <p> </p> </div> Thu, 04 Mar 2021 15:43:13 +0000 purushotam 40 at https://purushotam.in