<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Angel Onyebuchi</title>
    <description>The latest articles on DEV Community by Angel Onyebuchi (@angelifechukwu).</description>
    <link>https://dev.to/angelifechukwu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F625634%2F81838d23-77fb-4545-a7c2-3cb2d0787a35.jpeg</url>
      <title>DEV Community: Angel Onyebuchi</title>
      <link>https://dev.to/angelifechukwu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/angelifechukwu"/>
    <language>en</language>
    <item>
      <title>How to Secure Kubernetes Workloads with Network Policies using Civo and Cilium</title>
      <dc:creator>Angel Onyebuchi</dc:creator>
      <pubDate>Mon, 18 Dec 2023 12:25:32 +0000</pubDate>
      <link>https://dev.to/angelifechukwu/how-to-secure-kubernetes-workloads-with-network-policies-using-civo-and-cilium-3k9b</link>
      <guid>https://dev.to/angelifechukwu/how-to-secure-kubernetes-workloads-with-network-policies-using-civo-and-cilium-3k9b</guid>
      <description>&lt;p&gt;Deploying and managing containerized applications at scale requires a secure environment that is vital throughout the container lifecycle due to the runtime’s constant change, which affects both the apps and the APIs that connect them to other applications and services.&lt;/p&gt;

&lt;p&gt;Want to tighten security for your Kubernetes cluster and applications? This article shows how Civo and Cilium work together to secure your workloads with network policies.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Civo?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.civo.com/"&gt;Civo&lt;/a&gt; is a cloud computing company that provides a developer-focused platform for deploying, managing, and scaling Kubernetes clusters and other cloud-based services. It offers a simplified approach to Kubernetes deployment, aiming to streamline the process for developers and businesses.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Cilium?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://cilium.io/"&gt;Cilium&lt;/a&gt; is an open-source software project designed to provide networking, observability, and security solutions in modern containerized environments, specifically within Kubernetes clusters. It acts as a CNI (Container Network Interface) plugin, serving as a powerful networking and security middleware connecting the application layer and the underlying network infrastructure. &lt;/p&gt;

&lt;h2&gt;
  
  
  What are Kubernetes Network Policies?
&lt;/h2&gt;

&lt;p&gt;Imagine your Kubernetes cluster as a bustling city. Pods are like buildings, and network policies are like traffic rules on the streets.&lt;/p&gt;

&lt;p&gt;These rules control:&lt;/p&gt;

&lt;p&gt;Who can go where: You can allow some pods to visit certain "buildings" (services or other pods) while restricting others.&lt;br&gt;
What they can do there: You can define what kind of interactions pods can have, like reading data from a database or sending messages to another pod.&lt;br&gt;
How they can travel: You can specify which "streets" they can use (protocols, ports).&lt;/p&gt;

&lt;p&gt;Kubernetes network policies define how pods can communicate securely with each other and various network services and control incoming and outgoing network traffic to and from the cluster.&lt;/p&gt;
&lt;h2&gt;
  
  
  How would Civo and Cilium work?
&lt;/h2&gt;

&lt;p&gt;Cilium and Civo work together to provide a comprehensive and efficient way to secure your Kubernetes workloads with network policies. Civo simplifies deployment and management, while Cilium offers powerful enforcement and advanced security features. With both working in in sync, you can ensure your Kubernetes clusters and applications are well-protected.&lt;/p&gt;
&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;A Civo account. You can create  one &lt;a href="https://dashboard.civo.com/signup"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A Civo CLI. You can install and set up using this &lt;a href="https://www.civo.com/docs/overview/civo-cli"&gt;guide.&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How to deploy and configure a Kubernetes Network Policy Controller like Cilium using Civo
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Step 1: Setting up a Civo Kubernetes cluster
&lt;/h3&gt;

&lt;p&gt;To get started, ensure you have a running Civo Kubernetes cluster. You can create one using the Civo CLI or the Civo web interface. Ensure that your kubectl is configured properly to connect with your Civo Kubernetes cluster. &lt;/p&gt;
&lt;h3&gt;
  
  
  Step 2: Install Cilium on your Civo Kubernetes cluster
&lt;/h3&gt;

