<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Different Ways to Create and Use Bash Aliases in Linux	</title>
	<atom:link href="https://www.tecmint.com/create-and-use-bash-aliases-in-linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/create-and-use-bash-aliases-in-linux/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Tue, 16 Dec 2025 03:29:25 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: atomick		</title>
		<link>https://www.tecmint.com/create-and-use-bash-aliases-in-linux/comment-page-1/#comment-2371060</link>

		<dc:creator><![CDATA[atomick]]></dc:creator>
		<pubDate>Tue, 16 Dec 2025 03:29:25 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=41515#comment-2371060</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/create-and-use-bash-aliases-in-linux/comment-page-1/#comment-1430625&quot;&gt;red&lt;/a&gt;.

Now this is excellent.

Such an alias, for example &lt;code&gt;.a=&#039;line shown&#039;&lt;/code&gt;, should be added to your common &lt;code&gt;.bashrc&lt;/code&gt; file. This effectively doubles efficiency—fewer keystrokes, right at your fingertips. It also minimizes the need to re-read &lt;code&gt;.bashrc&lt;/code&gt;, which in turn sources &lt;code&gt;.bash_aliases&lt;/code&gt;.

I did not share it originally, but it is easy to find. This should be added somewhere in your &lt;code&gt;.bashrc&lt;/code&gt;, usually closer to the bottom, or roughly two-thirds of the way down. It is typically implemented as a simple conditional statement, for example:
&lt;pre&gt;
if [ -f ~/.bash_aliases ]; then
    source ~/.bash_aliases
    export PATH=&quot;$PATH:/$HOME&quot;
fi
&lt;/pre&gt;
&lt;strong&gt;Note&lt;/strong&gt;: the &lt;code&gt;PATH&lt;/code&gt; statement shown here is my own addition. This allows search access to my home directory when I open a terminal shell, in addition to the standard system directories. I intentionally avoid an ending colon.

This approach dates back to &lt;code&gt;csh&lt;/code&gt;, &lt;code&gt;sh&lt;/code&gt;, and &lt;code&gt;ksh&lt;/code&gt;, and even early bash. It is no longer commonly set or used this way, as it has historically exposed a memory or execution risk that could be exploited. It is hard to keep up with everything, but by habit I avoid including a trailing colon in any &lt;code&gt;PATH&lt;/code&gt; statement.

I have seen people curious about best placement for &lt;code&gt;PATH&lt;/code&gt; and &lt;code&gt;export PATH&lt;/code&gt; declarations. There are many small tricks like this that can keep newcomers interested and learning.

You can also extend this further by delimiting with colons (without ending with one), for example:
&lt;pre&gt;
export PATH=&quot;$PATH:/$HOME:~/.local/bin/myScripts:/opt/myArchive&quot;
&lt;/pre&gt;
This will search system paths first, then your home directory, followed by &lt;code&gt;~/.local/bin/myScripts&lt;/code&gt;, and finally &lt;code&gt;/opt/myArchive&lt;/code&gt;, where I keep additional tools.

Brilliant ace trick. Thank you, Red.
Cheers.
]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/create-and-use-bash-aliases-in-linux/comment-page-1/#comment-1430625">red</a>.</p>
<p>Now this is excellent.</p>
<p>Such an alias, for example <code>.a='line shown'</code>, should be added to your common <code>.bashrc</code> file. This effectively doubles efficiency—fewer keystrokes, right at your fingertips. It also minimizes the need to re-read <code>.bashrc</code>, which in turn sources <code>.bash_aliases</code>.</p>
<p>I did not share it originally, but it is easy to find. This should be added somewhere in your <code>.bashrc</code>, usually closer to the bottom, or roughly two-thirds of the way down. It is typically implemented as a simple conditional statement, for example:</p>
<pre>
if [ -f ~/.bash_aliases ]; then
    source ~/.bash_aliases
    export PATH="$PATH:/$HOME"
