<?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>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; terminal</title> <atom:link href="http://www.ghacks.net/tag/terminal/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Fri, 10 Feb 2012 16:53:42 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Integrate the Terminal with the Desktop On Linux</title><link>http://www.ghacks.net/2011/06/04/integrate-the-terminal-with-the-desktop-on-linux/</link> <comments>http://www.ghacks.net/2011/06/04/integrate-the-terminal-with-the-desktop-on-linux/#comments</comments> <pubDate>Sat, 04 Jun 2011 13:10:09 +0000</pubDate> <dc:creator>Melanie Gross</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[desktop]]></category> <category><![CDATA[linux tips]]></category> <category><![CDATA[terminal]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=46008</guid> <description><![CDATA[Over the years there have been all sorts of fun ways to edit one&#8217;s Linux terminal window. In addition to editing all the boring old things like text color and scroll settings, people have edited their headers, terminal behaviors, and even integrated an entire terminal window into their background. Many people are fond of that [...]]]></description> <content:encoded><![CDATA[<p>Over the years there have been all sorts of fun ways to edit one&#8217;s Linux terminal window.  In addition to editing all the boring old things like text color and scroll settings, people have edited their headers, terminal behaviors, and even integrated an entire terminal window into their background.</p><p>Many people are fond of that last one, but it isn&#8217;t really all that easy to do.  Most people employ the help of little programs for things like that, but the software used to embed the terminal is rarely updated to new versions of various distros.</p><p>One, however, has stayed intact, and this tutorial will help you through the process of putting the terminal right where we all need it – on the desktop.</p><p>First of all, you need to create a new Terminal profile that will run under the parameters you will set later.  Open up your Terminal, then go to File, New Profile, type “Transparency” (without the quotes) as the title, and then click Create.</p><p>This creates the profile necessary to continue.  You now need to fix a few settings.  Under Title and Command, change the initial title to Transparency and select Keep Initial Title in the drop down menu.  Select transparent under the Background tab, and set it to be as (you guessed it) transparent as you like. Some people prefer completely clear, but make sure the font color will stand out against your existing desktop background.</p><p>Next you want to download the program that will make all this possible.  In your terminal, type:</p><p><code><strong>sudo apt-get install devilspie</strong></code></p><p>Next, you need to create a configuration file for your profile:</p><p><code><strong>mkdir ~/.devilspie<br
/> gedit ~/.devilspie/Transparency.ds</strong></code></p><p>Then take the following piece of code and pasted it in Transparency.ds:</p><p><code><strong>( if<br
/> ( matches ( window_name ) "Transparency" )<br
/> ( begin<br
/> ( set_workspace 4 )<br
/> ( undecorate )<br
/> ( skip_pager )<br
/> ( skip_tasklist )<br
/> ( geometry "890x694+178+58" )<br
/> ( below )<br
/> ( pin )<br
/> ( println "match" )<br
/> )<br
/> )</strong><br
/> </code></p><p>Almost there!  Now all you need to do is make sure that your computer opens a Terminal window in this manner each time it boots.  Under System Settings open Startup Applications.  First, click add, and under command, type:</p><p><code><strong>devilspie -a</strong></code></p><p>Then click enter.  Click add again, and under command type:</p><p><code><strong>gnome-terminal –window-with-profile=Transparency</strong></code></p><p>That&#8217;s all there is to it.  Reboot your system, and when it comes back up you should find a handy terminal window built right into your desktop, ready to work at whatever you desire.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2011/06/terminal-desktop.png" alt="terminal-desktop" title="terminal-desktop" width="337" height="197" class="alignnone size-full wp-image-46009" /></p><p>If the configuration listed here does not quite work for you, experiment with the code you pasted in Transparency.ds under “geometry”.  Those are the parameters the system uses to place the box.  Of course, you can always fiddle with the color and transparency settings assigned to the profile by going to the Terminal and clicking on Edit, then Profile Preferences.</p><p>This neat, quick little quick little fix will be of interest to your Linux inclined friends and make Windows users wonder why they can’t do the same thing.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/06/04/integrate-the-terminal-with-the-desktop-on-linux/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>GNOME Terminal tricks and tips</title><link>http://www.ghacks.net/2011/02/25/gnome-terminal-tricks-and-tips/</link> <comments>http://www.ghacks.net/2011/02/25/gnome-terminal-tricks-and-tips/#comments</comments> <pubDate>Fri, 25 Feb 2011 20:17:27 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[gnome-terminal]]></category> <category><![CDATA[terminal]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=40246</guid> <description><![CDATA[Do you use the terminal in Linux? If you use Linux long enough you will. And chances are, if you are using the terminal in Linux, you are using either the GNOME terminal or KDE&#8217;s konsole. Each has their pros and cons and each has a lot of tricks tucked up inside their sleeves. I [...]]]></description> <content:encoded><![CDATA[<p>Do you use the terminal in Linux? If you use Linux long enough you will. And chances are, if you are using the terminal in Linux, you are using either the GNOME terminal or KDE&#8217;s konsole. Each has their pros and cons and each has a lot of tricks tucked up inside their sleeves.</p><p>I have covered the gnome-terminal in a few ways (see my articles &#8220;<a
title="Make gnome-terminal work for you" href="http://www.ghacks.net/2010/07/18/make-gnome-terminal-profiles-work-for-you/" target="_blank">Make gnome-terminal profiles work for you</a>&#8221; and &#8220;<a
title="Get to know Linux: gnome-terminal" href="http://www.ghacks.net/2009/02/06/get-to-know-linux-gnome-terminal/" target="_blank">Get to know Linux: gnome-terminal</a>&#8220;.) These articles either is an introduction or deals with a specific aspect of the tool. This time around, I want to highlight a few different tips and tricks that can help to make gnome-terminal even more useful and user-friendly.</p><p><span
id="more-40246"></span><strong>Change that title</strong></p><p>When you open up gnome-terminal you usually will see the hostname and the current working directory. Sometimes this just isn&#8217;t much help. This is especially true when you have more than one terminal window open and you want to make sure you know which terminal you are working in. You can change this by clicking Terminal &gt; Set Title. After you click this a small window will open where you can type the new terminal title. Once you save that title your gnome-terminal will display the configured title until you close and re-open the tool (upon reopening the title will revert to the default.)</p><p><strong>Search the contents of an open file</strong></p><p>The gnome-terminal tool includes it&#8217;s own search feature. With an open file you can search that file with a string by clicking Search a new window will appear where you can enter the conditions for your search. Those conditions are:</p><ul><li>Search for: This is the string you want to search for in your file.</li><li>Mach case.</li><li>Match entire word only.</li><li>Match as regular expression.</li><li>Search backwards.</li><li>Wrap around.</li></ul><p>This is a great way to help you work with larger configuration files such as smb.conf or httpd.conf.</p><p><strong>Zoom in/out</strong></p><p>There are reasons for zoom in and out. The biggest reason is accessibility. For those with vision impairments, zooming into the terminal window is a quick way to make the text in terminal large enough to see. To zoom use the following key combinations:</p><ul><li>Zoom in: <code>Ctrl++</code></li><li>Zoom out: <code>Ctrl--</code></li></ul><p>If you have trouble with the key combinations, click View &gt; Zoom In or View &gt; Zoom Out to control the zoom.</p><p><strong>Switch dimensions</strong></p><p>I&#8217;m not talking about switching from 2D to 3D (or d20). I&#8217;m talking about the size of your terminal. There are four pre-configured sizes you can easily switch to (for different usage.) If you click the Terminal menu entry you will see, near the bottom of the menu:</p><ul><li>80&#215;24</li><li>80&#215;43</li><li>132&#215;24</li><li>132&#215;43</li></ul><p>You can easily switch to one of those sizes by clicking on the size you want. When you open the terminal, it will open back to the default size.</p><p><strong>Final thoughts</strong></p><p>There you have just a fraction of the tips and tricks that can be pulled off with gnome-terminal. There are plenty more where that come from and we will re-visit this topic. Until then, enjoy the CLI!</p><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/02/25/gnome-terminal-tricks-and-tips/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Guake: Hide-able terminal goodness</title><link>http://www.ghacks.net/2010/06/21/guake-hide-able-terminal-goodness/</link> <comments>http://www.ghacks.net/2010/06/21/guake-hide-able-terminal-goodness/#comments</comments> <pubDate>Mon, 21 Jun 2010 11:19:21 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[bash]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[linux command line]]></category> <category><![CDATA[terminal]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=26885</guid> <description><![CDATA[As you well know, I am a big fan of the Linux command line. Because of this I use the terminal a lot. I am also a fan of Linux eye candy and making my desktop as clean and sleek as possible. I don&#8217;t like to have things in the way and I like easy [...]]]></description> <content:encoded><![CDATA[<p>As you well know, I am a big fan of the Linux command line. Because of this I use the terminal a lot. I am also a fan of Linux eye candy and making my desktop as clean and sleek as possible. I don&#8217;t like to have things in the way and I like easy access to the tools I use. That is why I want my terminal to be easily accessed, always ready, and quick to disappear.</p><p>Guake is a drop-down terminal that fits all of these needs perfectly. It&#8217;s for the GNOME environment and is easy to use and is one of those tools that, once you start using, you&#8217;ll wonder why you hadn&#8217;t been using all along. In this article I will show you how to install and use the Guake drop-down terminal so your Linux command line can be as finger-tip ready as possible.</p><p><span
id="more-26885"></span><strong>Installation</strong></p><p>Fortunately the installation of Guake is simple. Because it lives in the standard repositories of all of the major distributions, you can install Guake with a command like this:</p><p><em>yum install guake</em></p><p><em><span
style="font-style: normal">or</span></em></p><p><em>sudo apt-get install guake</em></p><div
id="attachment_26886" class="wp-caption alignleft" style="width: 435px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/06/guake_icon.png"><img
class="size-full wp-image-26886" src="http://www.ghacks.net/wp-content/uploads/2010/06/guake_icon.png" alt="" width="425" height="48" /></a><p
class="wp-caption-text">Figure 1</p></div><p>If you use the former command you will have to do so after you<em> su</em> to the root user. Once installed you will need to start Guake. You do so by clicking <strong>Applications &gt; Acesssories &gt; Guake Terminal</strong>. Once started Guake will reside in your notification area as an icon (see Figure 1). The icon is the Green downward pointing arrow. If you right-click that icon can access the Guake preferences.</p><p><strong>Configuration</strong></p><p><a
href="http://www.ghacks.net/wp-content/uploads/2010/06/guake_prefs.png"><img
class="alignright size-full wp-image-26887" src="http://www.ghacks.net/wp-content/uploads/2010/06/guake_prefs.png" alt="" width="209" height="244" /></a>There isn&#8217;t too much to configure with Guake. From the preferences window you can take care of such items as:</p><ul><li>The default shell: You will most likely want to stick with the default here.</li><li>Main window height: How tall do you want Guake when it is opened?</li><li>Appearance: Text color/font, background color/transparency/image.</li><li>Various keyboard shortcuts</li></ul><p>By default Guake is not set to start up on login. One of the surprises that always catches me with Guake is you can not set this through the properties window. Instead you will have to set this through the GNOME Start up Applications tool. Access this by clicking <strong>System &gt; Preferences &gt; Startup Applications.</strong> When this window is open scroll down until you find the Guake entry, click the Guake checkbox, and click Close. Now Guake will start up when you log in.</p><p><strong>Usage</strong></p><div
id="attachment_26888" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/06/guake_open.png"><img
class="size-medium wp-image-26888 " src="http://www.ghacks.net/wp-content/uploads/2010/06/guake_open-500x281.png" alt="" width="300" height="169" /></a><p
class="wp-caption-text">Figure 3</p></div><p>To use Guake you simply click the keyboard shortcut configured in the Preferences window. By default that key is F12.  When you click the Open key Guake will drop down for you to use. Figure 3 shows Guake in action, running the top command. By default Guake will remain above all other windows until you dismiss it (by clicking the same key you did to open it).</p><p>You can use Guake as you would a normal terminal window. And, like most good modern terminals, you can have multiple tabs open. To open a new tab in Guake, by default, you higt &lt;Ctrl&gt;&lt;Shift&gt;t.</p><p>If you want to know other handy keyboard shortcuts, go back to the Preferences window and look at the Keyboard shortcuts tab.</p><p><strong>Final thoughts</strong></p><p>If you frequently use the command line, you will very much be glad you have found Guake. With a terminal window so accessible, your work will be that much more efficient. And we all know efficiency is a key factor in every day computing (at least for many of us).</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/06/21/guake-hide-able-terminal-goodness/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Hello Kate, goodbye vi</title><link>http://www.ghacks.net/2010/04/30/hello-kate-goodbye-vi/</link> <comments>http://www.ghacks.net/2010/04/30/hello-kate-goodbye-vi/#comments</comments> <pubDate>Fri, 30 Apr 2010 11:16:56 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[editor]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[KDE]]></category> <category><![CDATA[syntax highlighting]]></category> <category><![CDATA[terminal]]></category> <category><![CDATA[text editor]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=25036</guid> <description><![CDATA[In my last article I introduced you to Gedit (see &#8220;Gedit: No more text-based editor for you!&#8220;) and, as promised, this time around we will examine the KDE equivalent&#8230;Kate. Kate is an interesting beast in that it is comprised of two parts: KatePart (which is the underlying editor that is also used in other KDE [...]]]></description> <content:encoded><![CDATA[<p>In my last article I introduced you to Gedit (see &#8220;<a
title="Gedit: No more text-based editor for you!!" href="http://www.ghacks.net/2010/04/29/gedit-no-more-text-based-editor-for-you/" target="_blank">Gedit: No more text-based editor for you!</a>&#8220;) and, as promised, this time around we will examine the KDE equivalent&#8230;Kate. Kate is an interesting beast in that it is comprised of two parts: KatePart (which is the underlying editor that is also used in other KDE components that require an editor) and Kate (the actual text editor). Kate is a complete rewrite of the older kwrite. And, like Gedit, Kate offers a number of outstanding features. In this article I will introduce you to Kate.</p><p><span
id="more-25036"></span><strong>Features</strong></p><p>For a simple text editor, Kate packs in a lot of features:</p><ul><li>MDI, window splitting, and window tabbing.</li><li>Spell check.</li><li>CR/CRLF/LF newline support.</li><li>Encoding support.</li><li>Encoding conversion.</li><li>Regular expression find/replace support.</li><li>Syntax highlighting and bracket matching.</li><li>Code and text folding.</li><li>Infinite undo/redo.</li><li>Block selection.</li><li>Auto indentation.</li><li>Auto completion.</li><li>Shell integration.</li><li>Numerous protocol support (http, ftp, ssh, webdav etc.).</li><li>Internet transparency.</li><li>Plugin support.</li><li>Customizable shortcuts.</li><li>Integrated command line.</li><li>Scriptable (JavaScript).</li></ul><p>That&#8217;s no short list for a simple text editor. But how does it stand up to other such tools? Is it the text editor you&#8217;ve been looking for?</p><p><strong>Main window</strong></p><div
id="attachment_25037" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/04/kate_main.png"><img
class="size-medium wp-image-25037 " src="http://www.ghacks.net/wp-content/uploads/2010/04/kate_main-500x371.png" alt="" width="300" height="223" /></a><p
class="wp-caption-text">Figure 1</p></div><p>When you open up Kate (click <strong>Accessories &gt; Kate</strong>) you will see a two-paned window (see Figure 1). The left pane serves as a &#8220;tab navigation&#8221;. Instead of files opening in tabs, as they do in Gedit, they open up in a list on the left pane. In order to switch between open files you simply have to click on the name listed in the left pane to go back to that particular file.</p><p>One nifty feature of Kate is session saving. Say you have numerous files open for a project and you need to stop working on the for a bit of time. You can save that session and then, when you&#8217;re ready to start working again, open that session back up. When you open the session up it will have retained all of the open files for you so you don&#8217;t have to go back and open them one at a time.</p><p>To do this all you have to do is click <strong>Sessions &gt; Save </strong>and then give your session a name. To open a session click <strong>Sessions &gt; Quick Open</strong> and then select your session.</p><p><strong>Highlighting</strong></p><div
id="attachment_25038" class="wp-caption alignright" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/04/kate_syntax.png"><img
class="size-medium wp-image-25038 " src="http://www.ghacks.net/wp-content/uploads/2010/04/kate_syntax-500x371.png" alt="" width="300" height="223" /></a><p
class="wp-caption-text">Figure 2</p></div><p>And of course, Kate does Syntax highlighting. Figure 1 shows how Kate highlights the same script I illustrated with Gedit. You can easily change the syntax highlight style by clicking <strong>Tools &gt; Highlighting</strong> and then select the type you want. The type show is Bash.</p><p><strong>Embedded terminal</strong></p><div
id="attachment_25039" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/04/kate_terminal.png"><img
class="size-medium wp-image-25039 " src="http://www.ghacks.net/wp-content/uploads/2010/04/kate_terminal-500x371.png" alt="" width="300" height="223" /></a><p
class="wp-caption-text">Figure 3</p></div><p>What would a Linux editor be without a terminal included? Well, Kate sure thinks they would be worthless, because she has one built in. If you click on the Terminal button at the bottom of the window you will open the terminal window (see Figure 3) which is a full featured terminal. Just for fun, I opened up the same script in the terminal for you to compare.</p><p><strong>Final thoughts</strong></p><p>Kate is a very powerful editor that can do handle just about anything any other editor can. give Kate a try, it just might turn out to be one long-term relationship.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/04/30/hello-kate-goodbye-vi/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> <item><title>Linux command line tips</title><link>http://www.ghacks.net/2010/01/18/linux-command-line-tips/</link> <comments>http://www.ghacks.net/2010/01/18/linux-command-line-tips/#comments</comments> <pubDate>Mon, 18 Jan 2010 16:14:53 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[bash]]></category> <category><![CDATA[bash history]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[linux commands]]></category> <category><![CDATA[tab completion]]></category> <category><![CDATA[terminal]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=22425</guid> <description><![CDATA[I thought it would be useful to break away from all the GUI-goodness and offer up a few command line tips and tricks. Why? No matter how powerful, user-friendly, and modern the Linux desktop becomes, there may come a time when you want to step up your game and get down and dirty with the [...]]]></description> <content:encoded><![CDATA[<p>I thought it would be useful to break away from all the GUI-goodness and offer up a few command line tips and tricks. Why? No matter how powerful, user-friendly, and modern the Linux desktop becomes, there may come a time when you want to step up your game and get down and dirty with the command line interface. When you do, you will want your command-fu to be strong. And whether you are brand new to the command line, or have any level of familiarity with this tool, there are tips and tricks out there to make your life easier. This article should at least offer one or two of those tips&#8230;no matter your level of skill.</p><p><span
id="more-22425"></span><strong>Tab completion</strong></p><p>This tip is for the novice. There are a lot of commands on the Linux operating system (in my <strong>/usr/bin</strong> directory there is 1736 commands). Hard to remember all of them. Or sometimes a command will have a number of variations (like in the case of <em>beagle</em>) And sometimes, it&#8217;s just tiring typing all of those commands. Fortunately the Tab key is there to help you out. Open up your terminal window and do the following:</p><ol><li>Type <em>beagle</em></li><li>Hit the Tab key twice</li></ol><p>You should see a complete listing of all commands that start with <em>beagle</em>. Say you want to run <em>beagle-index-info</em>. You can do this by typing <em>beagle-ind</em> and then hitting the Tab key one time.</p><p><strong>Run second command with first commands arguments</strong></p><p>Say you need to find out what the directory <strong>/home/jlwallen/.e16/themes </strong>contains, but when you run the command <em>ls /home/jlwallen/.e16/themes</em> you see that the directory doesn&#8217;t exist. Looks like you will have to create that directory. Normally you would do this by typing <em>mkdir /home/jlwallen/.e16/themes </em>(or <em>mkdir ~/.e16/themes</em>). You can use a neat little trick to take the arguments from the previous command and add them to a new command like so:</p><p><em>mkdir !*</em></p><p>The above command would be the equivalent of (in our example above) <em>mkdir /home/jlwallen/.e16/themes</em>).</p><p><strong>Search your bash history</strong></p><p>If you can&#8217;t remember how you ran a specific command, you can use your bash history to help you. If you hit <strong>&lt;Ctrl&gt;r </strong>you will be in a special bash search prompt that looks like:</p><p><code>(reverse-i-search)`':</code></p><p>From this prompt you can enter a portion of the command and immediately see a command that contains what you type. If the command is the one you are looking for, hit the Enter key to execute that command.</p><p><strong>Another method of searching bash history</strong></p><p>This one is simple. If you can&#8217;t remember the last few commands you entered, just hit the up arrow on your keyboard to look through the list. When you find the command you want to run, hit Enter.</p><p><strong>Create recursive directories with one command</strong></p><p>Have you ever had to create entire directory trees and did so like:</p><p><em>mkdir ~/test</em></p><p><em>mkdir ~/test/test1</em></p><p><em>mkdir ~/test/test1/test2</em></p><p><em>mkdir ~/test/test1/test2/test3</em></p><p>You create all of these subdirectories with a single command:</p><p><em>mkdir -p ~/test/test1/test2/test3</em></p><p><strong>Run a second command only if first command succeeds</strong></p><p>You can string two commands together in such a way that the second of the two commands will work if (and only if) the first command succeeds. Let&#8217;s say you are going to use the <em>wget </em>command to download a tar file and then you want to immediately unpack that file. You could do so with this:</p><p><em>wget http://ADDRESS_OF_SERVER/filename.tgz &amp;&amp; tar xvzf filename.tgz</em></p><p>The above would unpack <em>filename.tgz </em>if (and only if) it is successfully downloaded.</p><p><strong>Final thoughts</strong></p><p>That should get you going for a bit. I&#8217;ll revisit this topic in the future so you can keep your command-fu skills sharp. And, by all means, if you have a cool command-line tip you want to share, please do so.</p><p><strong><br
/> </strong></p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/01/18/linux-command-line-tips/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Get To Know Linux: gnome-terminal</title><link>http://www.ghacks.net/2009/02/06/get-to-know-linux-gnome-terminal/</link> <comments>http://www.ghacks.net/2009/02/06/get-to-know-linux-gnome-terminal/#comments</comments> <pubDate>Fri, 06 Feb 2009 03:56:20 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[bash]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[gnome-terminal]]></category> <category><![CDATA[prompt]]></category> <category><![CDATA[terminal]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=10353</guid> <description><![CDATA[If you use Linux for any amount of time, then most likely you have experienced the command line. And if you use the GNOME desktop environment then you know gnome-terminal. As far as terminals are concerned, gnome-terminal is one of the most versatile of the terminals. It features tabs, colored text, mouse event support, profiles, [...]]]></description> <content:encoded><![CDATA[<p>If you use Linux for any amount of time, then most likely you have experienced the command line. And if you use the GNOME desktop environment then you know gnome-terminal. As far as terminals are concerned, gnome-terminal is one of the most versatile of the terminals. It features tabs, colored text, mouse event support, profiles, real transparency, compositing, and more. And of course you get glorious Linux commands!</p><p>The gnome-terminal comes pre-installed with any GNOME desktop installation, so if you&#8217;re running GNOME you won&#8217;t have to do any further installation. You might, however, want to undertake some configuration changes. We&#8217;ll examine some of those options here.</p><p><span
id="more-10353"></span></p><div
id="attachment_10355" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/02/gnome_terminal_main.png"><img
class="size-medium wp-image-10355" src="http://www.ghacks.net/wp-content/uploads/2009/02/gnome_terminal_main-500x356.png" alt="Default gnome-terminal Window" width="300" height="214" /></a><p
class="wp-caption-text">Default gnome-terminal Window</p></div><p>When you start up the gnome-terminal you will be greeted by the default profile with a single tab open.</p><p>The default features you will notice immediately are the menu bar and the scroll bar. Outside of the bash prompt, the menu bar will be where you take care of most of your gnome-terminal business. Let&#8217;s examine what you will find in each menu entry:</p><p><strong>File:</strong> In this menu entry you can open/close a new tab, open/close a new terminal, and/or create a new profile.</p><p><strong>Edit:</strong> In this menu entry you can copy/paste, edit your profiles, and/or configure keyboard shortcuts.</p><p><strong>View: </strong>In this menu entry you can configure gnome-terminal to show/hide the menubar, and/or the scrollbar or you can zoom in or out.</p><p><strong>Terminal:</strong> In this menu entry you can change your profile, change your window title, set character encoding, reset your terminal, and/or reset and clear your terminal.</p><p><strong>Tabs:</strong> In this menu entry you can cycle through your open tabs and/or detach a tab (so it is its own window).</p><p><strong>Help:</strong> In this menu entry you can open up the GNOME Help system to learn about gnome-terminal and you can open the &#8220;about gnome-terminal&#8221; window.</p><p>That&#8217;s it for the tabs.</p><p>As I mentioned, the gnome-terminal is fairly configurable. You can make this terminal as minimal as you like. You can remove the scrollbar and the menubar if you like. To do this click on the View menu and de-select both the scrollbar and the menubar. What that leaves you with is nothing more than a terminal prompt in a window. Or does it? If you right click anywhere in the gnome-terminal window a menu will appear. From that menu you can select to, once again, show the menubar. Once the menubar is back you can then select to show the scrollbar.</p><p><strong>Profiles</strong></p><p>One of the nicest aspects of the gnome-terminal is that you can create profiles. Each profile can reflect, say, a different job. Say you want to have a root user profile. This can make for an easy way to instantly know you are using the root user (so you don&#8217;t commit any command-line fouls that could damage your system). To create a new profile click on File and then select New Profile.  What you will see is a small window asking you to name the new profile and base the new profile on a pre-existing profile.</p><p>Once the new profile is named the main Profile editor window will appear where you can really tweak your profile. There are six tabs within the Profile editor:</p><p><strong>General: </strong>Configure the general options such as name, font, show menubar, terminal bell.</p><p><strong>Title and Command: </strong>Give this profile an initial title and run custom commands (such as automatically listing directory contents when a profile is opened.)</p><p><strong>Colors: </strong>Foreground and background colors.</p><p><strong>Background: </strong>Configure a background image or window transparency.</p><p><strong>Scrolling: </strong>Place the scroll bar and define how far back it will scroll.</p><p><strong>Compatibility: </strong>Configure the backspace and delete keys.</p><p><strong>Final thoughts</strong></p><p>I have used many terminals in my day, but the gnome-terminal is one of the finest. Not only is it very compatible, it is useful and user-friendly. If you use the GNOME desktop (or an alternative desktop), make sure you get to know gnome-terminal for all your command line goodness.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/02/06/get-to-know-linux-gnome-terminal/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Save Your Skin by Customizing Your Bash Prompt</title><link>http://www.ghacks.net/2009/01/06/save-your-skin-by-customizing-your-bash-prompt/</link> <comments>http://www.ghacks.net/2009/01/06/save-your-skin-by-customizing-your-bash-prompt/#comments</comments> <pubDate>Tue, 06 Jan 2009 20:21:28 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[.bashrc]]></category> <category><![CDATA[bash]]></category> <category><![CDATA[bash customization]]></category> <category><![CDATA[terminal]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=9685</guid> <description><![CDATA[If you do much work at the Linux command line then you know the bash prompt can offer you a lot of information. But by default the prompt itself isn&#8217;t too useful.  What you might not know is that you can customize the bash prompt in many ways. From configuring colors to the information bash [...]]]></description> <content:encoded><![CDATA[<p>If you do much work at the Linux command line then you know the bash prompt can offer you a lot of information. But by default the prompt itself isn&#8217;t too useful.  What you might not know is that you can customize the bash prompt in many ways. From configuring colors to the information bash reports, there are so many variations on the bash prompt you could play for days.</p><p>But there is one configuration you can do that is more helpful than any other. Have you ever accidentally issued a standard user command as the root user only to find yourself really regretting that command a millisecond later? It&#8217;s a common new Linux user mistake, but one that can be prevented. You&#8217;ll learn how to help yourself out here.</p><p><span
id="more-9685"></span>Before we get into the actual configuration (and how you can help yourself), let&#8217;s take a look at some basics. From your command line issue the following command <em>echo $PS1</em>. What you should see is the string that comprises your current default bash prompt. When I issue this command I see <strong>[\u@\h \W]\$</strong> and my prompt looks like <strong>[jlwallen@localhost ~]$</strong>. Let me explain what the components of the string are.</p><p>[ - When used alone this is simply a printed character.</p><p>\u - This prints out the current username.</p><p>@ - When used alone this is simply a printed character.</p><p>\h - This prints out the hostname of the machine up to the first dot.</p><p>\W - This prints out the basename of the current working directory (with the users home directory represented by the "~" character.</p><p>] &#8211; When used alone this is simply a printed character.</p><p>\$ &#8211; If root user this prints a &#8220;#&#8221; character, otherwise it prints a &#8220;$&#8221; character.</p><p>So let&#8217;s say you want to be clever and have a prompt that looks like <strong>URHERE (~):</strong></p><p>To create this issue the command:</p><p><em>PS1=&#8221;URHERE (\W): &#8220;</em></p><p>What the above command does is temporarily set your bash prompt. This prompt will last until you close out your terminal window. When you open a new terminal your default prompt will return.</p><p>To make this permanent you will need to open up your <strong>.bashrc</strong> file and add the line you entered as a command. The default <strong>.bashrc</strong> file might look like:</p><p><em># .bashrc</em></p><p><em># User specific aliases and functions<br
/> ? () { echo &#8220;$*&#8221; | bc -l; }</em></p><p><em># Source global definitions<br
/> if [ -f /etc/bashrc ]; then<br
/> . /etc/bashrc<br
/> fi</em></p><p>If you want to make this permanent add the line <em>PS1=&#8221;URHERE </em>(\W): &#8220;<em> </em>right under the <em># .bashrc</em> line. Save that file and open up a new prompt. Voila!</p><p><strong>Adding Color</strong></p><p>Okay, let&#8217;s take it to 11. One trick I like to employ is configuring the root prompt to be a different color than the standard user prompt. This way, if I see a red prompt, I instantly know I am dealing with the root user. Here is the trick with adding color. First you have to use a special string to indicate the beginning of a color. That string is:</p><p><em>\e[</em></p><p>Now to end a color you use the special string:</p><p><em>\e[m</em></p><p>For the color red you would use the string:</p><p>1;31m</p><p>So if you want the string <em>URHERE</em> to show up in red and the directory to remain the default white you would enter into the root user&#8217;s .bashrc file:</p><p>PS1=&#8221;\e[1;31mURHERE\e[m (\W): &#8221;</p><p>Here are the various colors you can use.</p><ul><li>0;30 &#8211; Black</li><li>0;31 &#8211; Red</li><li>0;32 &#8211; Green</li><li>0;33 &#8211; Brown</li><li>0;34 &#8211; Blue</li><li>0;35 &#8211; Purple</li><li>0;36 &#8211; Cyan</li></ul><p>The 0 equals the dark variation of the color and a 1 equals the lighter variation of the color.</p><p><strong>Final Thoughts</strong></p><p>You can really get creative with the bash prompt. With the basics you have learned here you can make your prompt both unique and helpful. If you come up with something really incredible post it here for all to enjoy!</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/01/06/save-your-skin-by-customizing-your-bash-prompt/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Traceroute From Multiple Locations</title><link>http://www.ghacks.net/2008/07/30/traceroute-from-multiple-locations/</link> <comments>http://www.ghacks.net/2008/07/30/traceroute-from-multiple-locations/#comments</comments> <pubDate>Wed, 30 Jul 2008 15:32:17 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Online Services]]></category> <category><![CDATA[connection problems]]></category> <category><![CDATA[network]]></category> <category><![CDATA[terminal]]></category> <category><![CDATA[traceroute]]></category> <category><![CDATA[tracert]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=5308</guid> <description><![CDATA[The Traceroute command displays the list of Internet hops that lie between your local computer and the remote computer. It provides an excellent way to identify connection problems because it is actually showing you the hop that is causing the problems. Just Traceroute (via Digital Inspiration) takes this a step further by issuing a traceroute [...]]]></description> <content:encoded><![CDATA[<p>The Traceroute command displays the list of Internet hops that lie between your local computer and the remote computer. It provides an excellent way to identify connection problems because it is actually showing you the hop that is causing the problems.</p><p><a
href="http://just-traceroute.com/">Just Traceroute</a> (via <a
href="http://www.labnol.org/internet/tools/run-traceroute-command-on-multiple-computers/4027/">Digital Inspiration</a>) takes this a step further by issuing a traceroute command from multiple locations in the world. Different locations, especially when they are from different parts of the world, use different &#8220;ways&#8221; to reach their target which could give additional information about the cause of the connection problem.</p><p>The services is using servers located in the United States, Netherlands, Australia and Singapore to run the traceroute command.</p><p><span
id="more-5308"></span><img
src="http://www.ghacks.net/wp-content/uploads/2008/07/tracerouter_multiple_locations-500x250.jpg" alt="tracerouter multiple locations" title="tracerouter multiple locations" width="500" height="250" class="alignnone size-medium wp-image-5731" /></p><p>The results can be forwarded to an email address. The very same window offers a way to copy the all four traceroutes to the clipboard directly.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2008/07/30/traceroute-from-multiple-locations/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> </channel> </rss>