&lt;p&gt;a. Authenticate the Civo CLI with your API token using the following command:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;            civo apikey save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;You will be asked to give a name to your API key and also input your API key to be saved. &lt;/p&gt;

&lt;p&gt;b. Use the Civo CLI or web console to start creating a new Kubernetes cluster&lt;/p&gt;

&lt;p&gt;c. Go to the "Advanced options" during cluster configuration&lt;/p&gt;

&lt;p&gt;d. Under "Networking", select "Cilium" from the CNI dropdown menu&lt;/p&gt;

&lt;p&gt;e. Complete the other cluster details as per your requirements&lt;/p&gt;

&lt;p&gt;f. Launch the cluster&lt;/p&gt;

&lt;p&gt;This will automatically deploy Cilium as the CNI for networking and NetworkPolicy enforcement in the new cluster.&lt;/p&gt;

&lt;p&gt;The manual installation steps using Helm will only be required if you already have an existing cluster running a different CNI, and want to transition to Cilium subsequently.&lt;/p&gt;

&lt;p&gt;But for new clusters, choosing the Cilium CNI during creation is simpler and avoids the need to manually install it afterwards.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3: Verify Cilium Installation
&lt;/h3&gt;

&lt;p&gt;Once the installation is completed, to make sure Cilium is running properly, run this:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -n kube-system -l k8s-app=cilium
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;The output should be like this:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     NAME           READY   STATUS    RESTARTS   AGE
     cilium-   1/1     Running   0          3h
     cilium-mhdb2   1/1     Running   0          3h
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;This indicates two Cilium pods are running, named "cilium-fs8hx" and "cilium-mhdb2". Both have a ready status of 1/1 meaning they are healthy and have restarted 0 times.&lt;/p&gt;