fi
</pre>
<p><strong>Note</strong>: the <code>PATH</code> statement shown here is my own addition. This allows search access to my home directory when I open a terminal shell, in addition to the standard system directories. I intentionally avoid an ending colon.</p>
<p>This approach dates back to <code>csh</code>, <code>sh</code>, and <code>ksh</code>, and even early bash. It is no longer commonly set or used this way, as it has historically exposed a memory or execution risk that could be exploited. It is hard to keep up with everything, but by habit I avoid including a trailing colon in any <code>PATH</code> statement.</p>
<p>I have seen people curious about best placement for <code>PATH</code> and <code>export PATH</code> declarations. There are many small tricks like this that can keep newcomers interested and learning.</p>
<p>You can also extend this further by delimiting with colons (without ending with one), for example:</p>
<pre>
export PATH="$PATH:/$HOME:~/.local/bin/myScripts:/opt/myArchive"
</pre>
<p>This will search system paths first, then your home directory, followed by <code>~/.local/bin/myScripts</code>, and finally <code>/opt/myArchive</code>, where I keep additional tools.</p>
<p>Brilliant ace trick. Thank you, Red.<br />
Cheers.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: atomick		</title>
		<link>https://www.tecmint.com/create-and-use-bash-aliases-in-linux/comment-page-1/#comment-2369076</link>

		<dc:creator><![CDATA[atomick]]></dc:creator>
		<pubDate>Tue, 09 Dec 2025 20:08:27 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=41515#comment-2369076</guid>

					<description><![CDATA[The use of Bash aliases makes the console shell a key dancer’s best partner for finger-dancing. Many users maintain library-sized &lt;code&gt;.bash_aliases&lt;/code&gt; files filled with frequently used shortcuts. 

I personally keep copies that I reuse on every distro install and copy them into every shell account. One simple approach is to place them in &lt;code&gt;/etc/skel&lt;/code&gt; so new accounts automatically receive a &lt;strong&gt;bash_aliases&lt;/strong&gt; file.

So here is something a bit sparky and nice: adding color to your aliases.
&lt;pre&gt;
sH=&#039;clear;cd ~/myBin;echo -e &quot;\033[31;5;0;42;5;191m `pwd` \E[0m&quot;;tput cup 0 46;echo -e &quot;\033[38;5;0;48;5;191m _myBin Tools Available_ \E[0m&quot;&#039;
&lt;/pre&gt;
&lt;code&gt;sH&lt;/code&gt; is my alias shortcut. In my home directory, I keep a few favorite scripts under &lt;code&gt;~/myBin&lt;/code&gt;, so this alias gets me there instantly. Some users prefer &lt;code&gt;~/.bin&lt;/code&gt; or &lt;code&gt;~/.local/bin&lt;/code&gt;; it is mostly a matter of personal workflow and “dance style.”

To test this, copy everything starting after the first backtick at clear and ending before the final backtick after the closing double quote. Then middle-mouse paste it directly into your Bash shell and run it.

If you want to keep it permanently, paste the alias into either:

&lt;code&gt;.bashrc&lt;/code&gt; (usually under the # Aliases section about two-thirds of the way down), or &lt;code&gt;.bash_aliases&lt;/code&gt;, on its own line.

Before committing changes, it is smart practice to back up both files.

Once you have it working, play around with the escape sequences and layout. You can easily spark a brainstorm by experimenting, and truly glorify your Bash environment. This was influenced by an application I saw and inspired me to try something completely different—with pleasing results.]]></description>
			<content:encoded><![CDATA[<p>The use of Bash aliases makes the console shell a key dancer’s best partner for finger-dancing. Many users maintain library-sized <code>.bash_aliases</code> files filled with frequently used shortcuts. </p>
<p>I personally keep copies that I reuse on every distro install and copy them into every shell account. One simple approach is to place them in <code>/etc/skel</code> so new accounts automatically receive a <strong>bash_aliases</strong> file.</p>
<p>So here is something a bit sparky and nice: adding color to your aliases.</p>
<pre>
sH='clear;cd ~/myBin;echo -e "\033[31;5;0;42;5;191m `pwd` \E[0m";tput cup 0 46;echo -e "\033[38;5;0;48;5;191m _myBin Tools Available_ \E[0m"'
</pre>
<p><code>sH</code> is my alias shortcut. In my home directory, I keep a few favorite scripts under <code>~/myBin</code>, so this alias gets me there instantly. Some users prefer <code>~/.bin</code> or <code>~/.local/bin</code>; it is mostly a matter of personal workflow and “dance style.”</p>
<p>To test this, copy everything starting after the first backtick at clear and ending before the final backtick after the closing double quote. Then middle-mouse paste it directly into your Bash shell and run it.</p>
<p>If you want to keep it permanently, paste the alias into either:</p>
<p><code>.bashrc</code> (usually under the # Aliases section about two-thirds of the way down), or <code>.bash_aliases</code>, on its own line.</p>
<p>Before committing changes, it is smart practice to back up both files.</p>
<p>Once you have it working, play around with the escape sequences and layout. You can easily spark a brainstorm by experimenting, and truly glorify your Bash environment. This was influenced by an application I saw and inspired me to try something completely different—with pleasing results.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: red		</title>
		<link>https://www.tecmint.com/create-and-use-bash-aliases-in-linux/comment-page-1/#comment-1430625</link>

		<dc:creator><![CDATA[red]]></dc:creator>
		<pubDate>Mon, 08 Feb 2021 09:14:58 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=41515#comment-1430625</guid>

					<description><![CDATA[&lt;pre&gt;
alias .a=&quot;$EDITOR $HOME/.bash_aliases &#038;&#038; source $HOME/.bash_aliases&quot;
alias &#039;.a&#039; edit and reload ~/.bash_aliases
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<pre>
alias .a="$EDITOR $HOME/.bash_aliases &amp;&amp; source $HOME/.bash_aliases"
alias '.a' edit and reload ~/.bash_aliases
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: karthick Sudhakar		</title>
		<link>https://www.tecmint.com/create-and-use-bash-aliases-in-linux/comment-page-1/#comment-1430599</link>

		<dc:creator><![CDATA[karthick Sudhakar]]></dc:creator>
		<pubDate>Mon, 08 Feb 2021 08:00:58 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=41515#comment-1430599</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/create-and-use-bash-aliases-in-linux/comment-page-1/#comment-1429495&quot;&gt;Jalal&lt;/a&gt;.

Jalal,

Thank you :)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/create-and-use-bash-aliases-in-linux/comment-page-1/#comment-1429495">Jalal</a>.</p>
<p>Jalal,</p>
<p>Thank you :)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jalal		</title>
		<link>https://www.tecmint.com/create-and-use-bash-aliases-in-linux/comment-page-1/#comment-1429495</link>

		<dc:creator><![CDATA[Jalal]]></dc:creator>
		<pubDate>Sat, 06 Feb 2021 04:54:55 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=41515#comment-1429495</guid>

					<description><![CDATA[Hi,
Thank you so much for the great topic,]]></description>
			<content:encoded><![CDATA[<p>Hi,<br />
Thank you so much for the great topic,</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
