<?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>bash Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Wed, 31 Aug 2022 05:51:19 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>This is the difference between terminal, console, shell and command line.</title>
		<link>https://www.osradar.com/this-is-the-difference-between-terminal-console-shell-and-command-line/</link>
					<comments>https://www.osradar.com/this-is-the-difference-between-terminal-console-shell-and-command-line/#respond</comments>
		
		<dc:creator><![CDATA[roger]]></dc:creator>
		<pubDate>Wed, 07 Sep 2022 21:49:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[windows terminal]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=37102</guid>

					<description><![CDATA[<p>Hello! working in text mode, Manage from the command line, Open the console. All of them are expressions that refer to similar concepts and that we tend to confuse and intermingle. Certainly, the environment beyond the typical graphical interfaces is confusing enough for novices. Therefore, it is not advisable to dive into it without having [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/this-is-the-difference-between-terminal-console-shell-and-command-line/">This is the difference between terminal, console, shell and command line.</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello! <em>working in text mode</em>, <em>Manage from the command line</em>, <em>Open the console</em>. All of them are expressions that refer to similar concepts and that we tend to confuse and intermingle. Certainly, the environment beyond the typical graphical interfaces is confusing enough for novices. Therefore, it is not advisable to dive into it without having a clear understanding of the concepts. Next, we will learn the difference between <a href="https://www.osradar.com/some-aspects-and-commands-of-windows-terminal/" target="_blank" rel="noreferrer noopener">terminal,</a> console, shell and command line.</p>



<h2>Terminal (emulator)</h2>



<p>The terminal itself is a physical device that allows inputting and receiving information from a <a href="https://github.com/microsoft/terminal" target="_blank" rel="noreferrer noopener">computer</a>. The most important thing is that it is not necessary for the processing of instructions and data to be carried out on the terminal itself.</p>



<p>Certainly, in today&#8217;s world, it is common to interact with the operating system in text mode. Well, in most cases, we will not refer to this meaning of <em>terminal</em>. In fact, the correct term refers to the so-called <em>terminal emulators</em>. These allow us to use text mode within a graphical user interface. This other class of terminals are merely applications that run and give us access to a shell. In fact, they usually allow multiple shell types to be used. This is the case, for example, of Windows Terminal. By default, we will be able to manage the following: Windows PowerShell, PowerShell, Command Prompt, Azure Cloud Shell, the multiple distributions we have installed in the Linux Subsystem (WSL), etc.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="358" src="https://www.osradar.com/wp-content/uploads/2022/08/ter-1024x358.png" alt="" class="wp-image-37103" srcset="https://www.osradar.com/wp-content/uploads/2022/08/ter-1024x358.png 1024w, https://www.osradar.com/wp-content/uploads/2022/08/ter-300x105.png 300w, https://www.osradar.com/wp-content/uploads/2022/08/ter-768x268.png 768w, https://www.osradar.com/wp-content/uploads/2022/08/ter-696x243.png 696w, https://www.osradar.com/wp-content/uploads/2022/08/ter-1068x373.png 1068w, https://www.osradar.com/wp-content/uploads/2022/08/ter.png 1219w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>On the other hand, Windows Terminal is not the only Windows terminal emulator. Indeed, there are MobaXterm, Cmder, ConEmu and others. However, in the case of Unix-based systems (Linux, *BSD, macOS), the catalog of available terminals is multiplied to infinity. In fact, each desktop environment usually offers its own (Gnome Terminal in GNOME, Konsole in KDE, iTerm in macOS…). But it is also possible to install third-party alternatives for all tastes (Terminator, Alacritty, Guake, st…).</p>



<p>Each terminal emulator differs by offering its own graphical interfaces, functionalities, and configuration options. For example, keyboard shortcuts, font and background customization, clipboard management, etc.</p>



<h2>Consola [Virtual]</h2>



<p>Console is a term that is often used inconsistently. In fact, even more so than the other terms in this list. Additionally, multiple definitions are available on the Internet. In fact, the discrepancies start even in the origin of the word. For some, the old physical console is exactly the same as a physical terminal. On the other hand, others introduce certain nuances, considering the former as a subset of the latter.</p>



<p>What happens when we talk about virtual console? What happens when we talk about virtual console? Many sources consider it, also, synonymous with (terminal emulator.) However, it would be more correct to refer to it as a shell session. Let&#8217;s see, let&#8217;s suppose we open a terminal emulator and start typing commands directly. In that case, we are,  effectively, using a terminal and a console.</p>



<p>On the other hand, suppose we open two tabs in the terminal emulator, whether they are from the same shell. In that case, we are already using two consoles. It can also happen that we subdivide a tab using tools such as a multiplexer (for example, Tmux), or functions such as <em>split table</em> of Windows Terminal. In such a case, the number of consoles will continue to multiply, even if we are only using a single terminal.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="853" src="https://www.osradar.com/wp-content/uploads/2022/08/ter2-1024x853.png" alt="" class="wp-image-37105" srcset="https://www.osradar.com/wp-content/uploads/2022/08/ter2-1024x853.png 1024w, https://www.osradar.com/wp-content/uploads/2022/08/ter2-300x250.png 300w, https://www.osradar.com/wp-content/uploads/2022/08/ter2-768x640.png 768w, https://www.osradar.com/wp-content/uploads/2022/08/ter2-696x580.png 696w, https://www.osradar.com/wp-content/uploads/2022/08/ter2-1068x889.png 1068w, https://www.osradar.com/wp-content/uploads/2022/08/ter2.png 1280w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>In addition, when using a Linux system, we always have several consoles open (although not visible). We are talking about the so-called &#8216;TTY&#8217;, which we can access with the keyboard shortcut Ctrl + Alt + function key (one per key). Part of them will be graphic consoles. However, the others will be text consoles, each running in parallel with the others. Additionally, all of them working outside our graphical environment, so we would not be using them from terminal emulators.</p>



<h2>Shell</h2>



<p>We have already mentioned, when talking about terminals, several examples of different shells that can be found in Windows. As with terminals, the number of shells in Unix systems multiplies. Certainly, Bash is usually installed as the default shell. However, it is possible to change it for different ones, such as the very popular Zsh. Remember that macOS ended up adopting it as a default shell. Other options include the emerging Fish, the old Ksh and Tcsh, or minority options such as Xonsh.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="650" height="650" src="https://www.osradar.com/wp-content/uploads/2022/08/ter3.png" alt="" class="wp-image-37106" srcset="https://www.osradar.com/wp-content/uploads/2022/08/ter3.png 650w, https://www.osradar.com/wp-content/uploads/2022/08/ter3-300x300.png 300w, https://www.osradar.com/wp-content/uploads/2022/08/ter3-150x150.png 150w" sizes="(max-width: 650px) 100vw, 650px" /></figure>



<p>The function of the shell is to interpret the commands we enter. You might think that there can&#8217;t be much difference in how some commands are interpreted. However, there are many variables to watch out for. For example, the different syntax of the scripts, or aspects such as the possibility of creating aliases and defining variables. Also, the existence of syntax highlighting or auto-completion functions. Likewise, the way in which the system output is displayed on the screen. Well, all these elements can make the user experience vary significantly depending on which shell we use.</p>



<h2>Command interpreter (or command line)</h2>



<p>Every shell is a command interpreter. However, not every shell is a shell. A command interpreter (also called CLI), is any software that interacts with us through the input of text commands. Some CLIs run on top of a shell and are not intended to be a way to control the operating system. Instead, they aim to be just a very specific software or online service. Examples of this can be NPM, IPython, GitHub CLI, AWS CLI or our favorite SSH client. Very well, in this way we have made clear the differences between terminal, console, shell and command line. Bye!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/this-is-the-difference-between-terminal-console-shell-and-command-line/">This is the difference between terminal, console, shell and command line.</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/this-is-the-difference-between-terminal-console-shell-and-command-line/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Learn how to install and use bash in Windows 10</title>
		<link>https://www.osradar.com/learn-how-to-install-and-use-bash-in-windows-10/</link>
					<comments>https://www.osradar.com/learn-how-to-install-and-use-bash-in-windows-10/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Sun, 15 Mar 2020 16:45:21 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[ubuntu 18.04]]></category>
		<category><![CDATA[ubuntu on windows]]></category>
		<category><![CDATA[windows subsystem for linux]]></category>
		<category><![CDATA[WSL]]></category>
		<guid isPermaLink="false">https://windowsmen.com/?p=994</guid>

					<description><![CDATA[<p>Hi. Bash on Windows 10? Doesn&#8217;t sound coherent, does it? The truth is I talk about bash, immediately Linux comes to mind. In fact, it&#8217;s a Unix shell developed by Brian Fox and adopted by default in most Linux and macOS distributions. Moreover, it is a computer program whose function is to interpret commands. It [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/learn-how-to-install-and-use-bash-in-windows-10/">Learn how to install and use bash in Windows 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hi. Bash on Windows 10? Doesn&#8217;t sound coherent, does it? The truth is I talk about bash, immediately Linux comes to mind. In fact, it&#8217;s a Unix <a rel="noreferrer noopener" aria-label="shel (opens in a new tab)" href="http://linuxcommand.org/lc3_lts0010.php" target="_blank">shel</a>l developed by Brian Fox and adopted by default in most <a rel="noreferrer noopener" aria-label="Linux  (opens in a new tab)" href="https://www.linux.com/what-is-linux/" target="_blank">Linux </a>and macOS distributions. Moreover, it is a computer program whose function is to interpret commands. It was written for the GNU project and is POSIX compatible. Under those circumstances, it is logical to think that this program is exclusive to Linux-based distributions. However, for some time now Microsoft has been flirting with GNU and what Linux stands for. In fact, since some time ago, Microsoft offers the Windows for Linux (WSL) subsystem. This innovation of Windows allows the user to have contact with the Linux system, without having to leave the primary system. Well, in this post we will see how to install and use bash in Windows 10.</p>



<h2>How to enable the Windows Subsystem for Linux</h2>



<p>WSL is a feature that allows Windows 10 users to use the Bash of the available Linux distribution. In addition, WSL provides a Linux-compatible kernel interface developed by Microsoft. Also, we can have the typical Linux directories like <em>Home</em> or <em>Bin</em> in Windows and the Windows directories in Linux bash. But maybe the most relevant aspect is to be able to use Bash commands inside Windows without the need to resort to a virtual machine. Well, let&#8217;s see how to enable this system. In the first place, follow this path to enter the optional features of Windows. <strong>Control Panel&gt;Programs&gt;Turn windows features on or off</strong></p>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/wsl-1024x548.png" alt="Enter the optional features of Windows" class="wp-image-1011"/><figcaption>Enter the optional features of Windows</figcaption></figure>



<p>In the box below, scroll down to find Windows Subsystem for Linux. Please check the appropriate box.</p>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/wls2.png" alt="" class="wp-image-1013"/><figcaption>Check the box to install WSL</figcaption></figure>



<p>Wait a few seconds while the features are installed. Then restart the computer to confirm the changes.</p>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/wsl6.png" alt="After the changes are made, please restart the computer." class="wp-image-1014"/><figcaption>After the changes are made, please restart the computer.</figcaption></figure>



<h2>Download and Install Ubuntu 18.04 LTS</h2>



<p>Once the configuration is enabled, just go to the Windows Store and download the available distro. At the moment the following options are ready for download: Ubuntu, Kali, Open Suse Leap 15-1, Debian and Alpine WSL. Undoubtedly in the future more will be added. Well, this time we will use Ubuntu 18.04 LTS. You can download it from this <a rel="noreferrer noopener" aria-label="link (opens in a new tab)" href="https://www.microsoft.com/en-us/p/ubuntu-1804-lts/9n9tngvndl3q?activetab=pivot:overviewtab" target="_blank">link</a>. Press Get and wait while the program downloads.</p>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/wsl3-1024x548.png" alt="" class="wp-image-1016"/></figure>



<p>Once the download is complete, you can launch the program from the same store. Or you can also type Ubuntu from the Windows search engine. Please wait a few moments while the installation is completed. Then assign any user name and add a password.</p>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/wsl4.png" alt="Add a username and password to complete the installation." class="wp-image-1020"/><figcaption>Add a username and password to complete the installation.</figcaption></figure>



<h2>Using Ubuntu for the first time</h2>



<p>Once the preparations have been made, it&#8217;s time to test the operation of Ubuntu. With this intention, update the list of packages in the repositories by running the following command:</p>



<pre class="wp-block-preformatted"> sudo apt-get update </pre>



<p>Then type the password and press enter. Immediately the ubuntu bash will start working.</p>



<figure class="wp-block-image size-large"><img src="https://windowsmen.com/wp-content/uploads/2020/03/wsl5-1024x548.png" alt="Updating repository packages" class="wp-image-1022"/><figcaption>Updating repository packages</figcaption></figure>



<p> Well, finally we&#8217;ve seen how to install and use bash in Windows 10. From this moment on, just type Ubuntu in the search bar to launch the app. Before I say goodbye, I invite you to see our post about Microsoft employees infected with <a rel="noreferrer noopener" aria-label="COVID-19 (opens in a new tab)" href="https://windowsmen.com/microsoft-employees-affected-by-covid-19/" target="_blank">COVID-19</a>. Bye</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/learn-how-to-install-and-use-bash-in-windows-10/">Learn how to install and use bash in Windows 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/learn-how-to-install-and-use-bash-in-windows-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Write a Bash Script to Queue Links for youtube-dl</title>
		<link>https://www.osradar.com/write-a-bash-script-to-queue-links-for-youtube-dl/</link>
					<comments>https://www.osradar.com/write-a-bash-script-to-queue-links-for-youtube-dl/#comments</comments>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Sat, 07 Sep 2019 01:56:11 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[youtube]]></category>
		<category><![CDATA[youtube-dl]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=13461</guid>

					<description><![CDATA[<p>Most people use YouTube. However, if you are like me and don’t like streaming your digital content and instead prefer to have raw media files available on your hard disk which can be played back at much better quality than streaming services offer on unstable or slow internet connections, then you are probably already using [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/write-a-bash-script-to-queue-links-for-youtube-dl/">Write a Bash Script to Queue Links for youtube-dl</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Most people use YouTube. However, if you are like me and don’t like streaming your digital content and instead prefer to have raw media files available on your hard disk which can be played back at much better quality than streaming services offer on unstable or slow internet connections, then you are probably already using the popular <a href="https://youtube-dl.org/"><strong>youtube-dl</strong></a> tool to download digital content from YouTube.</p>
<p>youtube-dl allows a user to download video and audio (or split the audio/video into separate files) from YouTube links by simply pasting the shared URL into the terminal console following the youtube-dl syntax. That’s the easy part. But what do you do if you have more than one or two links?</p>
<p>Sometimes when I am browsing YouTube I collect a bunch of links which I want to download. Sometimes this can be 3-5 links, or sometimes I can end up with an extensive list of 10 or more which I had not originally intended. It can be time consuming manually pasting in links then waiting for each download to complete before pasting in the next link and repeating the process. Thankfully, there is an easier way to do it by writing a neat little Bash script.</p>
<p>Let’s get started.</p>
<p>For example purposes, we will use the following fake randomly generated links to download:</p>
<pre><strong>https://youtu.be/ACcLsrbigWu</strong>
<strong>https://youtu.be/BAbg6BnkB3F</strong>
<strong>https://youtu.be/l0eRloaKxVS</strong></pre>
<p>So let’s write ourselves a neat little Bash script to deal with these links, using a combination of Bash and youtube-dl.</p>
<p>I use Emacs for this kind of short-style scripting, but feel free to use whatever code editor you prefer. Let’s just call our script something easy, like &#8220;yt-queue.sh&#8221;:</p>
<pre><strong>&gt; emacs yt-queue.sh</strong></pre>
<p>Then in your code editor, enter the following syntax:</p>
<pre><strong>#!/bin/bash</strong>
<strong>#</strong>

<strong>#start</strong>
<strong>#links</strong>
<strong>#end</strong></pre>
<p><img loading="lazy" class="aligncenter size-full wp-image-13465" src="https://www.osradar.com/wp-content/uploads/2019/09/yt-queue_1.png" alt="" width="1919" height="1079" srcset="https://www.osradar.com/wp-content/uploads/2019/09/yt-queue_1.png 1919w, https://www.osradar.com/wp-content/uploads/2019/09/yt-queue_1-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/09/yt-queue_1-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/09/yt-queue_1-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/09/yt-queue_1-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2019/09/yt-queue_1-1068x601.png 1068w, https://www.osradar.com/wp-content/uploads/2019/09/yt-queue_1-747x420.png 747w" sizes="(max-width: 1919px) 100vw, 1919px" /></p>
<p>This provides a basic and sensible script layout for your youtube-dl queue.</p>
<p>Where we have &#8220;#links&#8221;, press &#8220;ENTER&#8221; at the end of the line so we get a new blank line. Now we need to paste in the links to download. But remember to write &#8220;youtube-dl&#8221; before each link. This is effectively telling the Bash script to use youtube-dl to download the link that follows. Once one link has completed downloading, the script then passes onto the next line in the queue, and then the next and so forth. Stupidly simple, yet effective.</p>
<p>After pasting in the links, the script should look something like this:</p>
<pre><strong>#!/bin/bash</strong>
<strong>#</strong>

<strong>#start</strong>
<strong>#links</strong>
<strong>youtube-dl https://youtu.be/ACcLsrbigWu</strong>
<strong>youtube-dl https://youtu.be/BAbg6BnkB3F</strong>
<strong>youtube-dl https://youtu.be/l0eRloaKxVS</strong>
<strong>#end</strong></pre>
<p>The script is finished. Now we need to just execute it when we are ready to start it.</p>
<p>This process is particularly useful for downloading extensive lists which can be done overnight &#8211; write your script before you go to bed, execute the script and by the morning your files will be completed.</p>
<p>Execute the script by simply running the following:</p>
<pre><strong>&gt; bash yt-queue.sh</strong></pre>
<p>You have now learned how to write a simple Bash script to queue links for youtube-dl.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/write-a-bash-script-to-queue-links-for-youtube-dl/">Write a Bash Script to Queue Links for youtube-dl</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/write-a-bash-script-to-queue-links-for-youtube-dl/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Bash Auto Completion</title>
		<link>https://www.osradar.com/bash-auto-completion/</link>
					<comments>https://www.osradar.com/bash-auto-completion/#respond</comments>
		
		<dc:creator><![CDATA[osradar_editor]]></dc:creator>
		<pubDate>Thu, 29 Nov 2018 18:57:12 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bash auto completion]]></category>
		<category><![CDATA[bash code]]></category>
		<category><![CDATA[bash completion]]></category>
		<category><![CDATA[bash linux]]></category>
		<category><![CDATA[bash shell]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=7810</guid>

					<description><![CDATA[<p>When you’re on Linux, the art of “terminal and commands” is a daily dose. The terminal is a powerful solution for the Linux platform that can perform wonders and tons of tasks. It also provides great versatility and control over the system. In the case of Bash – the most popular shell for Linux, auto [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/bash-auto-completion/">Bash Auto Completion</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>When you’re on Linux, the art of “terminal and commands” is a daily dose. The terminal is a powerful solution for the Linux platform that can perform wonders and tons of tasks. It also provides great versatility and control over the system.</p>
<p>In the case of Bash – the most popular shell for Linux, auto code completion isn’t available by default. Bash can run most of the “sh” scripts without any modification. Code auto-completion is a great feature for reducing your load of typing each and every single command as you type. If you’re interested in the code completion, then <a href="https://www.osradar.com/enjoy-fish-shell-on-linux/">Fish shell is the best choice</a>.</p>
<p>Despite default code completion, you can still enjoy the feature, thanks to the great “bash-completion”. This tool will enable the auto-completion feature on Bash shell.</p>
<p>Let’s enjoy “bash-completion” shell right away!</p>
<h1>Getting “bash-completion”</h1>
<p>The “bash-completion” provides all the available pre-built packages for the major Linux distros. <a href="https://github.com/scop/bash-completion">Check bash-completion on GitHub</a>.</p>
<p><img loading="lazy" class="size-full wp-image-7811 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-1.png" alt="" width="928" height="463" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-1.png 928w, https://www.osradar.com/wp-content/uploads/2018/11/bash-1-300x150.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-1-768x383.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-1-842x420.png 842w" sizes="(max-width: 928px) 100vw, 928px" /></p>
<p>The following guide will install “bash-completion” from source and it will apply for all the Linux distros.</p>
<p>Grab “bash-completion” –</p>
<pre class="">git clone <a href="https://github.com/scop/bash-completion.git">https://github.com/scop/bash-completion.git

cd bash-completion/</pre>
<p><img loading="lazy" class="size-full wp-image-7812 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-2.png" alt="" width="1082" height="224" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-2.png 1082w, https://www.osradar.com/wp-content/uploads/2018/11/bash-2-300x62.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-2-768x159.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-2-1024x212.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-2-1068x221.png 1068w" sizes="(max-width: 1082px) 100vw, 1082px" /></p>
<p>Build the tool –</p>
<pre>autoreconf -i

./configure

make

make check</pre>
<p><img loading="lazy" class="size-full wp-image-7813 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-3.png" alt="" width="1080" height="413" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-3.png 1080w, https://www.osradar.com/wp-content/uploads/2018/11/bash-3-300x115.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-3-768x294.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-3-1024x392.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-3-1068x408.png 1068w" sizes="(max-width: 1080px) 100vw, 1080px" /></p>
<p><img loading="lazy" class="size-full wp-image-7814 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-4.png" alt="" width="1060" height="734" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-4.png 1060w, https://www.osradar.com/wp-content/uploads/2018/11/bash-4-300x208.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-4-768x532.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-4-1024x709.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-4-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2018/11/bash-4-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2018/11/bash-4-607x420.png 607w" sizes="(max-width: 1060px) 100vw, 1060px" /> <img loading="lazy" class="size-full wp-image-7815 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-5.png" alt="" width="1060" height="734" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-5.png 1060w, https://www.osradar.com/wp-content/uploads/2018/11/bash-5-300x208.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-5-768x532.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-5-1024x709.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-5-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2018/11/bash-5-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2018/11/bash-5-607x420.png 607w" sizes="(max-width: 1060px) 100vw, 1060px" /></p>
<p><img loading="lazy" class="size-full wp-image-7816 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-6.png" alt="" width="1060" height="734" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-6.png 1060w, https://www.osradar.com/wp-content/uploads/2018/11/bash-6-300x208.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-6-768x532.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-6-1024x709.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-6-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2018/11/bash-6-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2018/11/bash-6-607x420.png 607w" sizes="(max-width: 1060px) 100vw, 1060px" /> <img loading="lazy" class="size-full wp-image-7817 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-7.png" alt="" width="1060" height="734" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-7.png 1060w, https://www.osradar.com/wp-content/uploads/2018/11/bash-7-300x208.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-7-768x532.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-7-1024x709.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-7-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2018/11/bash-7-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2018/11/bash-7-607x420.png 607w" sizes="(max-width: 1060px) 100vw, 1060px" /></p>
<p>At this stage, you may find out some dependency issue. For passing this stage, “pytest” &gt;= 3.6, pexpect, tcllib and dejagnu.</p>
<p class="">Install “bash-completion” –</p>
<pre class="">sudo make install</pre>
<h1><img loading="lazy" class="size-full wp-image-7818 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-8.png" alt="" width="1060" height="734" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-8.png 1060w, https://www.osradar.com/wp-content/uploads/2018/11/bash-8-300x208.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-8-768x532.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-8-1024x709.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-8-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2018/11/bash-8-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2018/11/bash-8-607x420.png 607w" sizes="(max-width: 1060px) 100vw, 1060px" /> <img loading="lazy" class="size-full wp-image-7819 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-9.png" alt="" width="1060" height="734" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-9.png 1060w, https://www.osradar.com/wp-content/uploads/2018/11/bash-9-300x208.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-9-768x532.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-9-1024x709.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-9-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2018/11/bash-9-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2018/11/bash-9-607x420.png 607w" sizes="(max-width: 1060px) 100vw, 1060px" /></h1>
<h1>Using “bash-completion”</h1>
<p>It’s actually a bash script by itself. Check out the code of “bash-completion” –</p>
<pre class="">bat /etc/profile.d/bash_completion.sh</pre>
<p><figure id="attachment_7820" aria-describedby="caption-attachment-7820" style="width: 1085px" class="wp-caption aligncenter"><img loading="lazy" class="wp-image-7820 size-full" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-10.png" alt="" width="1085" height="549" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-10.png 1085w, https://www.osradar.com/wp-content/uploads/2018/11/bash-10-300x152.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-10-768x389.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-10-1024x518.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-10-1068x540.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/bash-10-830x420.png 830w" sizes="(max-width: 1085px) 100vw, 1085px" /><figcaption id="caption-attachment-7820" class="wp-caption-text">Bat &#8211; a Cat clone https://www.osradar.com/bat-advanced-cat-for-linux/</figcaption></figure></p>
<p>After the installation is complete, it’s time to enjoy auto code completion. Fire up a terminal –</p>
<pre class="">sudo apt i[TAB]

cat /etc/re[TAB]</pre>
<p><img loading="lazy" class="size-full wp-image-7821 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-11.png" alt="" width="1078" height="127" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-11.png 1078w, https://www.osradar.com/wp-content/uploads/2018/11/bash-11-300x35.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-11-768x90.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-11-1024x121.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-11-1068x126.png 1068w" sizes="(max-width: 1078px) 100vw, 1078px" /></p>
<p>You can also set your simple bash completion code. The method follows the following structure –</p>
<pre class="">complete -W ‘&lt;autocompletion_codes&gt;’ &lt;command_name&gt;</pre>
<p>Let’s see with an example.</p>
<pre class="">complete -W ‘google.com osradar.com’ host</pre>
<p><img loading="lazy" class="size-full wp-image-7822 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-12.png" alt="" width="1083" height="128" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-12.png 1083w, https://www.osradar.com/wp-content/uploads/2018/11/bash-12-300x35.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-12-768x91.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-12-1024x121.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-12-1068x126.png 1068w" sizes="(max-width: 1083px) 100vw, 1083px" /></p>
<p>In the above command, there will be 2 different autocomplete suggestions for “host” (google.com and osradar.com).</p>
<p>Type “host” command –</p>
<pre class="">host [TAB]</pre>
<p><img loading="lazy" class="size-full wp-image-7823 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-13.png" alt="" width="1070" height="132" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-13.png 1070w, https://www.osradar.com/wp-content/uploads/2018/11/bash-13-300x37.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-13-768x95.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-13-1024x126.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-13-1068x132.png 1068w" sizes="(max-width: 1070px) 100vw, 1070px" /></p>
<pre class="">host google.com

host osradar.com</pre>
<p><img loading="lazy" class="size-full wp-image-7824 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/bash-14.png" alt="" width="1075" height="419" srcset="https://www.osradar.com/wp-content/uploads/2018/11/bash-14.png 1075w, https://www.osradar.com/wp-content/uploads/2018/11/bash-14-300x117.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/bash-14-768x299.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/bash-14-1024x399.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/bash-14-1068x416.png 1068w" sizes="(max-width: 1075px) 100vw, 1075px" /></p>
<p>Enjoy!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/bash-auto-completion/">Bash Auto Completion</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/bash-auto-completion/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>C Shell – The Programmer’s Shell</title>
		<link>https://www.osradar.com/c-shell-the-programmers-shell/</link>
					<comments>https://www.osradar.com/c-shell-the-programmers-shell/#respond</comments>
		
		<dc:creator><![CDATA[osradar_editor]]></dc:creator>
		<pubDate>Wed, 14 Nov 2018 05:45:48 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bash shell]]></category>
		<category><![CDATA[c shell]]></category>
		<category><![CDATA[shell]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=7299</guid>

					<description><![CDATA[<p>For running the command lines and scripts, there are a number of available shells for the Linux platform. We’ve already talked about ZSH, one of the most popular alternatives for the classic “bash” shell. There are a number of other shells available. Each of them offers a number of different features and facilities. Today, let’s [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/c-shell-the-programmers-shell/">C Shell – The Programmer’s Shell</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>For running the command lines and scripts, there are a number of available shells for the Linux platform. <a href="https://www.osradar.com/switch-to-zsh-on-linux/">We’ve already talked about ZSH</a>, one of the most popular alternatives for the classic “bash” shell. There are a number of other shells available. Each of them offers a number of different features and facilities.</p>
<p>Today, let’s grab and enjoy the C Shell – the shell using the C++ syntax instead of the popular and familiar “bash” syntax. It’s an old shell. However, the shell gets much love from the Unix community, especially the programmers.</p>
<p>For enjoying C Shell, you have to get the Tcsh – a modified version of the original C Shell with new features and enhancements.</p>
<p>Let’s get C Shell right away!</p>
<h1>Installing C Shell (Tcsh)</h1>
<p>C Shell is a very cool shell and a nice alternative to the default Bash shell. However, almost all the Linux distros don’t set C Shell by default. You have to install it and set it as the default shell manually.</p>
<p>Run the following command(s) according to your own Linux distro –</p>
<ul>
<li>Ubuntu</li>
</ul>
<pre class="">sudo apt install tcsh</pre>
<p><img loading="lazy" class="size-full wp-image-7302 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/c-1.png" alt="" width="1080" height="504" srcset="https://www.osradar.com/wp-content/uploads/2018/11/c-1.png 1080w, https://www.osradar.com/wp-content/uploads/2018/11/c-1-300x140.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/c-1-768x358.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/c-1-1024x478.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/c-1-696x325.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/c-1-1068x498.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/c-1-900x420.png 900w" sizes="(max-width: 1080px) 100vw, 1080px" /></p>
<ul>
<li>Debian</li>
</ul>
<pre class="">sudo apt-get install tcsh</pre>
<ul>
<li>Fedora</li>
</ul>
<pre class="">sudo dnf install tcsh</pre>
<ul>
<li>OpenSUSE</li>
</ul>
<pre class="">sudo zypper install tcsh</pre>
<ul>
<li>Arch Linux</li>
</ul>
<pre>sudo pacman -S tcsh</pre>
<ul>
<li>Other Linux distros</li>
</ul>
<p>If your system wasn’t listed above, you have to manually find out the package for your system. The package should be named as “tsch” or “c shell”. Tcsh has been around for quite a long time, so your chance of finding out C Shell is pretty high.</p>
<h1>Listing all the shells</h1>
<p>Before we switch to the new C Shell, we have to know the location of the shell(s). Run the following command –</p>
<pre class="">cat /etc/shells/</pre>
<p><img loading="lazy" class="size-full wp-image-7303 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/c-2.png" alt="" width="1077" height="240" srcset="https://www.osradar.com/wp-content/uploads/2018/11/c-2.png 1077w, https://www.osradar.com/wp-content/uploads/2018/11/c-2-300x67.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/c-2-768x171.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/c-2-1024x228.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/c-2-696x155.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/c-2-1068x238.png 1068w" sizes="(max-width: 1077px) 100vw, 1077px" /></p>
<p>In most cases, you’ll get more than one available shells in your system. Run the following command for the “tcsh” only.</p>
<pre class="">cat /etc/shells | grep tcsh</pre>
<p><img loading="lazy" class="size-full wp-image-7304 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/c-3.png" alt="" width="1072" height="139" srcset="https://www.osradar.com/wp-content/uploads/2018/11/c-3.png 1072w, https://www.osradar.com/wp-content/uploads/2018/11/c-3-300x39.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/c-3-768x100.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/c-3-1024x133.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/c-3-696x90.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/c-3-1068x138.png 1068w" sizes="(max-width: 1072px) 100vw, 1072px" /></p>
<p>It’s time to shift towards Tcsh.</p>
<pre class="">chsh</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img loading="lazy" class="size-full wp-image-7306 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/c-4.png" alt="" width="1072" height="203" srcset="https://www.osradar.com/wp-content/uploads/2018/11/c-4.png 1072w, https://www.osradar.com/wp-content/uploads/2018/11/c-4-300x57.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/c-4-768x145.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/c-4-1024x194.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/c-4-696x132.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/c-4-1068x202.png 1068w" sizes="(max-width: 1072px) 100vw, 1072px" /></p>
<p>Now, when asked about “Login shell”, enter “/bin/tcsh” (without quotes).</p>
<p><img loading="lazy" class="size-full wp-image-7300 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/c-5.png" alt="" width="1082" height="393" srcset="https://www.osradar.com/wp-content/uploads/2018/11/c-5.png 1082w, https://www.osradar.com/wp-content/uploads/2018/11/c-5-300x109.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/c-5-768x279.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/c-5-1024x372.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/c-5-696x253.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/c-5-1068x388.png 1068w" sizes="(max-width: 1082px) 100vw, 1082px" /></p>
<p>Voila! C Shell is your default shell now!</p>
<h1>Reverting back to Bash</h1>
<p>Not interested in C Shell anymore? Run the following command for reverting back to Bash –</p>
<pre>chsh</pre>
<p>&nbsp;</p>
<p>Enter the value –</p>
<pre class="">/bin/bash</pre>
<p><img loading="lazy" class="size-full wp-image-7301 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/c-6.png" alt="" width="1078" height="241" srcset="https://www.osradar.com/wp-content/uploads/2018/11/c-6.png 1078w, https://www.osradar.com/wp-content/uploads/2018/11/c-6-300x67.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/c-6-768x172.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/c-6-1024x229.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/c-6-696x156.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/c-6-1068x239.png 1068w" sizes="(max-width: 1078px) 100vw, 1078px" /></p>
<p>Voila! Bash is back!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/c-shell-the-programmers-shell/">C Shell – The Programmer’s Shell</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/c-shell-the-programmers-shell/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Switch to ZSH on Linux</title>
		<link>https://www.osradar.com/switch-to-zsh-on-linux/</link>
					<comments>https://www.osradar.com/switch-to-zsh-on-linux/#respond</comments>
		
		<dc:creator><![CDATA[osradar_editor]]></dc:creator>
		<pubDate>Sun, 24 Jun 2018 07:12:06 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[how to install zsh]]></category>
		<category><![CDATA[setup zsh]]></category>
		<category><![CDATA[zsh]]></category>
		<category><![CDATA[zsh linux]]></category>
		<category><![CDATA[zsh ubuntu]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=4382</guid>

					<description><![CDATA[<p>If you’re a Linux user, since the very beginning, you’re familiar with the terminal. It’s the ultimate tool that can perform almost any task. Advanced users are very much fond of this tool. Terminal uses Bash shell by default. It’s enough for average users but lacks a few features. Bash isn’t a modern shell anymore. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/switch-to-zsh-on-linux/">Switch to ZSH on Linux</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you’re a Linux user, since the very beginning, you’re familiar with the terminal. It’s the ultimate tool that can perform almost any task. Advanced users are very much fond of this tool. Terminal uses Bash shell by default. It’s enough for average users but lacks a few features. Bash isn’t a modern shell anymore. A good and popular alternative is the Z shell, aka ZSH. It features major improvements above Bash.</p>
<p>Let’s switch from Bash to ZSH.</p>
<h2>Installing ZSH</h2>
<p>ZSH is one of the most popular alternatives to the Bash shell. That’s why it’s available in almost all the Linux distro repositories. You shouldn’t have any problem getting it into your system. Run the following command(s) according to your system.</p>
<ul>
<li>Ubuntu</li>
</ul>
<pre>sudo apt install zsh -y</pre>
<p><img loading="lazy" class="size-full wp-image-4388 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/06/install-zsh-ubuntu.png" alt="" width="1218" height="513" srcset="https://www.osradar.com/wp-content/uploads/2018/06/install-zsh-ubuntu.png 1218w, https://www.osradar.com/wp-content/uploads/2018/06/install-zsh-ubuntu-300x126.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/install-zsh-ubuntu-768x323.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/install-zsh-ubuntu-1024x431.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/install-zsh-ubuntu-696x293.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/install-zsh-ubuntu-1068x450.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/install-zsh-ubuntu-997x420.png 997w" sizes="(max-width: 1218px) 100vw, 1218px" /></p>
<ul>
<li>Debian</li>
</ul>
<pre>sudo apt-get install zsh -y</pre>
<ul>
<li>Fedora</li>
</ul>
<pre>sudo dnf install zsh</pre>
<ul>
<li>OpenSUSE</li>
</ul>
<pre>sudo zypper install zsh</pre>
<ul>
<li>Arch Linux</li>
</ul>
<p>Arch Linux uses ZSH by default. However, run the program for making sure that it does, in case you switched to Bash.</p>
<pre>sudo pacman -S zsh</pre>
<ul>
<li>Other Linux distros</li>
</ul>
<p>For other distros, you have to have &#8220;ncurses-devel&#8221; and &#8220;g++&#8221; installed in your system. Find those out for your Linux distro and install those.</p>
<p>Then, <a href="https://sourceforge.net/projects/zsh/files/">download the latest ZSH archive from SourceForge</a>.</p>
<p><img loading="lazy" class="size-full wp-image-4385 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/06/zsh-download-sourceforge.jpg" alt="" width="1021" height="384" srcset="https://www.osradar.com/wp-content/uploads/2018/06/zsh-download-sourceforge.jpg 1021w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-download-sourceforge-300x113.jpg 300w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-download-sourceforge-768x289.jpg 768w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-download-sourceforge-696x262.jpg 696w" sizes="(max-width: 1021px) 100vw, 1021px" /></p>
<p>Now, run the following commands:</p>
<pre># Running all the commands as sudo
sudo -s

cd ~/Downloads
tar -vxzf zsh-5.5.1.tar.gz
cd zsh-5.5.1

./configure
make
make check
make install</pre>
<h2>Configuring ZSH</h2>
<p>Now, let’s start configuring ZSH. At first, run the program from the terminal to open up the configuration wizard.</p>
<pre>zsh</pre>
<p><img loading="lazy" class="size-full wp-image-4389 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/06/zsh-1.png" alt="" width="1218" height="452" srcset="https://www.osradar.com/wp-content/uploads/2018/06/zsh-1.png 1218w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-1-300x111.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-1-768x285.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-1-1024x380.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-1-696x258.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-1-1068x396.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-1-1132x420.png 1132w" sizes="(max-width: 1218px) 100vw, 1218px" /></p>
<p>From the opened up window, press 1.</p>
<p><img loading="lazy" class="size-full wp-image-4390 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/06/zsh-2.png" alt="" width="1221" height="399" srcset="https://www.osradar.com/wp-content/uploads/2018/06/zsh-2.png 1221w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-2-300x98.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-2-768x251.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-2-1024x335.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-2-696x227.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-2-1068x349.png 1068w" sizes="(max-width: 1221px) 100vw, 1221px" /></p>
<p>&nbsp;</p>
<p>There are more options to choose from. As we’re configuring the shell completely new, hit 1 again.</p>
<p><img loading="lazy" class="size-full wp-image-4391 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/06/zsh-3.png" alt="" width="1221" height="322" srcset="https://www.osradar.com/wp-content/uploads/2018/06/zsh-3.png 1221w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-3-300x79.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-3-768x203.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-3-1024x270.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-3-696x184.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-3-1068x282.png 1068w" sizes="(max-width: 1221px) 100vw, 1221px" /></p>
<p>From here, press 1 for setting the line-size of history, press 2 for creating the new history file and press 3 for customizing the number of lines to save.</p>
<p><img loading="lazy" class="size-full wp-image-4392 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-1.png" alt="" width="1222" height="391" srcset="https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-1.png 1222w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-1-300x96.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-1-768x246.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-1-1024x328.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-1-696x223.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-1-1068x342.png 1068w" sizes="(max-width: 1222px) 100vw, 1222px" /></p>
<p><img loading="lazy" class="alignnone size-full wp-image-4393" src="https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-2.png" alt="" width="1219" height="437" srcset="https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-2.png 1219w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-2-300x108.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-2-768x275.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-2-1024x367.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-2-696x250.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-2-1068x383.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-2-1172x420.png 1172w" sizes="(max-width: 1219px) 100vw, 1219px" /></p>
<p><img loading="lazy" class="size-full wp-image-4394 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-3.png" alt="" width="1219" height="382" srcset="https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-3.png 1219w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-3-300x94.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-3-768x241.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-3-1024x321.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-3-696x218.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-4-3-1068x335.png 1068w" sizes="(max-width: 1219px) 100vw, 1219px" /></p>
<p>Then, press “q” to return back to the main menu.</p>
<p><img loading="lazy" class="size-full wp-image-4395 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/06/zsh-5.png" alt="" width="1217" height="381" srcset="https://www.osradar.com/wp-content/uploads/2018/06/zsh-5.png 1217w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-5-300x94.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-5-768x240.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-5-1024x321.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-5-696x218.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-5-1068x334.png 1068w" sizes="(max-width: 1217px) 100vw, 1217px" /></p>
<p>Press 2 for setting up the auto-complete system. From there, press 1.</p>
<p><img loading="lazy" class="size-full wp-image-4396 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/06/zsh-6.png" alt="" width="1217" height="377" srcset="https://www.osradar.com/wp-content/uploads/2018/06/zsh-6.png 1217w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-6-300x93.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-6-768x238.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-6-1024x317.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-6-696x216.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-6-1068x331.png 1068w" sizes="(max-width: 1217px) 100vw, 1217px" /></p>
<p>Now, everything is about to complete. If you’re an advanced user, you can surf through the options and make more changes as you like. After everything is complete, press 0 for saving the changes and exiting the shell.</p>
<p><img loading="lazy" class="size-full wp-image-4397 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/06/zsh-7.png" alt="" width="1217" height="316" /></p>
<h2>Changing default shell</h2>
<p>Now, ZSH is ready to use. However, it isn’t the default shell solution that terminal will load every time. For solving the issue, run the following commands:</p>
<pre>sudo -s
which zsh
chsh -s /usr/bin/zsh</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Now, reboot your system.</p>
<p>Voila! Your system is running ZSH. For having more customizability with your ZSH shell, you should <a href="https://ohmyz.sh/">install Oh My ZSH</a>. It&#8217;s a lightweight and powerful tool for customizing ZSH. <a href="https://github.com/robbyrussell/oh-my-zsh/#using-oh-my-zsh">Here is all the usage of the tool</a>.</p>
<p><img loading="lazy" class="size-full wp-image-4399 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/06/zsh-9.png" alt="" width="1222" height="559" srcset="https://www.osradar.com/wp-content/uploads/2018/06/zsh-9.png 1222w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-9-300x137.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-9-768x351.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-9-1024x468.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-9-696x318.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-9-1068x489.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/zsh-9-918x420.png 918w" sizes="(max-width: 1222px) 100vw, 1222px" /></p>
<p>You can even <a href="https://www.osradar.com/show-asterisks-visible-linux-terminal/">show asterisks when you type the password for &#8220;sudo&#8221;</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/switch-to-zsh-on-linux/">Switch to ZSH on Linux</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/switch-to-zsh-on-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