&lt;p&gt;Ensure that all Cilium pods are in their "Running" state. Check also to see if the Cilium nodes are running too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;            kubectl get nodes --selector='!node-role.kubernetes.io/master'
            \
            --output=jsonpath={.items[*].status.conditions[?\(@.type==
            \"Ready\"\)].status}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The expected output would be a list of "True" or "False" values, one for each node's Ready condition status.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     True False True True
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This indicates there are 4 nodes, with the first, third and fourth nodes being Ready (True), and the second node not Ready (False).&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Configure Network Policies
&lt;/h3&gt;

&lt;p&gt;To enforce network security regulations, Cilium uses the Kubernetes &lt;a href="https://docs.cilium.io/en/stable/security/policy/#network-policy"&gt;NetworkPolicy&lt;/a&gt; API. To manage traffic between pods, you can define your NetworkPolicies using the “&lt;strong&gt;labels&lt;/strong&gt;” or “&lt;strong&gt;annotations&lt;/strong&gt;”  field in the metadata section. &lt;/p&gt;

&lt;p&gt;Here is an example of a NetworkPolicy manifest that only permits communication between pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: frontend-to-backend
spec:
  podSelector:
    matchLabels:
      app: frontend
  policyTypes:
  - Ingress
  ingress:
  - from:
    - podSelector:
        matchLabels:
          app: backend
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where the key parts are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The podSelector to select pods with label &lt;strong&gt;app: frontend&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;The ingress rule allowing ingress traffic from pods with label &lt;strong&gt;app: backend&lt;/strong&gt;
This will match all pods with the label &lt;strong&gt;app: frontend&lt;/strong&gt; and only allow them to receive traffic from pods labelled &lt;strong&gt;app: backend&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Apply the above manifest to the cluster by saving it to a file (such as &lt;strong&gt;civo-user-provider. yaml&lt;/strong&gt;):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kubectl apply -f civo-user-provider. yaml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can create additional NetworkPolicies to suit your requirements.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Verify network policies
&lt;/h3&gt;

&lt;p&gt;You can test the network connectivity across pods to make sure that NetworkPolicies are being enforced by Cilium.&lt;/p&gt;

&lt;p&gt;For instance, you can attempt accessing a service running in the backend pod from the frontend pod, if you have a frontend and a backend pod. If the NetworkPolicy is set up properly, access ought to be permitted.  if otherwise, the connection will be terminated. &lt;/p&gt;

&lt;p&gt;Below are the frontend and backend of a simple web application created with Node.js and Express.js, implementing a simple frontend app on port 4000 that requests the backend API on port 3000.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Frontend(Client-side)
const express = require('express');
const axios = require('axios');

const app = express();

app.get('/', async (req, res) =&amp;gt; {
  try {
    const response = await axios.get('http://localhost:3000/api');
    res.json(response.data);  
  } catch (error) {
    console.error(error);
    res.status(500).send('Error connecting to backend');
  }
});

app.listen(4000, () =&amp;gt; {
  console.log('Frontend server listening on port 4000');
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Backend (Server-side)

const express = require('express');

const app = express();

app.get('/api', (req, res) =&amp;gt; {
  res.json({message: 'Hello from backend!'});
});

app.listen(3000, () =&amp;gt; {
  console.log('Backend server listening on port 3000');  
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without a controller to use it, creating a NetworkPolicy resource has no impact. For comprehensive instructions on implementing and setting network policies in your specific environment, it is necessary to refer to the documentation and guidelines supplied by your network plugin provider.&lt;/p&gt;

&lt;p&gt;Don't forget to modify these network policies to match your unique security needs and your Kubernetes cluster's design. Ensure your Kubernetes cluster can enforce network policies and is configured to do so.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Keep in mind that applying network policies to secure Kubernetes workloads is a continuous process. To respond to emerging threats and preserve the security of your cluster and applications, you must constantly evaluate and adjust your policies.&lt;/p&gt;

&lt;p&gt;Aside from this, you can explore additional features on Cilium, like load balancing, observability, and network security, beyond what is covered in this basic guide. Refer to the Cilium documentation to learn more about these features and how to configure them. &lt;a href="https://docs.cilium.io/en/stable/"&gt;Check here&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Maximizing Your Server's Potential: How to Deploy a LAMP Stack on Debian 11</title>
      <dc:creator>Angel Onyebuchi</dc:creator>
      <pubDate>Sun, 17 Dec 2023 01:55:20 +0000</pubDate>
      <link>https://dev.to/angelifechukwu/maximizing-your-servers-potential-how-to-deploy-a-lamp-stack-on-debian-11-51oa</link>
      <guid>https://dev.to/angelifechukwu/maximizing-your-servers-potential-how-to-deploy-a-lamp-stack-on-debian-11-51oa</guid>
      <description>&lt;p&gt;When building custom web apps, developers need an operating system, a web server, database management software and a programming language to create and deliver web apps and deploy and host existing applications.&lt;/p&gt;

&lt;p&gt;Made of 4 different Open- source software technologies, The &lt;strong&gt;LAMP&lt;/strong&gt; stack consists of Linux, as the operating system, Apache, as the web server, MySQL as the database management system, and PHP/Pearl as the programming language which is used for Server-side/Backend development&lt;/p&gt;

&lt;p&gt;Because the LAMP stack possesses flexibility, scalability, security, and ease of use, it became a popular, reliable and affordable option for developers to host content and handle a large amount of traffic and Data.&lt;/p&gt;

&lt;p&gt;Debian is renowned for its extensive testing processes and lengthy release cycles, which guarantee the stability and bug-free operation of the system. This is highly vital for server installations, which must operate continuously and without interruption.&lt;/p&gt;

&lt;p&gt;It also has an efficient package management system that makes it simple to install, update, and manage software packages, including the LAMP stack's constituent parts. For developers and system administrators who must maintain the server, this saves time and effort.&lt;/p&gt;

&lt;p&gt;In this tutorial, you will learn the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What is a LAMP stack is* Benefits of using LAMP stack&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to deploy a LAMP stack to a Debian&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Git, Apache, Wget, Curl&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Php 8.0 and its dependencies&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mysql/MariaDB Database&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Composer&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Debian 11 Server aka (Bullseye). Install here&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installing LAMP
&lt;/h2&gt;

&lt;p&gt;To install the LAMP stack, you must have root access to your server or create a user with root access with the su command.  Next, you need a domain pointed to your server IP to install the SSL certificate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1 - Updating and Upgrading Package Installer
&lt;/h2&gt;

&lt;p&gt;Before installing any new software on your system, ensure you start by updating and upgrading to the latest versions and security patches available with the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt update sudo apt upgrade&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 - Install the wget package
&lt;/h2&gt;

&lt;p&gt;The wget command downloads and retries files and content from various web servers.&lt;/p&gt;

&lt;p&gt;Download the wget command using this command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt install wget&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 - Install Apache and other packages
&lt;/h2&gt;

&lt;p&gt;Install Apache and other dependencies using the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt install -y apache2 apache2-utils&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Note: The&lt;/em&gt; &lt;strong&gt;&lt;em&gt;-y&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;is to answer yes to all the prompts.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4 - Setup Firewall
&lt;/h2&gt;

&lt;p&gt;Uncomplicated Firewall (UFW) is a tool that helps to protect your computer or server from unwanted network traffic by managing the firewall rules. You can install and enable your firewall settings here.&lt;/p&gt;

&lt;p&gt;You can modify your firewall settings using the app profiles that UFW ships with on Debian 11. Here are some steps to set up and adjust your &lt;code&gt;ufw&lt;/code&gt; for your Debian 11 server:&lt;/p&gt;

&lt;p&gt;Run the following command to view all application profiles:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo ufw app list&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You will see the list of available application profiles&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Output
      Available applications:
      Apache
      Apache Full
      Apache Secure
      OpenSSH
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;By default, all incoming traffic is automatically blocked by UFW, but all outgoing traffic is permitted. Use the next command to verify the default policies.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo ufw default deny incoming&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo ufw default allow outgoing&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configure the firewall rules&lt;br&gt;
Add rules for specific ports, services, or IP addresses to configure the firewall rules. For example, to allow incoming traffic on port 80 (HTTP), use                             the following command:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;sudo ufw allow 80/tcp&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5 - Check status to see if Apache is running
&lt;/h2&gt;

&lt;p&gt;After installation, Apache starts up instantly and is running.  Run the following command to verify the Apache service's status:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo systemctl status apache2&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If Apache is running, the output would be like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     ● apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor 
   preset: enabled)
   Drop-In: /lib/systemd/system/apache2.service.d
            └─apache2-systemd.conf
    Active: active (running) since Tue 2022-02-02 10:29:51 UTC; 5min ago
    Main PID: 10617 (apache2)
     Tasks: 55 (limit: 667)
    CGroup: /system.slice/apache2.service
            ├─10617 /usr/sbin/apache2 -k start
            ├─10619 /usr/sbin/apache2 -k start
            └─10620 /usr/sbin/apache2 -k start
 Feb 02 10:29:51 apache systemd[1]: Starting The Apache HTTP Server…
 Feb 02 10:29:51 apache systemd[1]: Started The Apache HTTP Server.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 6 - Install MySQL
&lt;/h2&gt;

&lt;p&gt;The installation of the database system is necessary in order to store and manage data for your website. To install MySQL, run:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, install the release package:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt install ./mysql-apt-config_0.8.22-1_all.deb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      sudo apt update
      sudo apt install mysql-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the successful installation of MySQL, start the MySQL service:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo systemctl start mysql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Run mysql_secure_installation to set root password and secure the installation: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo mysql_secure_installation&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Log in to MySQL shell as root:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo mysql -u root -p&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a database and user, set permissions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE DATABASE mydb;
CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'localhost';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart MySQl to ensure its running:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo systemctl restart mysql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This should be your output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-02-02 06:12:30 UTC; 17s ago
       Docs: man:mysqld(8)
             http://dev.mysql.com/doc/refman/en/using-systemd.html
   Main PID: 101929 (mysqld)
     Status: "Server is operational"
      Tasks: 38 (limit: 1148)
     Memory: 369.3M
        CPU: 805ms
     CGroup: /system.slice/mysql.service
             └─101929 /usr/sbin/mysqld

Feb 02 06:12:29 demo systemd[1]: Starting MySQL Community Server...
Feb 02 06:12:30 demo systemd[1]: Started MySQL Community Server.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 7 - Install PHP
&lt;/h2&gt;

&lt;p&gt;Update package index and install PHP packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt install php libapache2-mod-php php-mysql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify the PHP version you installed:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;php -v&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Restart Apache web server to load PHP:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo systemctl restart apache2&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 8 - Verify the PHP test page process on your web server :
&lt;/h2&gt;

&lt;p&gt;Create a new file named "info.php" and add it under the custom web root folder, "/var/www/html" using nano:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nano info.php&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Open the file and add the text below, inside the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;?php
phpinfo();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save the file and exit.&lt;/p&gt;

&lt;p&gt;You can access the test page using your domain name or server-ip address, followed by the script name "info.php":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    http://your_domain/info.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             OR
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      http://server_ip/info.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 9 - Restart Apache after making changes.
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;sudo systemctl restart apache2&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Your LAMP stack is now fully deployed on Debian 11.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The open-source nature, maturity, flexibility, performance and cost-efficiency of LAMP make it a reliable choice for hosting web applications.&lt;/p&gt;

&lt;p&gt;This guide has equipped you to host PHP websites and apps by implementing a scalable Apache-MySQL platform. Apache serves as the web server while MySQL manages the database system. Together they provide a flexible LAMP stack foundation to build and serve dynamic PHP-powered applications that can deliver customized content to visitors.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Set Up a Linux OS (Ubuntu) on Windows using VirtualBox and Vagrant</title>
      <dc:creator>Angel Onyebuchi</dc:creator>
      <pubDate>Tue, 21 Mar 2023 00:54:33 +0000</pubDate>
      <link>https://dev.to/everythingdevops/how-to-set-up-a-linux-os-ubuntu-on-windows-using-virtualbox-and-vagrant-5996</link>
      <guid>https://dev.to/everythingdevops/how-to-set-up-a-linux-os-ubuntu-on-windows-using-virtualbox-and-vagrant-5996</guid>
      <description>&lt;p&gt;Ubuntu is a popular Linux distribution that offers users a wide range of features and applications. Ubuntu is a great choice for those new to Linux who want to explore its capabilities. However, it can be difficult to set up and configure on a Windows desktop. &lt;/p&gt;

&lt;p&gt;Fortunately, there is a way to get Ubuntu up and running quickly and easily with VirtualBox and Vagrant. This tutorial will guide you through setting up Ubuntu with VirtualBox and Vagrant on a Windows desktop, creating a secure and isolated virtual environment for testing and experimenting.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Vagrant?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.vagrantup.com/"&gt;Vagrant&lt;/a&gt; is an open-source software for building and managing virtual machine environments in a single workflow. With Vagrant, you can define a configuration file that specifies the details of the virtual machine you want to create and then use a single command to create and configure the virtual machine. This makes it easy to set up and maintain a consistent development environment across multiple machines and to share that environment with others.&lt;/p&gt;

&lt;p&gt;Vagrant works with various virtualization software, including VirtualBox, VMware, and Hyper-V, and can manage both Linux and Windows virtual machines.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is VirtualBox?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.virtualbox.org/"&gt;VirtualBox&lt;/a&gt; is a free, open-source virtualization software platform developed by Oracle that allows you to run multiple operating systems on a single physical machine. With VirtualBox, you can create and run virtual machines (VMs) on your computer, each of which runs a separate operating system and can be configured with its virtual hardware.&lt;/p&gt;

&lt;p&gt;VirtualBox is designed to be easy to use, with a simple graphical user interface (GUI) that allows you to create and manage virtual machines. It supports a wide range of operating systems, including Windows, Linux, macOS, and many others, and can be used for various purposes, such as testing software, running legacy applications, and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  How would Vagrant and VirtualBox work?
&lt;/h2&gt;

&lt;p&gt;When you use Vagrant with VirtualBox, Vagrant creates and manages virtual machines in the VirtualBox environment. You define the operating system type, the amount of memory, and other resources the virtual machine should have in the Vagrant configuration file. Vagrant then uses this configuration to create and configure the virtual machine in VirtualBox.&lt;/p&gt;

&lt;p&gt;Once the virtual machine is up and running, you can use Vagrant to manage it by &lt;a href="https://www.ssh.com/academy/ssh"&gt;SSHing&lt;/a&gt; into it or running provisioning scripts to set up the environment. &lt;/p&gt;

&lt;h1&gt;
  
  
  Prerequisite
&lt;/h1&gt;

&lt;p&gt;To follow along with this article, you need to have the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A computer with 

&lt;ul&gt;
&lt;li&gt;at least 8 GB RAM &lt;/li&gt;
&lt;li&gt;Windows 10 x64-bit operating system (OS) &lt;/li&gt;
&lt;li&gt;A modern multi-core Intel/AMD CPU&lt;/li&gt;
&lt;li&gt;Virtualization is enabled &lt;em&gt;in its BIOS&lt;/em&gt; settings. Find out how to &lt;a href="https://www.sony-asia.com/electronics/support/articles/S500016173"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Have a basic knowledge of  &lt;a href="https://apps.microsoft.com/store/detail/powershell/9MZ1SNWT0N5D?hl=en-ng&amp;amp;gl=ng"&gt;Powershell&lt;/a&gt; or &lt;a href="https://gitforwindows.org/"&gt;Gitbash&lt;/a&gt;.
&lt;h2&gt;
  
  
  Installing VirtualBox&lt;/h2&gt;
&lt;/li&gt;



&lt;/ul&gt;

&lt;p&gt;To install VirtualBox, you will need to follow these steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Visit the VirtualBox website using this &lt;a href="https://www.virtualbox.org/"&gt;link&lt;/a&gt;, and you will see a page similar to the one below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--106-TaNO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1668818921446_Virtualbox.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--106-TaNO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1668818921446_Virtualbox.png" alt="" width="800" height="339"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Click on “&lt;strong&gt;Download VirtualBox&lt;/strong&gt;” and then on Windows hosts to download VirtualBox and its extension pack.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4r7JNK80--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1668820341056_Box%2B2%2Bedited.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4r7JNK80--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1668820341056_Box%2B2%2Bedited.png" alt="" width="800" height="283"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; After downloading it,  click on the “&lt;strong&gt;New&lt;/strong&gt;” icon in the top right-hand corner to create a new virtual machine. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MjhoYf8K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1673055823119_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MjhoYf8K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1673055823119_image.png" alt="" width="800" height="514"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You would see a prompt like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0MkewLba--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1668821589916_Annotation%2B2022-09-15%2B020655.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0MkewLba--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1668821589916_Annotation%2B2022-09-15%2B020655.png" alt="" width="412" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Name the new machine you want to create and choose the type and version that suits your taste. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--guokkYKC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1668822156938_step%2B3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--guokkYKC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1668822156938_step%2B3.png" alt="" width="410" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Click next and assign the memory size you want to allocate to the virtual machine using the up and down arrow keys.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lR4cbneP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1668822777512_step%2B4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lR4cbneP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1668822777512_step%2B4.png" alt="" width="410" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Click Next, select “Create a virtual hard disk now”, and create.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q_w1odGT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1668896899834_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q_w1odGT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1668896899834_image.png" alt="" width="410" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Choose the hard disk file type (using the default setting is recommended except there are other preferences).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gaCj5pMw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1669029744634_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gaCj5pMw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1669029744634_image.png" alt="" width="428" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; Next is to allocate storage space for your hard disk. Choose if you want a flexible or fixed space.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mFD3_Mod--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1669030062425_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mFD3_Mod--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1669030062425_image.png" alt="" width="428" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 9:&lt;/strong&gt; Choose the file location and size and create.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zeDvspHP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1669030385817_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zeDvspHP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1669030385817_image.png" alt="" width="428" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 10&lt;/strong&gt;: Click &lt;strong&gt;C&lt;/strong&gt;&lt;strong&gt;reate&lt;/strong&gt;&lt;strong&gt;,&lt;/strong&gt; and you’ve successfully set up your virtual machine…&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Installing Vagrant&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To install Vagrant using a graphical user interface (GUI), you will need to download the Vagrant installer from the Vagrant website and then run it. Here are the steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Go to the Vagrant download page at &lt;a href="https://www.vagrantup.com/downloads.html"&gt;https://www.vagrantup.com/downloads.html&lt;/a&gt;, and under the "Operating System" heading, click on the appropriate “Binary” for your computer. The installer will be downloaded to your computer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y2WzO5Vu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_5DE95FD98FD0B780A74FF64FC1C345D98C98860B3B683916DA26C2627A3A521D_1673554631523_Screenshot%2B2023-01-12%2Bat%2B21.17.08.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y2WzO5Vu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_5DE95FD98FD0B780A74FF64FC1C345D98C98860B3B683916DA26C2627A3A521D_1673554631523_Screenshot%2B2023-01-12%2Bat%2B21.17.08.png" alt="" width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: Locate the installer file on your computer and double-click it to start the installation process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sf-M_87b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1673056675610_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sf-M_87b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1673056675610_image.png" alt="" width="676" height="593"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Follow the prompts in the installer to complete the installation.&lt;br&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt; Once the installation is complete, you can start using Vagrant by opening a terminal or command prompt and typing &lt;code&gt;vagrant&lt;/code&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Setting up the machine
&lt;/h1&gt;

&lt;p&gt;After downloading Vagrant, to confirm that it was successfully installed, open the terminal/cmd of your choice and head to the home directory using the &lt;code&gt;$ c&lt;/code&gt;&lt;code&gt;d ~&lt;/code&gt; as in the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WsLbJNEr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664370079085_image%2B1%2B2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WsLbJNEr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664370079085_image%2B1%2B2.png" alt="" width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: &lt;code&gt;~&lt;/code&gt; is used to move into the home directory in the command line.&lt;/p&gt;

&lt;p&gt;List out the files in that directory using the &lt;code&gt;ls&lt;/code&gt; command to check if Vagrant was successfully installed.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LWtJgKFT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1673057101857_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LWtJgKFT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1673057101857_image.png" alt="" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After confirming the installation, create a directory for the Ubuntu setup using the &lt;code&gt;mkdir&lt;/code&gt; command below.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mkdir Ubuntu_20.04
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gKXsKn39--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664374222904_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gKXsKn39--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664374222904_image.png" alt="" width="800" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Change into the directory that you created using the following command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd Ubuntu_20.04
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qyRZVwri--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664386246017_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qyRZVwri--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664386246017_image.png" alt="" width="800" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;vagrant init ubuntu/focal64&lt;/code&gt; command. Running this command automatically places a Vagrantfile in the directory created above. A Vagrantfile is a file that instructs Vagrant to create new Vagrant machines or boxes. &lt;a href="https://app.vagrantup.com/ubuntu/boxes/focal64"&gt;&lt;/a&gt;&lt;a href="https://app.vagrantup.com/ubuntu/boxes/focal64"&gt;ubuntu/focal64&lt;/a&gt; is an existing Vagrant box for the Linux Ubuntu distribution.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ vagrant init ubuntu/focal64
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QbzHpFRR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664389358001_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QbzHpFRR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664389358001_image.png" alt="" width="800" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Start the Virtual Machine using &lt;code&gt;vagrant up&lt;/code&gt; and watch it spin up the Virtual machine.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ vagrant up
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IFCohMDL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664389793248_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IFCohMDL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664389793248_image.png" alt="" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ensure your VirtualBox looks like this: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m3-Q9Qsy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664390986724_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m3-Q9Qsy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664390986724_image.png" alt="" width="723" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Connect to the VM using &lt;code&gt;vagrant ssh&lt;/code&gt; &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ vagrant ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v4mmSvT4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664391948468_image%2B7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v4mmSvT4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropbox.com/s_2DCFA656469FFD130FB3D773237FA24752F8702F0014DBA6ABDE2D130B9D5B78_1664391948468_image%2B7.png" alt="" width="800" height="620"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;This tutorial has shown you how to set up your Linux OS (Ubuntu) on Windows using Vagrant and VirtualBox. Vagrant is a great tool and a very easy way of using Ubuntu on Windows rather than having to dual boot. To learn more about Vagrant and VirtualBox, Check out these resources : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=krDU3BtJNpk"&gt;Vagrant and VirtualBox Simplified&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.taniarascia.com/what-are-vagrant-and-virtualbox-and-how-do-i-use-them/"&gt;Vagrant and VirtualBox Tutorial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.learncodeonline.in/automating-linux-installation-using-vagrant-and-virtualbox"&gt;Automating Linux Installation using Vagrant and VirtualBox&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devops</category>
      <category>cloud</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
