<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lindesk &#187; terminal</title>
	<atom:link href="http://lindesk.com/tag/terminal/feed/" rel="self" type="application/rss+xml" />
	<link>http://lindesk.com</link>
	<description>Linux - on the Desktop</description>
	<lastBuildDate>Tue, 19 Jan 2010 05:54:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Top 4 Terminal GUI Applications</title>
		<link>http://lindesk.com/2009/06/top-4-terminal-gui-applications/</link>
		<comments>http://lindesk.com/2009/06/top-4-terminal-gui-applications/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 19:49:15 +0000</pubDate>
		<dc:creator>BinnyVA</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[htop]]></category>
		<category><![CDATA[mc]]></category>
		<category><![CDATA[mpg123]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[top]]></category>

		<guid isPermaLink="false">http://lindesk.com/?p=193</guid>
		<description><![CDATA[Terminal GUI Apps? Does sound oxymoronic doesn't it? Well, there are GUI apps in the terminal - and here is a tribute to ones that I find most useful...]]></description>
			<content:encoded><![CDATA[<p><img src="http://lindesk.com/wp-content/uploads/2008/02/terminal.png" alt="Terminal" title="Terminal" width="128" height="128" class="alignnone size-full wp-image-96 intro" align="right" /></p>
<p class="intro">Terminal GUI Apps? Does sound oxymoronic doesn&#8217;t it? Well, there are GUI apps in the terminal &#8211; and here is a tribute to ones that I find most useful&#8230;</p>
<h2>top/htop &#8211; Process Viewer</h2>
<p>From the man page&#8230;</p>
<blockquote><p>The top program provides a dynamic real-time view of a running system.  It can display system summary information as well as a list of tasks currently being managed by the Linux kernel.  The types of system summary information shown and the types, order and size of  information  displayed for tasks are all user configurable and that configuration can be made persistent across restarts.</p>
</blockquote>
<p>I always have a processor load displaying applet(System Monitor) in my panel. Whenever I see a spike, I fire up a console and type in the top command &#8211; its very useful in finding which process is creating the load. Usually, it is some cron job like <code>updatedb</code> or <code>makewhatis</code>. But occasionally, I find a zombie processes this way.</p>
<p>htop is, for the lack of a better word, a better top. It provides a more colorful display(<code>top</code> has a color mode as well &#8211; open top and press &#8216;z&#8217;). It also makes it a bit more easier to kill processes.</p>
<p><img src="http://lindesk.com/wp-content/uploads/2009/06/htop.png" alt="htop" title="htop" width="575" height="414" class="alignnone size-full wp-image-195" /></p>
<h2>mc &#8211; File Manager</h2>
<p>mc(or Midnight Commander) is a file manager. Sure you can cp and mv your files around, but after a while, it gets tiring. mc is a dual pane file manager -it means you can see two folders at the same time. You can copy/move files from one to the other, delete, rename, view file etc &#8211; in short, everything a file manager is expected to have, mc has.</p>
<p><img src="http://lindesk.com/wp-content/uploads/2009/06/mc.png" alt="mc" title="mc" width="463" height="425" class="alignnone size-full wp-image-196" /></p>
<h2>mpg123 &#8211; Audio Player</h2>
<p>I am not writing too much about this &#8211; considering the fact that I have already wrote a <a href="http://lindesk.com/2008/02/mpg123mpg321-the-command-line-mp3-players/">post about mpg123/mpg321</a> in the <a href="http://lindesk.com/2008/03/top-10-linux-mp3-players/">audio player series</a>.</p>
<h2>aptitude</h2>
<p>aptitude is a ncurces based GUI for the apt package manage &#8211; as a result, this is only available in Debian based systems(Ubuntu, Knopix, etc.). I have not yet seen anyone using aptitude &#8211; if they have a GUI system, they use synaptic &#8211; and if they are comfortable with the command line, they use apt-get command. But still, there is a middle ground &#8211; if for some reason you need it.</p>
<p><img src="http://lindesk.com/wp-content/uploads/2009/06/aptitude1.png" alt="aptitude" title="aptitude" width="480" height="334" class="alignnone size-full wp-image-198" /></p>
<p>Thanks to <a href="http://lifeofrajesh.com/">Rajesh</a> for the aptitude screenshot.</p>
<h2>Anything Else?</h2>
<p>Any other Terminal GUI application? I can only think of these at the moment. If you can think of others, comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://lindesk.com/2009/06/top-4-terminal-gui-applications/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Customizing the Terminal: 6 Command Line Tips and Tricks</title>
		<link>http://lindesk.com/2009/04/customizing-the-terminal-6-command-line-tips-and-tricks/</link>
		<comments>http://lindesk.com/2009/04/customizing-the-terminal-6-command-line-tips-and-tricks/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 15:36:16 +0000</pubDate>
		<dc:creator>BinnyVA</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[shortcut]]></category>
		<category><![CDATA[tab]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://lindesk.com/?p=188</guid>
		<description><![CDATA[A few tips and tricks on the terminal to make you more efficient when using it. If you know of any other tips, add it in the comments section.]]></description>
			<content:encoded><![CDATA[<p><img src="http://lindesk.com/wp-content/uploads/2008/02/terminal.png" alt="Terminal" title="Terminal" width="128" height="128" class="alignnone size-full wp-image-96 intro" align="right" /></p>
<p class="intro">A few tips and tricks on the terminal to make you more efficient when using it. If you know of any other tips, add it in the comments section.</p>
<h2>1. ls Without ls</h2>
<p>When you are trying to cd into a deep folder, you might not know the correct folder name some levels deep. You might have to do something like&#8230;</p>
<pre><code class="cli">$ cd ~/Scripts/Perl
$ ls
bin	SedGUI       ToSee	Cronjobs  Maintenance
$ cd Maintenance</code></pre>
<p>There is an easier way &#8211; go to the wanted folder</p>
<pre><code class="cli">$ cd ~/Scripts/Perl</code></pre>
<p>Now, without pressing enter, double tap the TAB key. You will get a list of files. And the command prompt waiting to be filled&#8230;</p>
<pre><code class="cli">$ cd ~/Scripts/Perl/[TAB TAB]
bin	SedGUI       ToSee	Cronjobs  Maintenance
$ cd ~/Scripts/Perl/_</code></pre>
<p>You can also <strong>use double-TAB to auto-complete commands</strong>.</p>
<h2>2. Searching the history with Ctrl+R</h2>
<p>If you have to use a command you have already used before, press CTRL+R and then type a few characters of the command. The latest command with those characters will be shown &#8211; if that is the command you want to execute, press enter and it will be executed. If not, just press CTRL+R again and it will show the next command.</p>
<p>You have no idea how useful this tip is if you haven&#8217;t been using it. I use this all the time.</p>
<p>For more details, read <a href="http://www.lunix.com.au/2008/07/06/searching-bash_history-the-easy-way-with-tagging-and-ctrl-r/">this article</a>.</p>
<h2>3. Open Terminal using a Shortcut</h2>
<p>If you are a GUI user, chances are you prefer using a Terminal emulator(like <code>gnome-terminal</code> or <code>konsole</code>) instead of going into the Terminal mode by pressing CTRL+ALT+F1. If so, assign a shortcut to those emulator apps. I prefer using the shortcut &#8216;Ctrl+Alt+A&#8217; to do this.</p>
<h3>Gnome</h3>
<p>If you are in gnome, there is a very easy way to do this&#8230;</p>
<ul>
<li>Go to System &gt; Preferences &gt; Keyboard Shortcuts</li>
<li>Find &#8216;Run a Terminal&#8217; &#8211; assign the shortcut &#8216;Ctrl+Alt+A&#8217;</li>
</ul>
<h3>KDE</h3>
<ul>
<li>Right Click on the K-Menu &gt; Menu Editor</li>
<li>Find your terminal application in the list(usually System &gt; Terminal Applications &gt; Terminal)</li>
<li>Select the &#8216;Current Shortcut Key&#8217; option and set it to &#8216;Ctrl+Alt+A&#8217;</li>
</ul>
<p>You can also do this by opening the <a href="http://lindesk.com/2007/09/global-hotkeys-for-xmms-using-khotkeys/">KHotKeys</a> application.</p>
<h2>4. Bash Keyboard Shortcuts</h2>
<p>Learn the <a href="http://onlyubuntu.blogspot.com/2007/03/bash-shell-keyboard-shortcuts-for-linux.html">bash keyboard shortcuts</a> &#8211; these are the ones I use the most&#8230;</p>
<dl>
<dt>CTRL+R</dt>
<dd>Search the history. We already talked about this.</dd>
<dt>CTRL+L</dt>
<dd>Clears the screen. Use this instead of the <code>clear</code> command.</dd>
<dt>CTRL+D</dt>
<dd>Use this instead of the <code>exit</code> command.</dd>
<dt>CTRL+C</dt>
<dd>Kill whatever is running</dd>
<dt>CTRL+Z</dt>
<dd>Puts whatever is running into a suspended background process. Use <code>fg</code> to restore it.</dd>
</dl>
<h2>5. Find Command using <code>apropos</code></h2>
<p>Find the command you want using the <code>apropos</code> command. Just type in a description of the command as the first argument. For example, lets say you want to find the command to list the directory contents. Use the command&#8230;</p>
<pre><code class="cli">$ apropos "directory contents"
dir                  (1)  - list directory contents
ls                   (1)  - list directory contents
ls                   (1p)  - list directory contents
ntfsls               (8)  - list directory contents on an NTFS filesystem
vdir                 (1)  - list directory contents</code></pre>
<p>The only problem is that I can never spell &#8216;apropos&#8217; &#8211; so I keep this in my <code>.bashrc</code> file&#8230;</p>
<pre><code class="bash">alias apox='apropos'</code></pre>
<h2>6. Learn New Commands</h2>
<p>There are a few sites that publish cool commands on a daily/semi-daily basics &#8211; subscribe to those and learn new commands&#8230;</p>
<li><a href="http://txt.binnyva.com/">Txt &#8211; Linux Commands and Code Snippets</a> &#8211; My own site &#8211; I <a href="http://lindesk.com/2008/07/introducing-txt/">wrote about this</a> a while ago.</li>
<li><a href="http://www.commandlinefu.com/commands/browse">commandlinefu.com</a></li>
<li><a href="http://www.shell-fu.org/">shell-fu</a></li>
<li><a href="http://snipplr.com/all/language/bash">Bash Snippets</a></li>
<li><a href="http://www.codesnippt.com/search.php?lang=14">Codesnippt.com &#8211; Shell Scripts</a></li>
<li><a href="http://snippets.dzone.com/tag/bash">bash code</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://lindesk.com/2009/04/customizing-the-terminal-6-command-line-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Customizing the Terminal: Create Useful Aliases</title>
		<link>http://lindesk.com/2009/03/customizing-the-terminal-create-useful-aliases/</link>
		<comments>http://lindesk.com/2009/03/customizing-the-terminal-create-useful-aliases/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 19:05:56 +0000</pubDate>
		<dc:creator>BinnyVA</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://lindesk.com/?p=183</guid>
		<description><![CDATA[This is part two of the 'Customizing the Terminal' series. Part one is '<a href="http://lindesk.com/2009/03/customizing-the-terminal-the-prompt/">Customizing the Terminal: The Prompt</a>'. In this part, we'll see how to create aliases to make working in the console easier.]]></description>
			<content:encoded><![CDATA[<p><img src="http://lindesk.com/wp-content/uploads/2008/02/terminal.png" alt="Terminal" title="Terminal" width="128" height="128" class="alignnone size-full wp-image-96 intro" align="right" /></p>
<p class="intro">This is part two of the &#8216;Customizing the Terminal&#8217; series. Part one is &#8216;<a href="http://lindesk.com/2009/03/customizing-the-terminal-the-prompt/">Customizing the Terminal: The Prompt</a>&#8216;. In this part, we&#8217;ll see how to create aliases to make working in the console easier.</p>
<h2>How To Create an Alias</h2>
<p>You can create a temporary alias using this command&#8230;</p>
<pre><code class="bash">alias new_name='old command'</code></pre>
<p>This will stop working when you exit the terminal. If you want to make the alias permanent, put the same command in your <code>~/.bashrc</code> file.</p>
<p>There is another way to create an alias &#8211; create a executable file and place it in a folder in your path. This is not technically an alias &#8211; but it works the same way. I use this for alias that tend to change often. Its easier to find a file in a folder and edit it. <abbr title="YMMV">YMMV</abbr>.</p>
<h2>My Aliases</h2>
<p>This is a incomplete list of the aliases I use. Feel free to copy them to your .bashrc file.</p>
<h3>Quick Directory Jumps</h3>
<p>Create an alias to jump to folders you have to visit often. This is my list&#8230;</p>
<pre><code class="bash">alias www='cd /var/www/html'
alias e='cd /mnt/x'</code></pre>
<h4>Relative Jumps</h4>
<p>The above jumps are absolute jumps &#8211; relative jumps are possible too&#8230;</p>
<pre><code class="bash">alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'</code></pre>
<p>Some prefer this syntax&#8230;</p>
<pre><code class="bash">alias ..='cd ..'
alias ..2='cd ../..'
alias ..3='cd ../../..'
alias ..4='cd ../../../..'</code></pre>
<h3>Often Used Commands</h3>
<p>If you use some commands a lot, create smaller alternative for it&#8230;</p>
<pre><code class="bash">alias x='exit'
alias q='exit'
alias rmdir='rm â€“rf'</code></pre>
<p>Many of my own scripts are also alias&#8217;ed this way&#8230;</p>
<pre><code class="bash">alias bk='perl "/home/binnyva/Scripts/Perl/Maintenance/<a href="http://lindesk.com/2008/05/shell-script-to-backup-files-locally-using-rsync/">Rsync Backup/RsyncBackup</a>.pl"'
alias rbk='perl "/home/binnyva/Scripts/Perl/Maintenance/<a href="http://lindesk.com/2008/06/script-to-backup-files-over-a-network-using-rsync/">Rsync Backup/RsyncRemoteBackup</a>.pl"'
alias nbk='perl "/home/binnyva/Scripts/Perl/Maintenance/Rsync Backup/RsyncNetworkBackup.pl"'
alias bdb='perl "/home/binnyva/Scripts/Perl/Maintenance/<a href="http://lindesk.com/2008/06/perl-script-to-backup-mysql-databases/">Database Backup/Dbbackup</a>.pl"'</code></pre>
<h3>Complex Commands</h3>
<p>Create a short version of long and complex command using alias&#8230;</p>
<pre><code class="bash">alias gitstat='git status | perl -pe "exit if(/Untracked files\:/)"'
alias ra='ruby script/server'
alias wikipedia='cd /mnt/x/Data/Wikipedia/mywiki; firefox "http://localhost:8001/"; python manage.py runserver 8001; '
alias sup='svn update'</code></pre>
<p>and more.</p>
<h3>Command Changes</h3>
<p>When I came from Windows to Linux, I was used to the dos commands &#8211; but not to the linux&#8217;s mv,cp commands. So I used to have aliases for those(I don&#8217;t have these now)</p>
<pre><code class="bash">alias move='mv'
alias copy='cp'
alias ren='mv'
alias del='rm'</code></pre>
<p>If you go from Red Hat/Fedora to Debian/Ubuntu(or vise versa), you can set up a few alias to make the change easier&#8230;</p>
<pre><code class="bash">alias yum='apt-get'</code></pre>
<p>You can get a lot of ideas for more aliases by looking at <a href="http://dotfiles.org/.bashrc">others .bashrc files</a>.</p>
<p>Now tell me you aliases&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://lindesk.com/2009/03/customizing-the-terminal-create-useful-aliases/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Customizing the Terminal: The Prompt</title>
		<link>http://lindesk.com/2009/03/customizing-the-terminal-the-prompt/</link>
		<comments>http://lindesk.com/2009/03/customizing-the-terminal-the-prompt/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 18:04:13 +0000</pubDate>
		<dc:creator>BinnyVA</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[prompt]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://lindesk.com/?p=181</guid>
		<description><![CDATA[Most Linux 'gurus' spend a lot of time working in the terminal. If you belong to that group, this post is for you. This is a tutorial to configure the terminal prompt to the best possible value for your use. Note: This tutorial is for bash users - these instructions will not work in other shells.]]></description>
			<content:encoded><![CDATA[<p><img src="http://lindesk.com/wp-content/uploads/2008/02/terminal.png" alt="Terminal" title="Terminal" width="128" height="128" class="alignnone size-full wp-image-96 intro" align="right" /></p>
<p class="intro">Most Linux &#8216;gurus&#8217; spend a lot of time working in the terminal. If you belong to that group, this post is for you. This is a tutorial to configure the terminal prompt to the best possible value for your use. Note: This tutorial is for bash users &#8211; these instructions will not work in other shells.</p>
<h2>The Prompt</h2>
<p>You must have seen the prompt if you have use the terminal &#8211; it is the first few characters in each line. Usually, it will be&#8230;</p>
<pre><code class="bash">[username@localhost] ~ $</code></pre>
<p>In this case, the user is shown three piece of information in the prompt &#8211; </p>
<ul>
<li>Username of the current user</li>
<li>Hostname</li>
<li>Current folder name</li>
</ul>
<p>This post will show you how to customize this prompt to your needs.</p>
<h3>Editing the Prompt</h3>
<p>Editing the prompt is very simple &#8211; you just have to edit a shell variable. To see the current prompt&#8217;s value, open a shell and type the command&#8230;</p>
<pre><code class="bash">echo $PS1</code></pre>
<p>The result will be something like this(in Ubuntu)&#8230;</p>
<pre><code class="bash">binnyva@binlap:~$ echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$</code></pre>
<p>Which is functionally the same as&#8230;</p>
<pre><code class="bash">\u@\h:\W\$ </code></pre>
<p>To edit this variable, run the command&#8230;</p>
<pre><code class="bash">export PS1=&lt;New Prompt Value&gt;</code></pre>
<p>Most desktop systems don&#8217;t need the username and hostname in the prompt &#8211; this is only relevent if your are connected to a remote system. So the first thing to do, if you are on a desktop system, is to remove those two. To do that, run the command&#8230;</p>
<pre><code class="bash">export PS1="[\W]\$ "</code></pre>
<p>This will change the prompt in the current terminal. To make it permanent, edit the ~/.bashrc and set the PS1 variable there. Just add this line at the end of the file&#8230;</p>
<pre><code class="bash">export PS1="[\W]\$ "</code></pre>
<h2>A Better Prompt</h2>
<p>Currently, the prompt has the basename of the current working directory. That is, if we are in &#8216;~/Sites/Lindesk/posts&#8217;, the prompt will be &#8216;[posts]$ &#8216;. This is good enough for most people. But I have a problem with this. If I go to another folder, say, &#8216;~/Sites/<a href="http://www.openjs.com/">OpenJS</a>/posts&#8217;, the prompt is still &#8216;[posts]$ &#8216;. The prompt is a bit ambiguous in this case. This can be done using a different character &#8211; in this case \w(small &#8216;w&#8217; &#8211; the default was capital &#8216;W&#8217;).</p>
<pre><code class="bash">[posts]$ export PS1="[\w]$ "
[~/Sites/OpenJS/posts]$ _</code></pre>
<p>This is nice &#8211; but you will have a problem if the directory you are in is several levels deep. It might be something like this&#8230;</p>
<pre><code class="bash">[/var/www/html/sites/Lindesk/lindesk.com/wp-content/plugins/eventr/langs]$ _</code></pre>
<p>That&#8217;s long &#8211; and inconvenient. There are better ways of doing this.</p>
<h3>Show the Beginning and the End.</h3>
<p>A better way of doing this is to cut of a part of the folder &#8211; so the above path will look something like&#8230;</p>
<pre><code class="bash">[/var/www/html.../eventr/langs] $ _</code></pre>
<p>This option will show the first 15 characters of the path and then the last 15 characters &#8211; if the directory path is bigger than 30 characters. To enable this mode, open up the file <code>~/.bashrc</code> and add this code&#8230;</p>
<pre><code class="bash">PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-15}; else CurDir=$DIR; fi'
PS1="[\$CurDir] \$ "</code></pre>
<h3>The First Character of Each Directory</h3>
<p>There is yet another method &#8211; I got this idea from the <a href="http://lindesk.com/2007/04/fishfriendly-interactive-shell/">fish shell</a>. In this approach, the big path will appear as&#8230;</p>
<pre><code class="bash">[/v/w/h/s/L/l/w/p/e/langs] $ _</code></pre>
<p>In this option, only the first character of each parent folder will be shown. Only the base folder name will be shown entirely. This is the approach I use. If you want to use this, open the <code>~/.bashrc</code> file and add this&#8230;</p>
<pre><code class="bash">PROMPT_COMMAND='CurDir=`pwd|sed -e "s!$HOME!~!"|sed -re "s!([^/])[^/]+/!\1/!g"`'
PS1="[\$CurDir] \$ "</code></pre>
<h3>Prompt Variables</h3>
<p>The other values you can insert into the prompt are&#8230;</p>
<dl>
<dt>\d</dt>
<dd>the date in &#8220;Weekday Month Date&#8221; format (e.g., &#8220;Tue May 26&#8243;)</dd>
<dt>\D{format}</dt>
<dd>the format is passed to strftime(3) and the result is inserted into the prompt string; an empty format results in a locale-specific time representation. The braces are required</dd>
<dt>\e</dt>
<dd>an ASCII escape character (033)</dd>
<dt>\h</dt>
<dd>the hostname up to the first â€˜.â€™</dd>
<dt>\H</dt>
<dd>the hostname</dd>
<dt>\j</dt>
<dd>the number of jobs currently managed by the shell</dd>
<dt>\l</dt>
<dd>the basename of the shellâ€™s terminal device name</dd>
<dt>\n</dt>
<dd>newline</dd>
<dt>\r</dt>
<dd>carriage return</dd>
<dt>\s</dt>
<dd>the name of the shell, the basename of $0 (the portion following the final slash)</dd>
<dt>\t</dt>
<dd>the current time in 24-hour HH:MM:SS format</dd>
<dt>\T</dt>
<dd>the current time in 12-hour HH:MM:SS format</dd>
<dt>\@</dt>
<dd>the current time in 12-hour am/pm format</dd>
<dt>\A</dt>
<dd>the current time in 24-hour HH:MM format</dd>
<dt>\u</dt>
<dd>the username of the current user</dd>
<dt>\v</dt>
<dd>the version of bash (e.g., 2.00)</dd>
<dt>\V</dt>
<dd>the release of bash, version + patch level (e.g., 2.00.0)</dd>
<dt>\w</dt>
<dd>the current working directory, with $HOME abbreviated with a tilde</dd>
<dt>\W</dt>
<dd>the basename of the current working directory, with $HOME abbreviated with a tilde</dd>
<dt>\!</dt>
<dd>the history number of this command</dd>
<dt>\#</dt>
<dd>the command number of this command</dd>
<dt>\$</dt>
<dd>if the effective UID is 0, a #, otherwise a $</dd>
<dt>\nnn</dt>
<dd>the character corresponding to the octal number nnn</dd>
<dt>\\</dt>
<dd>a backslash</dd>
<dt>\[</dt>
<dd>begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt</dd>
<dt>\]</dt>
<dd>end a sequence of non-printing characters</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://lindesk.com/2009/03/customizing-the-terminal-the-prompt/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>fish(Friendly Interactive Shell)</title>
		<link>http://lindesk.com/2007/04/fishfriendly-interactive-shell/</link>
		<comments>http://lindesk.com/2007/04/fishfriendly-interactive-shell/#comments</comments>
		<pubDate>Sun, 08 Apr 2007 20:00:51 +0000</pubDate>
		<dc:creator>BinnyVA</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[fish]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://lindesk.com/?p=3</guid>
		<description><![CDATA[fish(Friendly Interactive Shell) is a new shell for Linux. I tried it out and have decided to dump bash for fish. Try it out - you will come to the same conclusion as well.]]></description>
			<content:encoded><![CDATA[<p class="intro"><a href="http://fishshell.org/">fish(Friendly Interactive Shell)</a> is a new shell for Linux. I tried it out and have decided to dump bash for fish. Try it out &#8211; you will come to the same conclusion as well.</p>
<h2>Features of fish</h2>
<h3>Syntax Coloring</h3>
<p>The shell colorizes the commands as you type them &#8211; if it is a valid command it will have a green color. For example, lets say I want to see my network interfaces. Recently, I had a lot of use for that &#8211; but that is another post. So, I type ifconfig into the shell. When I am at &#8216;ifco&#8217;, the shell will be like this&#8230;</p>
<p><img src='http://lindesk.com/wp-content/uploads/2007/04/ifco.png' alt='Ifco - Typing completion' /></p>
<p>When I have completed the command, ifconfig, the shell will be like this&#8230;</p>
<p><img src='http://lindesk.com/wp-content/uploads/2007/04/ifconfig.png' alt='Completed' /></p>
<p>Strings, matching etc. are also highlighted as you type.</p>
<p><img src='http://lindesk.com/wp-content/uploads/2007/04/syntax_highlight.png' alt='Syntax Highlighting' /></p>
<h3>Tab Completion</h3>
<p>You would not think that this is a new feature. Bash has tab completion. Even Windows XP&#8217;s DOS terminal has tab completion. But fish&#8217;s tab completion is no ordinary tab completion &#8211; think of it as <a href="http://fishshell.org/user_doc/index.html#completion">tab completion on steroids</a>.</p>
<p>fish&#8217;s tab completion implements a feature that I really needed &#8211; tab completion for subcommands. Subcommand is the command line argument that is given to some programs. For example,</p>
<pre>yum update gimp
cvs commit file.php</pre>
<p>In the first example, <code>yum</code> is the command an &#8216;<code>update</code>&#8216; is the subcommand. Just type &#8216;yum upd&#8217; and press Tab to complete the command. Similarly in the second case <code>cvs</code> is the command and <code>commit</code> is the subcommand.</p>
<p>Many other completions are also supported&#8230;</p>
<ul>
<li>Commands, both builtins, functions and regular programs.</li>
<li>Environment variable names (Eg. $HOME).</li>
<li>Usernames for tilde(~) expansion.</li>
<li>Filenames, even on strings with wildcards such as &#8216;*&#8217;, &#8216;**&#8217; and &#8216;?&#8217;.</li>
<li>Job id, job name and process names for process expansion. This is very useful when using <code>kill</code>.</li>
</ul>
<p>Enough talking. You can download the fish shell from their official website. For Red Hat/Fedora Core users, this command will do the trick.</p>
<p><code>yum install fish</code></p>
<p>If you are a debian or Ubuntu user, use this command</p>
<p><code>apt-get install fish</code></p>
]]></content:encoded>
			<wfw:commentRss>http://lindesk.com/2007/04/fishfriendly-interactive-shell/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

