<?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>linux terminal Archives - Tech Antidote</title>
	<atom:link href="https://techantidote.com/tag/linux-terminal/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>‎ &#124; LINUX &#124; Tech &#124; Security &#124;</description>
	<lastBuildDate>Sat, 28 May 2016 19:05:53 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://techantidote.com/wp-content/uploads/2016/02/cropped-google-plus-profile-picture-32x32.png</url>
	<title>linux terminal Archives - Tech Antidote</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">106369530</site>	<item>
		<title>Useful Linux Terminal shortcuts</title>
		<link>https://techantidote.com/linux-terminal-shortcuts/</link>
					<comments>https://techantidote.com/linux-terminal-shortcuts/#respond</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Sat, 28 May 2016 12:12:56 +0000</pubDate>
				<category><![CDATA[Linux / Redhat]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[linux terminal]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[shortcuts]]></category>
		<category><![CDATA[sysadmin]]></category>
		<guid isPermaLink="false">http://techantidote.com/?p=1942</guid>

					<description><![CDATA[<p>Here are some useful Linux Terminal Shortcuts: Shortcut 1: Run previous typed command In your Linux terminal, type: # ls -l Now, if you want to run this command again i.e the (previous command), type the following and hit ENTER: # !! This will run the command which was previously typed i.e &#8216;ls -l&#8217;. Shortcut 2: Run command with last &#8230; <a href="https://techantidote.com/linux-terminal-shortcuts/" class="more-link">Continue reading <span class="screen-reader-text">Useful Linux Terminal shortcuts</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://techantidote.com/linux-terminal-shortcuts/">Useful Linux Terminal shortcuts</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Here are some useful Linux Terminal Shortcuts:</p>
<p><span style="color: #3366ff;"><strong>Shortcut 1:</strong> <strong>Run previous typed command</strong></span></p>
<p>In your Linux terminal, type:</p>
<pre><strong># ls -l</strong></pre>
<p>Now, if you want to run this command again i.e the (previous command), type the following and hit ENTER:</p>
<pre><strong># !!</strong></pre>
<p>This will run the command which was previously typed i.e &#8216;<strong>ls -l&#8217;</strong>.</p>
<p><span style="color: #3366ff;"><strong>Shortcut 2: Run command with last argument from previous command</strong></span></p>
<p>For this example, lets create an empty file one.txt:</p>
<pre><strong># touch one.txt</strong></pre>
<p>Now, lets use the following command:</p>
<pre><strong># cp one.txt one.bak</strong></pre>
<p>Lets break down this command according to its arguments:</p>
<p>1st argument &#8211; <strong>one.txt</strong></p>
<p>2nd argument / last argument &#8211; <strong>one.bak</strong></p>
<p>[ <strong>Note</strong>: We can logically say that the 0th argument is the command <strong>cp</strong> itself. ]</p>
<p>Lets say we want to edit the file &#8220;<strong>one.bak</strong>&#8221; (which is the last argument for command <strong>cp</strong>, we can use:</p>
<pre><strong># vi !$</strong></pre>
<p>The above command is same as running &#8216;<strong>vi one.back</strong>&#8216;. Also note that the !<strong>$</strong> passes the <strong>last argument of the previous command</strong> to the current command vi.</p>
<p><span style="color: #3366ff;"><strong>Shortcut 2 (Alternative)</strong></span>:</p>
<p>Now, lets use the following command:</p>
<pre><strong># cp one.txt one.bak</strong></pre>
<p>An alternative way to provide an argument from the previous command to another command is by using !:&lt;argument number&gt;. For example, to pass the 2nd argument of the last command, we use <strong>!:2 </strong>as follows:</p>
<pre><strong># vi !:2</strong></pre>
<p>Here <strong>!:2</strong> means that we are passing the 2nd argument of the previous command.</p>
<p><span style="color: #3366ff;"><strong>Shortcut 3 : Linux Terminal Keyboard shortcuts</strong></span></p>
<p>To get the previous command: Press the <strong>UP</strong> arrow in the keyboard.</p>
<p>To kill a process when you are in the Linux terminal: Press &lt;<strong>CTRL&gt;</strong> + <strong>C </strong>in your keyboard.</p>
<p><span style="color: #3366ff;"><strong>Shortcut 4 : Autocomplete:</strong></span></p>
<p>Trust me when I say this, this shortcut makes your life easier. If you need to auto complete a command, you can use the <strong>TAB</strong> key in your keyboard. This is one the shortcuts that is used by most Linux users.</p>
<p><strong>Example:</strong></p>
<p>If you want to type <strong>ifconfig</strong> in your Linux terminal, you can start typing the command and then press the TAB key to auto complete it. In this case, type <strong>ifcf</strong> and then press <strong>TAB </strong>and it will autocomplete the command.</p>
<p>The TAB feature can also be used to autocomplete known information such as file names which are passed as arguments.</p>
<p>For example: Lets assume in the current directory that you are on has only two files <strong>first.txt</strong> and <strong>second.txt. </strong>Now, if you need to type this command &#8216;<strong>cat first.txt second.txt</strong>&#8216;, then you can use the <strong>TAB</strong> shortcut to auto-complete it by following these steps:</p>
<p>Type <strong>cat</strong> and then type <strong>f </strong>and then<strong> press TAB </strong>to autocomplete it to:</p>
<pre><strong> cat first.txt</strong></pre>
<p>Then type the first letter of the next argument i.e. type <strong>s </strong>and then press<strong> TAB, </strong>which it autocomplete the command to<strong>:</strong></p>
<pre><strong>cat first.txt second.txt
</strong></pre>
<p><span style="color: #3366ff;"><strong>Shortcut 5: Move between words</strong></span></p>
<ul>
<li><span style="color: #3366ff;"><strong>Navigate to the next word from current position:</strong></span></li>
</ul>
<p>Press <strong>&lt;CTRL&gt;</strong> and <strong>&lt;Right Arrow key&gt;</strong> in your keyword to move to the next word(towards the right side of current cursor position) in your terminal. This is also applicable in Linux editors such as <strong>vi</strong> or <strong>vim</strong>.</p>
<ul>
<li><span style="color: #3366ff;"><strong>Move to previous word in terminal from current position:</strong></span></li>
</ul>
<p>Press <strong>&lt;CTRL&gt;</strong> and <strong>&lt;Left Arrow key&gt;</strong> in your keyword to move to the previous word/the word to the left side from current cursor position in your Linux terminal (or most editors). You can press it again accordingly, if you need to move the cursor one word at a time towards the left direction.</p>
<p>The above two shortcuts are useful when you are entering commands in the Linux terminal and need to correct a particular word in the command. This helps navigating back and forth between words/parameters in the command with ease.</p>
<p><span style="color: #3366ff;"><strong>Other Bash Shortcuts:</strong></span></p>
<p>To go to the 1st terminal, press <strong>CTRL</strong>, <strong>ALT</strong> and the function key <strong>F1</strong> in your keyboard.</p>
<p>To go the nth terminal, press <strong>CTRL</strong>, <strong>ALT</strong> and <strong>Fn</strong> (where Fn can be function keys F1, F2, F3 etc).</p>
<p>To<strong> paste </strong>previously copied text to your Linux terminal/editor, you can press the <strong>middle button</strong> in your <strong>mouse</strong>. Now, How cool is that uh? <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>To lock your Linux machine press <strong>&lt;CTRL&gt; &lt;ALT&gt;</strong> and the letter <strong>l</strong> in your keyboard.</p>
<p>And that&#8217;s it for now, hope its been informative. I will be updating this article in the future with more Linux terminal shortcuts  as soon as I find new ones, so stay tuned! If this article helped you, do leave a comment below and like us on <a href="http://twitter.com/techantidote">Twitter</a> and <a href="http://facebook.com/techantidote">Facebook</a>. <span style="color: #3366ff;"><strong>Cheers!</strong></span></p>
<p>Hope this helps!</p>
<p>The post <a href="https://techantidote.com/linux-terminal-shortcuts/">Useful Linux Terminal shortcuts</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techantidote.com/linux-terminal-shortcuts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1942</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: techantidote.com @ 2026-11-18 00:24:18 by W3 Total Cache
-->