Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

Visual Studio Code (VSCode) and then commit it to a GitHub repository

15 December 2023 at 13:58

To commit HTML code to a GitHub repository using Visual Studio Code (VSCode), follow these steps:

  1. Install Git: Make sure Git is installed on your system. You can download it from Git's official website and follow the installation instructions.

  2. Set up Git in VSCode:

    • Open VSCode and open your project folder.
    • Press Ctrl + Shift + P (or Cmd + Shift + P on macOS) to open the Command Palette.
    • Type "Git: Initialize Repository" and select your project folder to initialize Git.
  3. Create a new GitHub repository:

    • Go to GitHub and log in to your account.
    • Click on the "+" icon in the top-right corner and select "New repository."
    • Follow the instructions to create a new repository on GitHub.
  4. Link the local repository to GitHub:

    • In VSCode, open the terminal by pressing Ctrl + ` (backtick) or navigating to View > Terminal in the top menu.
    • Use the following commands to link your local repository to the GitHub repository you created:
   git remote add origin <repository_url>

Replace <repository_url> with the URL of your GitHub repository.

  1. Add and commit HTML files:

    • In VSCode, navigate to the Source Control view by clicking on the source control icon in the left sidebar (or press Ctrl + Shift + G).
    • You'll see a list of changed files. Stage the HTML files you want to commit by clicking the + button next to the file names.
    • Enter a commit message in the text box at the top of the Source Control view to describe the changes you made.
    • Click the checkmark icon to commit the changes.
  2. Push changes to GitHub:

    • After committing the changes, click on the ellipsis (...) icon in the Source Control view and select "Push."
    • This action will push your committed changes to the GitHub repository.

Remember, these instructions assume you've set up a GitHub repository and have the necessary permissions to push changes to it. If you encounter any authentication issues during the push, make sure your GitHub credentials are correctly configured in Git or that you've set up SSH keys for GitHub authentication.

Step 1: Set up Git and GitHub

  1. Install Git: Download and install Git from Git's official website.

  2. Create a GitHub repository: Go to GitHub and log in to your account. Create a new repository by clicking the "+" icon in the top-right corner and selecting "New repository."

Step 2: Create an index.html file

  1. Open Visual Studio Code.
  2. Click on File in the top-left corner, select Open Folder..., and choose or create a new folder for your project.

Step 3: Create and code the index.html file

  1. In VSCode, right-click on the folder you created and select New File. Name the file index.html.
  2. Add HTML code to the index.html file. For example:
<!DOCTYPE html>
<html>
<head>
  <title>My First Web Page</title>
</head>
<body>
  <h1>Hello, World!</h1>
  <p>This is a simple HTML page.</p>
</body>
</html>

Step 4: Initialize Git repository and commit changes

  1. Open the integrated terminal in VSCode by going to Terminal > New Terminal.

  2. Initialize Git in your project folder by typing the following command in the terminal:

git init
  1. Add the index.html file to the staging area by typing:
git add index.html
  1. Commit the changes with a descriptive message:
git commit -m "Add index.html file with basic HTML structure"

Step 5: Link local repository to GitHub

  1. Go to your GitHub repository and copy the repository URL (ending in .git).

  2. In the terminal, link your local repository to the GitHub repository by running the following command:

git remote add origin <repository_url>

Replace <repository_url> with the URL you copied from GitHub.

Step 6: Push changes to GitHub

  1. Finally, push your committed changes to GitHub:
git push -u origin main

This command pushes your changes from the local main branch to the main branch on GitHub.

After completing these steps, your index.html file will be committed and pushed to your GitHub repository. You can verify the changes by visiting your GitHub repository in a web browser

Author:
Muthukumar.K

How to Install Wordpress on AWS | Create and Host a Wordpress Website on AWS EC2 with your own domain name:

17 November 2023 at 11:40

Image description

STEP1:

1.முதலில் AWS Account Open செய்ய வேண்டும்.

Image description

2.அதன் பின்னர் இது போல page ஆனது ஓபன் ஆகும் . இதில் aws logo அருகில் உள்ள service என்ற button ஐ கிளிக் செய்யவும்.

Image description
3.அதன் பின்னர் ec2 (Virtual Servers in the Cloud) என்பதை click செய்யவும்.

Image description

  1. பின்னர் இது போல ec2 dashboard ஆனது open ஆகும் .

Image description

STEP 2:

  1. இதனை open செய்த பிறகு instance ஆனது create செய்ய வேண்டும் .

Image description

2.இதில் எந்தவொரு instance ஆனது இப்போது வரை create செய்யப்படவில்லை. அவையாவும் இப்போது running status லும் இல்லை.

Image description

3.மேலே கொடுக்கப்பட்டுள்ள image இல் Launch instance ஐ கிளிக் செய்ய வேண்டும்.

Launch an instance:

STEP1:
create name and tag:

Image description
1.Launch instance-ஐ கிளிக் செய்தவுடன் இதுபோல ஒரு இன்ஸ்டன்ஸ் create செய்கின்ற பேஜ் ஆனது ஓபன் ஆகும்.
2.இதில் நாம் create செய்கின்ற instance க்கு name and tag ஆனது கொடுக்க வேண்டும்.
3.நான் webserver-ubuntu என கொடுத்து உள்ளேன்.

Application and OS Images:

Image description

STEP1:

1.அதன் பின்னர் Application and OS Images (Amazon Machine Image) ஆனது தேர்ந்துஎடுக்கவேண்டும் , நான் உபுண்டு os image ஐ தேர்ந்து எடுத்து உள்ளேன் ..

2.instance type ஆனது தேர்ந்துஎடுக்கவேண்டும் ,. நான் free tier eligible (t2 micro)ஐ நான் select செய்துளேன் .
Image description

  1. key pair ஆனது create செய்ய வேண்டும்.

Image description

key pair name = ubunutu-webserver-image

Image description

4.create key pair கொடுத்தவுடன் key ஆனது download ஆகும்.

Image description

5.network settings இல் எந்தஒரு changes-ம் இல்லை.

Image description

6.கடைசியாக instance ஐ launch செய்ய வேண்டியதுதான்..
Image description

7.instance ஐ launch செய்ய launch instance button-ஐ கிளிக் செய்யவும்.

Image description
இப்போது instance ஆனது running status இல் உள்ளது.

அதன் பின்னர் இன்ஸ்டன்ஸ் ஐ கிளிக் செய்து விட்டு அதன் மேலே கொடுக்கப்பட்டுள்ள connect button ஐ click செய்யவும்
Image description

next connect to instance ஆனது open aagum.

Image description

இதில் உள்ள ssh use செய்து local teminal இல் shell ஐ open செய்யலாம்.
Image description

ssh -i "ubunutu-webserver-image.pem" ubuntu@ec2-13-233-160-172.ap-south-1.compute.amazonaws.com

muthukumar@localmachine:~$ sudo -i
[sudo] password for muthukumar: 
root@localmachine:~# cd /
root@localmachine:/# cd /home/muthukumar/Downloads/
root@localmachine:/home/muthukumar/Downloads# 

Image description

root@localmachine:/home/muthukumar/Downloads# ssh -i "ubunutu-webserver-image.pem" ubuntu@ec2-13-233-160-172.ap-south-1.compute.amazonaws.com
The authenticity of host 'ec2-13-233-160-172.ap-south-1.compute.amazonaws.com (13.233.160.172)' can't be established.
ED25519 key fingerprint is SHA256:zgAr8NDB4BCRafF9bVkjmHe2Rl/WGu9w/hvHTBKlc9o.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'ec2-13-233-160-172.ap-south-1.compute.amazonaws.com' (ED25519) to the list of known hosts.
Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 6.2.0-1012-aws x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Fri Nov 17 11:02:14 UTC 2023

  System load:  0.0               Processes:             97
  Usage of /:   20.5% of 7.57GB   Users logged in:       0
  Memory usage: 20%               IPv4 address for eth0: 172.31.14.12
  Swap usage:   0%

Expanded Security Maintenance for Applications is not enabled.

0 updates can be applied immediately.

Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status


The list of available updates is more than a week old.
To check for new updates run: sudo apt update


The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ip-172-31-14-12:~$ hostname -I
172.31.14.12 
ubuntu@ip-172-31-14-12:~$ 

OS DETAILS:

ubuntu@ip-172-31-14-12:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
ubuntu@ip-172-31-14-12:~$

Apache installation in Ubuntu:

Step1:
sudo apt install apache2 -y

Step2:
status check, enable apache2
sudo systemctl status apache2

root@ip-172-31-29-19:/# systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-11-20 06:44:41 UTC; 4min 7s ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 1830 (apache2)
      Tasks: 55 (limit: 1121)
     Memory: 5.0M
        CPU: 46ms
     CGroup: /system.slice/apache2.service
             ├─1830 /usr/sbin/apache2 -k start
             ├─1832 /usr/sbin/apache2 -k start
             └─1833 /usr/sbin/apache2 -k start

Nov 20 06:44:41 ip-172-31-29-19 systemd[1]: Starting The Apache HTTP Server...
Nov 20 06:44:41 ip-172-31-29-19 systemd[1]: Started The Apache HTTP Server.
root@ip-172-31-29-19:/# 

sudo systemctl enable apache2

root@ip-172-31-29-19:/# systemctl enable apache2
Synchronizing state of apache2.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable apache2

Check Browser:

Ip: http://Server_ip/ --> AWS PUBLIC_IP

Image description

Image description

make a domain point to your server open /etc/hosts file:

sudo vim /etc/hosts

Image description

127.0.0.1 localhost
54.92.195.81 wordpressmk.com

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

:wq! save and exit

restart the server:

systemctl reload apache2
systemctl restart apache2

LAMP Stack Installation:

Apache installation:
sudo apt update -y && apt upgrade -y
sudo apt install apache2 apache2-utils -y
sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl status apache2
apache2 -v

  • check on browser with ip of server we need to set www-data (Apache user) as the owner of document root

sudo chown -R www-data:www-data /var/www/html

Installing MariaDB:

sudo apt install mariadb-server mariadb-client
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo systemctl status mariadb

creating root password for mariadb:

mysql_secure_installation

root@ip-172-31-29-19:/# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.

You already have your root account protected, so you can safely answer 'n'.

Switch to unix_socket authentication [Y/n] Y
Enabled successfully!
Reloading privilege tables..
 ... Success!


You already have your root account protected, so you can safely answer 'n'.

Change the root password? [Y/n] Y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

login to mariadb:

root@ip-172-31-29-19:/# mariadb -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 41
Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 

MariaDB [(none)]> exit

root@ip-172-31-29-19:/# mariadb --version
mariadb  Ver 15.1 Distrib 10.6.12-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper

PHP INSTALLATION:

  • To install PHP on your Ubuntu machine, you can follow these steps: Step 1: Update Package Lists:

Open a terminal window and run the following command to update the package lists:
sudo apt update

Step 2: Install PHP:

Run the following command to install PHP along with some commonly used extensions:
sudo apt install php

This will install the latest version of PHP available in the Ubuntu repositories.

Step 3: Verify PHP Installation:

sudo add-apt-repository ppa:ondrej/php
sudo apt update0

After the installation is complete, you can verify if PHP is installed properly by checking the version:
php -v

Certainly! When you install PHP extensions on Ubuntu using apt, you would replace extension_name with the actual name of the PHP extension you want to install.

For instance, if you want to install the curl extension, the command would be:

sudo apt install php-curl

root@ip-172-31-29-19:/# php -v
PHP 8.1.2-1ubuntu2.14 (cli) (built: Aug 18 2023 11:41:11) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.14, Copyright (c), by Zend Technologies

Step 4: Start the Web Server (If Needed):
sudo systemctl restart apache2

Step 5: Test PHP:

Create a PHP file in your web server's document root directory (e.g., /var/www/html) with the following content:

<?php
phpinfo();
?>

Remove Apache index file:

root@ip-172-31-29-19:/var/www/html# rm index.html

  • ReStart Apache webserver: sudo systemctl restart apache2

Image description

Image description

LAMP is successfully installed.

WORDPRESS_INSTALLATION:

Login to mariadb and create wordpress user and wordpress database and give privileges.
mysql -u root -p

root@ip-172-31-29-19:/# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 42
Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 

CREATE USER 'wordpresuser'@'localhost' IDENTIFIED BY '054866';

MariaDB [(none)]> CREATE USER 'wordpresuser'@'localhost' IDENTIFIED BY '054866';
Query OK, 0 rows affected (0.004 sec)

CREATE DATABASE wordpressdatabase;

MariaDB [(none)]> CREATE DATABASE wordpressdatabase;
Query OK, 1 row affected (0.000 sec)

GRANT ALL PRIVILEGES ON wordpressdatabase.* TO 'wordpresuser'@'localhost';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON wordpressdatabase.* TO 'wordpresuser'@'localhost';
Query OK, 0 rows affected (0.001 sec)

FLUSH PRIVILEGES;

download the latest wordpress zip file:

wget https://wordpress.org/latest.zip

root@ip-172-31-29-19:/# wget https://wordpress.org/latest.zip
--2023-11-21 08:48:59--  https://wordpress.org/latest.zip
Resolving wordpress.org (wordpress.org)... 198.143.164.252
Connecting to wordpress.org (wordpress.org)|198.143.164.252|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25955109 (25M) [application/zip]
Saving to: ‘latest.zip’

latest.zip                          100%[==================================================================>]  24.75M  34.0MB/s    in 0.7s    

2023-11-21 08:49:00 (34.0 MB/s) - ‘latest.zip’ saved [25955109/25955109]
root@ip-172-31-29-19:/# unzip latest.zip
Command 'unzip' not found, but can be installed with:
apt install unzip

install unzip:

apt install unzip

root@ip-172-31-29-19:/# apt install unzip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
unzip is already the newest version (6.0-26ubuntu3.1).
0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.

unzip latest.zip

sudo mv wordpress/ /var/www/html/

sudo chown www-data:www-data -R /var/www/html/wordpress/

sudo chmod -R 755 /var/www/html/wordpress/

create wordpress configuration file:

sudo vim /etc/apache2/sites-available/wordpress.conf

<VirtualHost *:80>
    ServerAdmin devopsmk.in
    DocumentRoot /var/www/html/wordpress
    ServerName 34.228.185.183
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

:wq! save and exit

enable the virtual host and the rewrite module:

sudo a2ensite wordpress.conf
sudo systemctl reload apache2
sudo a2enmod rewrite
sudo systemctl restart apache2

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

> http://34.228.185.183/index.php/2023/11/21/welcome-to-aws-world/

Muthu Kumar K

To install Firewall Command In Centos_linux

30 October 2023 at 13:59

STEP 1:

Update your package repository

sudo yum update

STEP 2:

install firewalld

sudo yum install firewalld

STEP 3:

Start the firewalld service and enable it to start at boot:

sudo systemctl start firewalld
sudo systemctl enable firewalld

STEP 4:

You can check the status of the firewalld service:

sudo systemctl status firewalld
  • That's it! You now have firewalld installed and running on your CentOS system. You can configure your firewall rules using the firewall-cmd command. Here are a few examples of how to use firewall-cmd to configure your firewall:

STEP 5:

Allow incoming traffic on a specific port (e.g., port 80 for HTTP):

sudo firewall-cmd --zone=public --add-port=80/tcp --permanent

STEP 6:

Reload the firewall to apply the changes:

bash:

sudo firewall-cmd --reload

STEP 7:

List all open ports in the default zone (usually "public"):

sudo firewall-cmd --list-ports
sudo firewall-cmd --list-all

STEP 8:

List all the services currently allowed through the firewall:

sudo firewall-cmd --list-services

Linux Commands Part 1:

17 October 2023 at 14:08

fmt command:

$ cat > fmt.txt
hai
all welcome
to
ILUGC

$ cat fmt.txt
hai
all welcome
to
ILUGC

$ fmt fmt.txt
hai all welcome to ILUGC

Image description

hostname:

$ hostname
localmachine

Image description
$ hostname -I
192.168.1.100 192.168.122.1 172.17.0.1

Image description

$ sudo hostname <new_hostname>
Example:
$ sudo hostname host
1.
Image description

2.

  • Enter the Password:

Image description

  • close the terminal and again open the terminal:

the hostname has been changed

Image description

to set the host as hostname
$ sudo hostname host

  • 1.
    Image description

  • 2.
    Image description

locate command:

  • find the file name quickly

$ sudo updatedb

once created the file after update db using below mention the command

Image description

$ locate fmt.txt
/home/muthukumar/fmt.txt

Image description

  • i have created the one text file name of secret and then using locate secret.txt and hit the enter but location is not showing in my terminal why ? ..not showing in the location because in this file not update in the db . so you have used this command sudo updatedb then next you have using the command and check secret.txt Result Showing:

Image description

Project#1:

26 September 2023 at 06:22

To achieve the tasks you've outlined, you'll need to follow these steps:

  1. Create a GitHub Repo with HTML Page:
  • Create a new GitHub repository.
  • Add an HTML file (e.g., index.html) to the repository.
  1. Create a Dockerfile:
  • In your GitHub repository, create a Dockerfile that defines how to build your Docker image. Here's a simple example:
   # Use an official Nginx runtime as a parent image
   FROM nginx:alpine

   # Copy your HTML file into the Nginx web root directory
   COPY index.html /usr/share/nginx/html

   # Expose port 80 to listen for incoming HTTP requests
   EXPOSE 80

   # Start Nginx
   CMD ["nginx", "-g", "daemon off;"]
  1. Write a Shell Script:

Create a shell script (e.g., build_and_run.sh) with the following content:

   #!/bin/bash

   # Clone the GitHub repo
   git clone https://github.com/yourusername/your-repo.git

   # Navigate to the repo directory
   cd your-repo

   # Build the Docker image
   docker build -t your-image-name .

   # Push the Docker image to Docker Hub
   docker push your-dockerhub-username/your-image-name

   # Run the Docker container
   docker run -d -p 80:80 your-dockerhub-username/your-image-name

Make sure to replace yourusername, your-repo, your-image-name, and your-dockerhub-username with your actual GitHub and Docker Hub information.

  1. Execute the Shell Script via Cron:

To run the shell script every 10 minutes, you can set up a cron job. Edit your crontab file by running:

   crontab -e

Then add the following line to schedule the script execution:

   */10 * * * * /path/to/build_and_run.sh

Replace /path/to/build_and_run.sh with the actual path to your shell script.

  1. Make Changes to index.html:

Edit your index.html file in your GitHub repository to make the desired changes.

  1. Check the Browser After 15 Minutes:

After making changes to index.html, commit and push the changes to your GitHub repository. Wait for 15 minutes, and the updated content should be reflected when you access the website in your browser.

  1. Push the Build Shell Script to the Same Repo:

Add the build_and_run.sh shell script to your GitHub repository:

   git add build_and_run.sh
   git commit -m "Add build_and_run.sh script"
   git push

Now you have a setup that automatically builds and deploys your HTML page using Docker, updates it every 10 minutes via a cron job, and reflects changes in the browser after 15 minutes when you make updates to index.html.

To stop a Docker container and then remove both the container and the associated image:

21 September 2023 at 13:43

To stop a Docker container and then remove both the container and the associated image, you can use the following commands:

  1. First, find the container ID or name of the container you want to stop and remove. You can use the docker ps command to list all running containers:
   docker ps

This command will display a list of running containers along with their details.

  1. Once you identify the container you want to stop and remove, you can use the docker stop command to stop it:
   docker stop CONTAINER_ID

Replace CONTAINER_ID with the actual ID or name of the container you want to stop.

  1. After stopping the container, you can remove it and its associated image using the docker rm and docker rmi commands. First, remove the container:
   docker rm CONTAINER_ID
  1. Finally, remove the Docker image associated with the container:
   docker rmi IMAGE_NAME:TAG

Replace IMAGE_NAME:TAG with the name and tag of the image you want to remove. You can find the image name and tag in the output of the docker images command.

If you want to remove all containers and their associated images, you can use the following commands:

  1. Stop all running containers:
   docker stop $(docker ps -q)
  1. Remove all stopped containers:
   docker rm $(docker ps -a -q)
  1. Remove all unused images (images not associated with any containers):
   docker image prune -a

This command will remove all images that are not associated with a container, which can help you clean up your system.

Be cautious when using the docker rmi and docker rm commands, especially when removing images and containers, as this action is irreversible, and you may lose data if you delete containers without proper backups or data management.

Author:
Muthu Kumar K

Install Docker Desktop on Ubuntu

14 September 2023 at 08:15

Install Docker Desktop on Ubuntu

click bellow mention the Url download .deb docker desktop

Install Docker Desktop:

Download latest DEB
Install the package with apt as follows:

sudo apt-get update
sudo apt-get install ./docker-desktop-4.23.0-amd64.deb

Launch Docker Desktop:

systemctl --user start docker-desktop

Image description

Image description

Install brave-browser

30 August 2023 at 07:30
sudo apt install curl

sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list

sudo apt update

sudo apt install brave-browser

Github Configuration Commands

29 August 2023 at 21:42
sudo apt update git
sudo apt install git
git --version
git config --global user.name "Muthukumark98"
git config --global user.email "muthukumar1998mk98@gmail.com"
git config --list
pwd
mkdir workspace
cd workspace/
git clone https://github.com/Muthukumark98/hello_test.git
ls
cd hello_test/
touch hello.py
ls
cat README.md 
ls
vim hello.py
cat hello.py
git status
git add hello.py
git status
git commit -m "first python code"
git status
git push origin main
git remote set-url origin https://<token>/<username>/<repo>
git push origin main

Linux Directory Structure and File Systems

29 August 2023 at 14:32

The Linux directory structure is hierarchical and follows a well-defined organization that helps manage the file system and its components. Here's an overview of the key directories and their purposes:

  1. /bin: This directory contains essential binary files, which are required for system booting and repair. These binaries are available to all users and are needed for basic system functionality.

Try to YourSelf:

muthukumar@DevOpsEngineer:/$ cd /bin
muthukumar@DevOpsEngineer:/bin$ ls
'['                                   gcc-nm                             mimetype                     shasum
 aa-enabled                           gcc-nm-11                          min12xxw                     shotwell
 aa-exec                              gcc-ranlib                         mispipe                      showconsolefont
 aa-features-abi                      gcc-ranlib-11                      mkdir                        showkey
 ab                                   gcore                              mkfifo                       showrgb
 aconnect                             gcov                               mkfontdir                    shred
 acpi_listen                          gcov-11                            mkfontscale                  shuf
 add-apt-repository                   gcov-dump                          mkisofs                      sigtool
 addpart                              gcov-dump-11                       mk_modmap                    simple-scan
 addr2line                            gcov-tool                          mknod                        simplescreenrecorder
 airscan-discover                     gcov-tool-11                       mksquashfs                   size
 alacarte                             gcr-viewer                         mktemp                       skill
 alsabat                              gdb                                mkzftree                     slabtop
 alsaloop                             gdb-add-index                      mmcli                        sleep
 alsamixer                            gdbtui                             mmdbresolve                  slogin
 alsatplg                             gdbus                              mokutil                      slxdecode
 alsaucm                              gdbus-codegen                      monitor-sensor               smproxy
 amidi                                gdialog                            more                         snap
 amixer                               gdk-pixbuf-csource                 mount                        snapctl
 apg                                  gdk-pixbuf-pixdata                 mountpoint                   snapfuse
 apgbfm                               gdk-pixbuf-thumbnailer             mousetweaks                  snice
 aplay                                gdmflexiserver                     mscompress                   socat
 aplaymidi                            gdm-screenshot                     msexpand                     soelim
 apport-bug                           gedit                              msiexec                      soffice
 apport-cli                           gencat                             msiexec-development          software-properties-gtk
 apport-collect                       genisoimage                        msiexec-stable               sort
 apport-unpack                        geod                               msql2mysql                   sotruss
 appres                               geqn                               mt                           spa-acp-tool
 appstreamcli                         GET                                mt-gnu                       spa-inspect
 apropos                              getconf                            mtr                          spa-json-dump
 apt                                  geteltorito                        mtrace                       spa-monitor
 apt-add-repository                   getent                             mtr-packet                   spa-resample
 apt-cache                            getfacl                            mv                           spd-conf
 apt-cdrom                            getkeycodes                        myisamchk                    spd-say
 apt-config                           getopt                             myisam_ftdump                spdsend
 aptdcon                              gettext                            myisamlog                    speaker-test
 apt-extracttemplates                 gettext.sh                         myisampack                   speech-dispatcher
 apt-ftparchive                       ghostscript                        my_print_defaults            speedometer
 apt-get                              gie                                mysql                        speedtest
 aptitude                             ginstall-info                      mysqlaccess                  speedtest-cli
 aptitude-changelog-parser            gio                                mysqladmin                   spice-vdagent
 aptitude-create-state-bundle         gio-querymodules                   mysqlanalyze                 splain
 aptitude-curses                      gipddecode                         mysqlbinlog                  split
 aptitude-run-state-bundle            git                                mysqlcheck                   splitfont
 apt-key                              git-receive-pack                   mysql_convert_table_format   sponge
 apt-mark                             git-shell                          mysqld_multi                 sprof
 apt-sortpkgs                         git-upload-archive                 mysqld_safe                  sqfscat
 apturl                               git-upload-pack                    mysqld_safe_helper           sqfstar
 apturl-gtk                           gjs                                mysqldump                    ss
 ar                                   gjs-console                        mysqldumpslow                ssh
 arborist                             gkbd-keyboard-display              mysql_find_rows              ssh-add
 arch                                 glib-compile-resources             mysql_fix_extensions         ssh-agent
 arecord                              glib-compile-schemas               mysqlhotcopy                 ssh-argv0
 arecordmidi                          glib-genmarshal                    mysqlimport                  ssh-copy-id
 aria_chk                             glib-gettextize                    mysql_install_db             ssh-import-id
 aria_dump_log                        glib-mkenums                       mysqloptimize                ssh-import-id-gh
 aria_ftdump                          gmake                              mysql_plugin                 ssh-import-id-lp
 aria_pack                            gnome-calculator                   mysqlrepair                  ssh-keygen
 aria_read_log                        gnome-calendar                     mysqlreport                  ssh-keyscan
 arm2hpdl                             gnome-characters                   mysql_secure_installation    sshpass
 as                                   gnome-control-center               mysql_setpermission          ssr-glinject
 aseqdump                             gnome-disk-image-mounter           mysqlshow                    start-pulseaudio-x11
 aseqnet                              gnome-disks                        mysqlslap                    startx
 aspell                               gnome-extensions                   mysql_tzinfo_to_sql          stat
 aspell-import                        gnome-flashback                    mysql_upgrade                static-sh
 at                                   gnome-font-viewer                  mysql_waitpid                stdbuf
 atobm                                gnome-help                         mytop                        strace
 atop                                 gnome-keyring                      namei                        strace-log-merge
 atopcat                              gnome-keyring-3                    nano                         streamzip
 atopconvert                          gnome-keyring-daemon               nautilus                     strings
 atopsar                              gnome-language-selector            nautilus-autorun-software    strip
 atq                                  gnome-logs                         nautilus-sendto              stty
 atrm                                 gnome-panel                        nawk                         su
 avahi-browse                         gnome-power-statistics             nc                           sudo
 avahi-browse-domains                 gnome-session                      ncal                         sudoedit
 avahi-publish                        gnome-session-custom-session       nc.openbsd                   sudoreplay
 avahi-publish-address                gnome-session-inhibit              ncurses5-config              sum
 avahi-publish-service                gnome-session-properties           ncurses6-config              switcherooctl
 avahi-resolve                        gnome-session-quit                 ncursesw5-config             sync
 avahi-resolve-address                gnome-shell                        ncursesw6-config             system-config-printer
 avahi-resolve-host-name              gnome-shell-extension-tool         neqn                         system-config-printer-applet
 avahi-set-host-name                  gnome-shell-perf-tool              netcat                       systemctl
 avinfo                               gnome-system-monitor               netExtenderGui               systemd
 awk                                  gnome-terminal                     netstat                      systemd-analyze
 axfer                                gnome-terminal.real                networkctl                   systemd-ask-password
 b2sum                                gnome-terminal.wrapper             networkd-dispatcher          systemd-cat
 baobab                               gnome-text-editor                  newgrp                       systemd-cgls
 base32                               gnome-thumbnail-font               NF                           systemd-cgtop
 base64                               gnome-todo                         nfc                          systemd-cryptenroll
 basename                             gnome-www-browser                  ng                           systemd-delta
 basenc                               gobject-query                      ngettext                     systemd-detect-virt
 bash                                 gold                               ng-latin                     systemd-escape
 bashbug                              google-chrome                      nice                         systemd-hwdb
 batch                                google-chrome-stable               nisdomainname                systemd-id128
 bc                                   gpasswd                            nl                           systemd-inhibit
 bdftopcf                             gpg                                nm                           systemd-machine-id-setup
 bdftruncate                          gpg2                               nm-applet                    systemd-mount
 bitmap                               gpg-agent                          nmcli                        systemd-notify
 bluemoon                             gpgcompose                         nm-connection-editor         systemd-path
 bluetooth                            gpgconf                            nm-online                    systemd-run
 bluetoothctl                         gpg-connect-agent                  nmtui                        systemd-socket-activate
 bluetooth-sendto                     gpgparsemail                       nmtui-connect                systemd-stdio-bridge
 bmon                                 gpgsm                              nmtui-edit                   systemd-sysext
 bmtoa                                gpgsplit                           nmtui-hostname               systemd-sysusers
 boltctl                              gpgtar                             node                         systemd-tmpfiles
 bootctl                              gpgv                               node-coveralls               systemd-tty-ask-password-agent
 brltty                               gpg-wks-server                     node-gyp                     systemd-umount
 brltty-ctb                           gpg-zip                            nodejs                       tabs
 brltty-trtxt                         gpic                               nohup                        tac
 brltty-ttb                           gprof                              notify-send                  tail
 broadwayd                            gpu-manager                        npm                          tap
 browse                               grdctl                             npm-arborist                 tap-mocha-reporter
 btattach                             grep                               npm-packlist                 tap-parser
 btmgmt                               gresource                          nproc                        tar
 btmon                                groff                              npx                          taskset
 btop                                 grog                               nroff                        tbl
 bunzip2                              grops                              nsenter                      tclsh
 busctl                               grotty                             nslookup                     tclsh8.6
 busybox                              groups                             nspr-config                  tcpdump
 bwrap                                grub-editenv                       nss-config                   tee
 byobu                                grub-file                          nstat                        telnet
 byobu-config                         grub-fstest                        nsupdate                     telnet.netkit
 byobu-ctrl-a                         grub-glue-efi                      ntfs-3g                      tempfile
 byobu-disable                        grub-kbdcomp                       ntfs-3g.probe                test
 byobu-disable-prompt                 grub-menulst2cfg                   ntfscat                      text2pcap
 byobu-enable                         grub-mkfont                        ntfscluster                  thunderbird
 byobu-enable-prompt                  grub-mkimage                       ntfscmp                      tic
 byobu-export                         grub-mklayout                      ntfsdecrypt                  tificc
 byobu-janitor                        grub-mknetdir                      ntfsfallocate                time
 byobu-keybindings                    grub-mkpasswd-pbkdf2               ntfsfix                      timedatectl
 byobu-launch                         grub-mkrelpath                     ntfsinfo                     timeout
 byobu-launcher                       grub-mkrescue                      ntfsls                       tldr
 byobu-launcher-install               grub-mkstandalone                  ntfsmove                     tldr-hs
 byobu-launcher-uninstall             grub-mount                         ntfsrecover                  tload
 byobu-layout                         grub-ntldr-img                     ntfssecaudit                 tlp-rdw
 byobu-prompt                         grub-render-label                  ntfstruncate                 tlp-stat
 byobu-quiet                          grub-script-check                  ntfsusermap                  tmux
 byobu-reconnect-sockets              grub-syslinux2cfg                  ntfswipe                     tnftp
 byobu-screen                         gs                                 numfmt                       toe
 byobu-select-backend                 gsbj                               nvidia-detector              top
 byobu-select-profile                 gsdj                               oakdecode                    totem
 byobu-select-session                 gsdj500                            obexctl                      totem-video-thumbnailer
 byobu-shell                          gsettings                          objcopy                      touch
 byobu-silent                         gslj                               objdump                      tput
 byobu-status                         gslp                               obs                          tr
 byobu-status-detail                  gsnd                               obs-ffmpeg-mux               tracepath
 byobu-tmux                           gst-device-monitor-1.0             oclock                       tracker3
 byobu-ugraph                         gst-discoverer-1.0                 od                           transicc
 byobu-ulevel                         gst-inspect-1.0                    oem-getlogs                  transmission-gtk
 bzcat                                gst-launch-1.0                     on_ac_power                  transset
 bzcmp                                gst-play-1.0                       oomctl                       tree
 bzdiff                               gstreamer-codec-install            open                         troff
 bzegrep                              gst-stats-1.0                      opener                       true
 bzexe                                gst-tester-1.0                     openssl                      truncate
 bzfgrep                              gst-typefind-1.0                   openvt                       trust
 bzgrep                               gtbl                               opldecode                    ts
 bzip2                                gtester                            orca                         tset
 bzip2recover                         gtester-report                     orca-dm-wrapper              tsort
 bzless                               gtf                                os-prober                    tty
 bzmore                               gtk4-builder-tool                  p11-kit                      tzselect
 c++                                  gtk4-encode-symbolic-svg           pacat                        ua
 c89                                  gtk4-launch                        pack200                      ubuntu-advantage
 c89-gcc                              gtk4-query-settings                pacmd                        ubuntu-bug
 c99                                  gtk4-update-icon-cache             pacote                       ubuntu-core-launcher
 c99-gcc                              gtk-builder-tool                   pactl                        ubuntu-distro-info
 cal                                  gtk-encode-symbolic-svg            padsp                        ubuntu-drivers
 calibrate_ppa                        gtk-launch                         pager                        ubuntu-report
 canberra-gtk-play                    gtk-query-settings                 pa-info                      ubuntu-security-status
 cancel                               gtk-update-icon-cache              pamon                        ucf
 capinfos                             gunzip                             paperconf                    ucfq
 captoinfo                            gyp                                paplay                       ucfr
 captype                              gzexe                              parallel                     uclampset
 cat                                  gzip                               parec                        ucs2any
 catman                               h2ph                               parecord                     udevadm
 cautious-launcher                    h2xs                               partx                        udisksctl
 cc                                   hardlink                           passwd                       udo
 cct                                  hbpldecode                         paste                        ul
 ccze                                 hciattach                          pastebinit                   umax_pp
 ccze-cssdump                         hciconfig                          pasteurize                   umount
 cd-create-profile                    hcitool                            pasuspender                  uname
 cd-fix-profile                       hd                                 patch                        unattended-upgrade
 cd-iccdump                           head                               pathchk                      unattended-upgrades
 cd-it8                               HEAD                               pax11publish                 uncompress
 c++filt                              helpztags                          pbget                        unexpand
 cgi-fcgi                             hex2hcd                            pbput                        unicode_start
 chacl                                hexdump                            pbputs                       unicode_stop
 chage                                hipercdecode                       pdb3                         uniq
 chardet                              hollywood                          pdb3.10                      unity-scope-loader
 chardetect                           host                               pdf2dsc                      unlink
 chattr                               hostid                             pdf2ps                       unlzma
 chcon                                hostname                           pdfattach                    unmkinitramfs
 checkgid                             hostnamectl                        pdfdetach                    unopkg
 check-language-support               hp-align                           pdffonts                     unpack200
 cheese                               hp-check                           pdfimages                    unshare
 chfn                                 hp-clean                           pdfinfo                      unsquashfs
 chgrp                                hp-colorcal                        pdfseparate                  unxz
 chmod                                hp-config_usb_printer              pdfsig                       unzip
 choom                                hp-doctor                          pdftocairo                   unzipsfx
 chown                                hp-firmware                        pdftohtml                    unzstd
 chronic                              hp-info                            pdftoppm                     update-alternatives
 chrt                                 hp-levels                          pdftops                      updatedb
 chsh                                 hp-logcapture                      pdftotext                    update-desktop-database
 chvt                                 hp-makeuri                         pdfunite                     update-manager
 ciptool                              hp-pkservice                       pee                          update-mime-database
 ckbcomp                              hp-plugin                          peekfd                       update-notifier
 cksum                                hp-plugin-ubuntu                   perl                         upower
 clambc                               hp-probe                           perl5.34.0                   uptime
 clamscan                             hp-query                           perl5.34-x86_64-linux-gnu    usb-creator-gtk
 clamsubmit                           hp-scan                            perlbug                      usb-devices
 clear                                hp-setup                           perldoc                      usbhid-dump
 clear_console                        hp-testpage                        perli11ndoc                  usb_printerid
 cmatrix                              hp-timedate                        perlivp                      usbreset
 cmp                                  htcacheclean                       perlthanks                   users
 code                                 htdbm                              perror                       utmpdump
 codepage                             htdigest                           pf2afm                       uuidgen
 col                                  htop                               pfbtopfa                     uuidparse
 col1                                 htpasswd                           pgrep                        VBox
 col2                                 hwe-support-status                 phar                         vboxautostart
 col3                                 i386                               phar7.4                      VBoxAutostart
 col4                                 ibus                               phar7.4.phar                 vboxballoonctrl
 col5                                 ibus-daemon                        phar8.2                      VBoxBalloonCtrl
 col6                                 ibus-setup                         phar8.2.phar                 vboxbugreport
 col7                                 ibus-table-createdb                phar.phar                    VBoxBugReport
 col8                                 iceauth                            phar.phar7.4                 VBoxDTrace
 col9                                 ico                                phar.phar8.2                 vboxheadless
 colcrt                               iconv                              php                          VBoxHeadless
 colormgr                             id                                 php7.4                       vbox-img
 colrm                                iecset                             php8.2                       vboximg-mount
 column                               ifdata                             pic                          vboxmanage
 combine                              ifne                               pico                         VBoxManage
 comm                                 ijs_pxljr                          piconv                       vboxsdl
 compose                              im-config                          pidof                        VBoxSDL
 corelist                             im-launch                          pidwait                      vboxwebsrv
 cp                                   indicator-stickynotes              pinentry                     vdir
 cpan                                 info                               pinentry-curses              vi
 cpan5.34-x86_64-linux-gnu            infobrowser                        pinentry-gnome3              vidir
 cpio                                 infocmp                            pinentry-x11                 view
 cpp                                  infotocap                          ping                         viewres
 cpp-11                               innochecksum                       ping4                        vigpg
 cpufreq-selector                     innotop                            ping6                        vim
 c_rehash                             inputattach                        pinky                        vim.basic
 crontab                              install                            pipewire                     vimdiff
 cs2cs                                install-info                       pipewire-media-session       vim.tiny
 csplit                               install-printerdriver              pkaction                     vimtutor
 ctags                                instmodsh                          pkcheck                      vipe
 ctags.emacs                          intel-virtual-output               pkcon                        virtualbox
 ctail                                invgeod                            pkexec                       VirtualBox
 ctstat                               invproj                            pkill                        virtualboxvm
 cupstestppd                          ionice                             pkmon                        VirtualBoxVM
 curl                                 ip                                 pkttyagent                   vmstat
 cut                                  ipcmk                              pl2pm                        vmwarectrl
 cvt                                  ipcrm                              pldd                         vstp
 cvtsudoers                           ipcs                               plocate                      w
 dash                                 ipod-read-sysinfo-extended         plog                         wall
 date                                 ipod-time-sync                     plymouth                     watch
 dbilogstrip                          ippfind                            pmap                         watchgnupg
 dbiprof                              ipptool                            pnm2ppa                      wc
 dbiproxy                             iptables-xml                       pod2html                     wdctl
 dbus-cleanup-sockets                 ischroot                           pod2man                      wget
 dbus-daemon                          isdv4-serial-debugger              pod2text                     whatis
 dbus-monitor                         isdv4-serial-inputattach           pod2usage                    whereis
 dbus-run-session                     isodump                            podchecker                   which
 dbus-send                            isoinfo                            poff                         which.debianutils
 dbus-update-activation-environment   isovfy                             pon                          whiptail
 dbus-uuidgen                         ispell-wrapper                     POST                         who
 dbxtool                              isutf8                             powerprofilesctl             whoami
 dc                                   jaotc                              ppdc                         whoopsie
 dconf                                jar                                ppdhtml                      whoopsie-preferences
 dd                                   jarsigner                          ppdi                         wifi
 ddstdecode                           java                               ppdmerge                     wifi-status
 deallocvt                            javac                              ppdpo                        wine
 debconf                              javadoc                            pphs                         wine64
 debconf-apt-progress                 javap                              pr                           wine64-development
 debconf-communicate                  jcmd                               precat                       wine64-stable
 debconf-copydb                       jconsole                           preconv                      wineboot
 debconf-escape                       jdb                                preunzip                     wineboot-development
 debconf-set-selections               jdeprscan                          prezip                       wineboot-stable
 debconf-show                         jdeps                              prezip-bin                   winecfg
 debian-distro-info                   jenkins                            print                        winecfg-development
 deb-systemd-helper                   jexec                              printafm                     winecfg-stable
 deb-systemd-invoke                   jfr                                printenv                     wineconsole
 deja-dup                             jhsdb                              printer-profile              wineconsole-development
 delpart                              jimage                             printf                       wineconsole-stable
 delv                                 jinfo                              prlimit                      winedbg
 desktop-file-edit                    jjs                                pro                          winedbg-development
 desktop-file-install                 jlink                              procan                       winedbg-stable
 desktop-file-validate                jmap                               proj                         wine-development
 devdump                              jmod                               projinfo                     winefile
 df                                   join                               projsync                     winefile-development
 dfu-tool                             journalctl                         prove                        winefile-stable
 dh_bash-completion                   jp2a                               prtstat                      winepath
 dh_installxmlcatalogs                jpgicc                             ps                           winepath-development
 dh_perl_dbi                          jps                                ps2ascii                     winepath-stable
 dh_perl_openssl                      jrunscript                         ps2epsi                      wineserver
 diff                                 js                                 ps2pdf                       wineserver-development
 diff3                                jshell                             ps2pdf12                     wineserver-stable
 dig                                  json_pp                            ps2pdf13                     wine-stable
 dir                                  jsonschema                         ps2pdf14                     wireshark
 dircolors                            jstack                             ps2pdfwr                     word-list-compress
 dirmngr                              jstat                              ps2ps                        wpa_passphrase
 dirmngr-client                       jstatd                             ps2ps2                       write
 dirname                              js-yaml                            ps2txt                       write.ul
 dirsplit                             JxrDecApp                          psfaddtable                  wscat
 distro-info                          JxrEncApp                          psfgettable                  wsrep_sst_backup
 dmesg                                kbdinfo                            psfstriptable                wsrep_sst_common
 dnsdomainname                        kbd_mode                           psfxtable                    wsrep_sst_mariabackup
 domainname                           kbxutil                            psicc                        wsrep_sst_mysqldump
 do-release-upgrade                   keep-one-running                   pslog                        wsrep_sst_rsync
 dpkg                                 kernel-install                     pstree                       wsrep_sst_rsync_wan
 dpkg-architecture                    kerneloops-submit                  pstree.x11                   wwan
 dpkg-buildflags                      keyring                            ptar                         X
 dpkg-buildpackage                    keytool                            ptardiff                     X11
 dpkg-checkbuilddeps                  kill                               ptargrep                     x11perf
 dpkg-deb                             killall                            ptx                          x11perfcomp
 dpkg-distaddfile                     kmod                               pulseaudio                   x86_64
 dpkg-divert                          kmodsign                           purge-old-kernels            x86_64-linux-gnu-addr2line
 dpkg-genbuildinfo                    l2ping                             pw-cat                       x86_64-linux-gnu-ar
 dpkg-genchanges                      l2test                             pw-cli                       x86_64-linux-gnu-as
 dpkg-gencontrol                      laptop-detect                      pwd                          x86_64-linux-gnu-c++filt
 dpkg-gensymbols                      last                               pw-dot                       x86_64-linux-gnu-cpp
 dpkg-maintscript-helper              lastb                              pw-dsdplay                   x86_64-linux-gnu-cpp-11
 dpkg-mergechangelogs                 lastlog                            pw-dump                      x86_64-linux-gnu-dwp
 dpkg-name                            lavadecode                         pwdx                         x86_64-linux-gnu-elfedit
 dpkg-parsechangelog                  lcf                                pw-link                      x86_64-linux-gnu-g++
 dpkg-query                           lckdo                              pw-loopback                  x86_64-linux-gnu-g++-11
 dpkg-realpath                        ld                                 pw-metadata                  x86_64-linux-gnu-gcc
 dpkg-scanpackages                    ld.bfd                             pw-mididump                  x86_64-linux-gnu-gcc-11
 dpkg-scansources                     ldd                                pw-midiplay                  x86_64-linux-gnu-gcc-ar
 dpkg-shlibdeps                       ld.gold                            pw-midirecord                x86_64-linux-gnu-gcc-ar-11
 dpkg-source                          less                               pw-mon                       x86_64-linux-gnu-gcc-nm
 dpkg-split                           lessecho                           pw-play                      x86_64-linux-gnu-gcc-nm-11
 dpkg-statoverride                    lessfile                           pw-profiler                  x86_64-linux-gnu-gcc-ranlib
 dpkg-trigger                         lesskey                            pw-record                    x86_64-linux-gnu-gcc-ranlib-11
 dpkg-vendor                          lesspipe                           pw-reserve                   x86_64-linux-gnu-gcov
 driverless                           lexgrog                            pw-top                       x86_64-linux-gnu-gcov-11
 driverless-fax                       libnetcfg                          pw-v4l2                      x86_64-linux-gnu-gcov-dump
 du                                   libreoffice                        py3clean                     x86_64-linux-gnu-gcov-dump-11
 dumpcap                              libwacom-list-devices              py3compile                   x86_64-linux-gnu-gcov-tool
 dumpkeys                             libwacom-list-local-devices        py3versions                  x86_64-linux-gnu-gcov-tool-11
 duplicity                            libwacom-show-stylus               pydoc3                       x86_64-linux-gnu-gold
 dvipdf                               libwacom-update-db                 pydoc3.10                    x86_64-linux-gnu-gprof
 dwp                                  link                               pygettext3                   x86_64-linux-gnu-ld
 ebrowse                              linkicc                            pygettext3.10                x86_64-linux-gnu-ld.bfd
 ebrowse.emacs                        linux32                            python3                      x86_64-linux-gnu-ld.gold
 echo                                 linux64                            python3.10                   x86_64-linux-gnu-lto-dump-11
 ed                                   linux-boot-prober                  python3-futurize             x86_64-linux-gnu-nm
 edit                                 linux-check-removal                python3-pasteurize           x86_64-linux-gnu-objcopy
 editcap                              linux-update-symlinks              pzstd                        x86_64-linux-gnu-objdump
 editor                               linux-version                      qpdldecode                   x86_64-linux-gnu-ranlib
 editres                              listres                            qrcode-terminal              x86_64-linux-gnu-readelf
 efibootdump                          ln                                 qt-faststart                 x86_64-linux-gnu-size
 efibootmgr                           lnstat                             quirks-handler               x86_64-linux-gnu-strings
 egrep                                loadkeys                           randpkt                      x86_64-linux-gnu-strip
 eject                                loadunimap                         ranlib                       xargs
 elfedit                              localc                             rawshark                     xauth
 emacs                                locale                             rbash                        xbiff
 emacsclient                          locale-check                       rcp                          xbrlapi
 emacsclient.emacs                    localectl                          rctest                       xcalc
 emacs-gtk                            localedef                          rdiffdir                     xclipboard
 enc2xs                               locate                             rdma                         xclock
 encguess                             lodraw                             readelf                      xcmsdb
 enchant-2                            loffice                            readlink                     xconsole
 enchant-lsmod-2                      lofromtemplate                     realpath                     xcursorgen
 env                                  logger                             red                          xcutsel
 envsubst                             login                              regedit                      xdg-dbus-proxy
 eog                                  loginctl                           regedit-development          xdg-desktop-icon
 eps2eps                              logname                            regedit-stable               xdg-desktop-menu
 eqn                                  logresolve                         regsvr32                     xdg-email
 errno                                loimpress                          regsvr32-development         xdg-icon-resource
 esc-m                                lomath                             regsvr32-stable              xdg-mime
 esparse                              look                               remmina                      xdg-open
 esvalidate                           loweb                              remmina-file-wrapper         xdg-screensaver
 etags                                lowntfs-3g                         remmina-gnome                xdg-settings
 etags.emacs                          lowriter                           rendercheck                  xdg-user-dir
 eutp                                 lp                                 renice                       xdg-user-dirs-gtk-update
 evince                               lpoptions                          reordercap                   xdg-user-dirs-update
 evince-previewer                     lpq                                replace                      xditview
 evince-thumbnailer                   lpr                                reset                        xdpyinfo
 ex                                   lprm                               resizecons                   xdriinfo
 expand                               lp_solve                           resizepart                   xedit
 expiry                               lpstat                             resolvectl                   Xephyr
 expr                                 ls                                 resolveip                    xev
 factor                               lsattr                             resolve_stack_dump           xeyes
 faillog                              lsblk                              rev                          xfd
 faked-sysv                           lsb_release                        rfcomm                       xfontsel
 faked-tcp                            lscpu                              rgrep                        xgamma
 fakeroot                             lshw                               rhythmbox                    xgc
 fakeroot-sysv                        lsinitramfs                        rhythmbox-client             xhost
 fakeroot-tcp                         lsipc                              rimraf                       xinit
 fallocate                            lslocks                            rlogin                       xinput
 false                                lslogins                           rm                           xkbbell
 fc-cache                             lsmem                              rmdir                        xkbcomp
 fc-cat                               lsmod                              rmic                         xkbevd
 fc-conflist                          lsns                               rmid                         xkbprint
 fcgistarter                          lsof                               rmiregistry                  xkbvleds
 fc-list                              lspci                              rnano                        xkbwatch
 fc-match                             lspgpot                            rotatelogs                   xkeystone
 fc-pattern                           lsusb                              routef                       xkill
 fc-query                             lto-dump-11                        routel                       xload
 fc-scan                              luit                               rpcgen                       xlogo
 fc-validate                          lwp-download                       rrsync                       xlsatoms
 ffmpeg                               lwp-dump                           rsh                          xlsclients
 ffplay                               lwp-mirror                         rstart                       xlsfonts
 ffprobe                              lwp-request                        rstartd                      xmag
 fgconsole                            lzcat                              rsync                        xman
 fgrep                                lzcmp                              rsync-ssl                    xmessage
 filan                                lzdiff                             rtstat                       xmlcatalog
 file                                 lzegrep                            runcon                       xmllint
 file2brl                             lzfgrep                            run-mailcap                  xmodmap
 file-roller                          lzgrep                             run-on-ac                    xmore
 fim                                  lzless                             run-on-bat                   Xorg
 fimgs                                lzma                               run-one                      xprop
 fincore                              lzmainfo                           run-one-constantly           xqxdecode
 find                                 lzmore                             run-one-until-failure        xrandr
 findmnt                              m17n-db                            run-one-until-success        xrdb
 firefox                              m2300w                             run-parts                    xrefresh
 firewall-cmd                         m2300w-wrapper                     run-this-one                 x-session-manager
 firewall-offline-cmd                 m2400w                             run-with-aspell              xset
 flock                                make                               rview                        xsetmode
 fmt                                  make-first-existing-target         rvim                         xsetpointer
 fold                                 mako-render                        rygel                        xsetroot
 fonttosfnt                           man                                rzsh                         xsetwacom
 foo2ddst                             mandb                              sane-find-scanner            xsm
 foo2ddst-wrapper                     manifest                           sassc                        xstdcmap
 foo2hbpl2                            manpath                            savelog                      xsubpp
 foo2hbpl2-wrapper                    man-recode                         sbattach                     x-terminal-emulator
 foo2hiperc                           mapscrn                            sbkeysync                    xvidtune
 foo2hiperc-wrapper                   mariadb                            sbsiglist                    xvinfo
 foo2hp                               mariadb-access                     sbsign                       Xwayland
 foo2hp2600-wrapper                   mariadb-admin                      sbvarsign                    xwd
 foo2lava                             mariadb-analyze                    sbverify                     x-window-manager
 foo2lava-wrapper                     mariadb-binlog                     scanimage                    xwininfo
 foo2oak                              mariadb-check                      scp                          xwud
 foo2oak-wrapper                      mariadbcheck                       scp-dbus-service             x-www-browser
 foo2qpdl                             mariadb-conv                       screendump                   xxd
 foo2qpdl-wrapper                     mariadb-convert-table-format       script                       xz
 foo2slx                              mariadbd-multi                     scriptlive                   xzcat
 foo2slx-wrapper                      mariadbd-safe                      scriptreplay                 xzcmp
 foo2xqx                              mariadbd-safe-helper               sdiff                        xzdiff
 foo2xqx-wrapper                      mariadb-dump                       sdptool                      xzegrep
 foo2zjs                              mariadb-dumpslow                   seahorse                     xzfgrep
 foo2zjs-icc2ps                       mariadb-find-rows                  sed                          xzgrep
 foo2zjs-pstops                       mariadb-fix-extensions             see                          xzless
 foo2zjs-wrapper                      mariadb-hotcopy                    select-default-iwrap         xzmore
 foomatic-rip                         mariadb-import                     select-editor                yelp
 fprintd-delete                       mariadb-install-db                 semver                       yes
 fprintd-enroll                       mariadb-optimize                   sensible-browser             ypdomainname
 fprintd-list                         mariadb-plugin                     sensible-editor              zcat
 fprintd-verify                       mariadb-repair                     sensible-pager               zcmp
 free                                 mariadb-report                     seq                          zdiff
 freshclam                            mariadb-secure-installation        serialver                    zdump
 ftp                                  mariadb-service-convert            session-migration            zegrep
 funzip                               mariadb-setpermission              sessreg                      zenity
 fuser                                mariadb-show                       setarch                      zfgrep
 fusermount                           mariadb-slap                       setfacl                      zforce
 fusermount3                          mariadb-tzinfo-to-sql              setfont                      zgrep
 futurize                             mariadb-upgrade                    setkeycodes                  zip
 fwupdagent                           mariadb-waitpid                    setleds                      zipcloak
 fwupdate                             mawk                               setlogcons                   zipdetails
 fwupdmgr                             mcookie                            setmetamode                  zipgrep
 fwupdtool                            md5sum                             setpci                       zipinfo
 g++                                  md5sum.textutils                   setpriv                      zipnote
 g++-11                               mdig                               setsid                       zipsplit
 galera_new_cluster                   melt                               setterm                      zjsdecode
 galera_recovery                      melt-7                             setupcon                     zless
 gamemoded                            memusage                           setxkbmap                    zmore
 gamma4scanimage                      memusagestat                       sftp                         znew
 gapplication                         mergecap                           sg                           zrun
 gatttool                             mesa-overlay-control.py            sh                           zsh
 gawk                                 mesg                               sha1sum                      zsh5
 gcalccmd                             metacity                           sha224sum                    zstd
 gcc                                  metacity-message                   sha256sum                    zstdcat
 gcc-11                               metacity-theme-viewer              sha384sum                    zstdgrep
 gcc-ar                               migrate-pubring-from-classic-gpg   sha512sum                    zstdless
 gcc-ar-11                            mimeopen                           sharkd                       zstdmt
muthukumar@DevOpsEngineer:/bin$ 


  1. /boot: The boot directory contains files necessary for the boot process, including the Linux kernel, initial RAM disk (initramfs), and bootloader configurations. Example:
muthukumar@DevOpsEngineer:/$ cd /boot
muthukumar@DevOpsEngineer:/boot$ ls
config-5.19.0-50-generic  initrd.img                    memtest86+.bin                System.map-6.2.0-26-generic  vmlinuz.old
config-6.2.0-26-generic   initrd.img-5.19.0-50-generic  memtest86+.elf                vmlinuz
efi                       initrd.img-6.2.0-26-generic   memtest86+_multiboot.bin      vmlinuz-5.19.0-50-generic
grub                      initrd.img.old                System.map-5.19.0-50-generic  vmlinuz-6.2.0-26-generic
muthukumar@DevOpsEngineer:/boot$ 

  1. /dev: This directory contains device files representing various hardware devices or pseudo-devices. These files provide a way for applications to communicate with hardware. Example:
muthukumar@DevOpsEngineer:/$ cd /dev
muthukumar@DevOpsEngineer:/dev$ ls
acpi_thermal_rel  fb0        i2c-4    loop17  loop35        mqueue     rtc       tty17  tty35  tty53      ttyS12  ttyS30       vcs1   vfio
autofs            fd         i2c-5    loop18  loop36        mtd0       rtc0      tty18  tty36  tty54      ttyS13  ttyS31       vcs2   vga_arbiter
block             full       i2c-6    loop19  loop37        mtd0ro     shm       tty19  tty37  tty55      ttyS14  ttyS4        vcs3   vhci
btrfs-control     fuse       i2c-7    loop2   loop38        net        snapshot  tty2   tty38  tty56      ttyS15  ttyS5        vcs4   vhost-net
bus               gpiochip0  i2c-8    loop20  loop39        ng0n1      snd       tty20  tty39  tty57      ttyS16  ttyS6        vcs5   vhost-vsock
char              hidraw0    i2c-9    loop21  loop4         null       stderr    tty21  tty4   tty58      ttyS17  ttyS7        vcs6   video0
console           hpet       initctl  loop22  loop40        nvme0      stdin     tty22  tty40  tty59      ttyS18  ttyS8        vcsa   video1
core              hugepages  input    loop23  loop41        nvme0n1    stdout    tty23  tty41  tty6       ttyS19  ttyS9        vcsa1  zero
cpu               hwrng      kmsg     loop24  loop42        nvme0n1p1  tpm0      tty24  tty42  tty60      ttyS2   udmabuf      vcsa2  zfs
cpu_dma_latency   i2c-0      kvm      loop25  loop5         nvme0n1p2  tpmrm0    tty25  tty43  tty61      ttyS20  uhid         vcsa3
cuse              i2c-1      log      loop26  loop6         nvme0n1p3  tty       tty26  tty44  tty62      ttyS21  uinput       vcsa4
disk              i2c-10     loop0    loop27  loop7         nvme0n1p4  tty0      tty27  tty45  tty63      ttyS22  urandom      vcsa5
dma_heap          i2c-11     loop1    loop28  loop8         nvram      tty1      tty28  tty46  tty7       ttyS23  userfaultfd  vcsa6
dri               i2c-12     loop10   loop29  loop9         port       tty10     tty29  tty47  tty8       ttyS24  userio       vcsu
drm_dp_aux0       i2c-13     loop11   loop3   loop-control  ppp        tty11     tty3   tty48  tty9       ttyS25  v4l          vcsu1
drm_dp_aux1       i2c-14     loop12   loop30  mapper        psaux      tty12     tty30  tty49  ttyprintk  ttyS26  vboxdrv      vcsu2
drm_dp_aux2       i2c-15     loop13   loop31  mcelog        ptmx       tty13     tty31  tty5   ttyS0      ttyS27  vboxdrvu     vcsu3
drm_dp_aux3       i2c-16     loop14   loop32  media0        pts        tty14     tty32  tty50  ttyS1      ttyS28  vboxnetctl   vcsu4
drm_dp_aux4       i2c-2      loop15   loop33  mei0          random     tty15     tty33  tty51  ttyS10     ttyS29  vboxusb      vcsu5
ecryptfs          i2c-3      loop16   loop34  mem           rfkill     tty16     tty34  tty52  ttyS11     ttyS3   vcs          vcsu6
muthukumar@DevOpsEngineer:/dev$ 


  1. /etc: The /etc directory contains configuration files for system-wide settings and application configurations. It is a crucial directory for managing system behavior. Example:
muthukumar@DevOpsEngineer:/$ cd /etc
muthukumar@DevOpsEngineer:/etc$ ls
acpi                           cron.hourly          group-           libaudit.conf        newt             rc5.d              thermald
adduser.conf                   cron.monthly         grub.d           libblockdev          nftables.conf    rc6.d              thunderbird
alsa                           crontab              gshadow          libnl-3              nsswitch.conf    rcS.d              timezone
alternatives                   cron.weekly          gshadow-         libpaper.d           ODBCDataSources  resolv.conf        timidity
anacrontab                     cups                 gss              libreoffice          odbc.ini         rmt                tlp.conf
apache2                        cupshelpers          gtk-2.0          lighttpd             odbcinst.ini     rpc                tlp.d
apg.conf                       dbus-1               gtk-3.0          locale.alias         openal           rsyslog.conf       tmpfiles.d
apm                            dconf                hdparm.conf      locale.gen           openni2          rsyslog.d          ts.conf
apparmor                       debconf.conf         host.conf        localtime            openvpn          rygel.conf         ubuntu-advantage
apparmor.d                     debian_version       hostid           logcheck             opt              sane.d             ucf.conf
apport                         default              hostname         login.defs           os-release       security           udev
appstream.conf                 deluser.conf         hosts            logrotate.conf       PackageKit       selinux            udisks2
apt                            depmod.d             hosts.allow      logrotate.d          pam.conf         sensors3.conf      ufw
at.deny                        dhcp                 hosts.deny       lsb-release          pam.d            sensors.d          updatedb.conf
avahi                          dictionaries-common  hosts.save       machine-id           papersize        services           update-manager
bash.bashrc                    dpkg                 hp               machine-info         passwd           sgml               update-motd.d
bash_completion                e2scrub.conf         ifplugd          magic                passwd-          shadow             update-notifier
bash_completion.d              emacs                ImageMagick-6    magic.mime           pcmcia           shadow-            UPower
bindresvport.blacklist         environment          init             mailcap              perl             shells             usb_modeswitch.conf
binfmt.d                       environment.d        init.d           mailcap.order        php              skel               usb_modeswitch.d
bluetooth                      ethertypes           initramfs-tools  manpath.config       pki              smi.conf           vbox
bmon.conf                      firefox              inputrc          mecabrc              pm               snmp               vdpau_wrapper.cfg
brlapi.key                     firewalld            insserv.conf.d   mime.types           pnm2ppa.conf     speech-dispatcher  vim
brltty                         fonts                ipp-usb          mke2fs.conf          polkit-1         ssh                vtrgb
brltty.conf                    fprintd.conf         iproute2         ModemManager         ppp              ssl                vulkan
byobu                          fstab                issue            modprobe.d           printcap         subgid             wgetrc
ca-certificates                fuse.conf            issue.net        modules              profile          subgid-            wireshark
ca-certificates.conf           fwupd                java-11-openjdk  modules-load.d       profile.d        subuid             wpa_supplicant
ca-certificates.conf.dpkg-old  gai.conf             kernel           mtab                 protocols        subuid-            www
cczerc                         gdb                  kernel-img.conf  mysql                pulse            sudo.conf          X11
chatscripts                    gdm3                 kerneloops.conf  nanorc               python3          sudoers            xattr.conf
clamav                         geoclue              ldap             netconfig            python3.10       sudoers.d          xdg
compizconfig                   ghostscript          ld.so.cache      netplan              rc0.d            sudo_logsrvd.conf  xml
console-setup                  glvnd                ld.so.conf       network              rc1.d            sysctl.conf        zsh
cracklib                       gnome                ld.so.conf.d     networkd-dispatcher  rc2.d            sysctl.d           zsh_command_not_found
cron.d                         groff                legal            NetworkManager       rc3.d            systemd
cron.daily                     group                libao.conf       networks             rc4.d            terminfo
muthukumar@DevOpsEngineer:/etc$ 


  1. /home: Each user on the system has a subdirectory within /home where their personal files and settings are stored. Example:
muthukumar@DevOpsEngineer:/$ cd /home
muthukumar@DevOpsEngineer:/home$ ls
muthukumar
muthukumar@DevOpsEngineer:/home$ 

  1. /lib and /lib64: These directories store essential libraries that are required by binaries in /bin and /sbin. /lib64 is used on 64-bit systems. Example:
muthukumar@DevOpsEngineer:/$ cd /lib
muthukumar@DevOpsEngineer:/lib$ ls
apache2                gcc                                   libcpufreq.so.0.0.0   nodejs               speech-dispatcher-modules
apg                    girepository-1.0                      libdfalt.so.0         nvidia               ssl
apparmor               git-core                              libdfalt.so.0.0.0     ogdi                 sysctl.d
apt                    gnome-session                         libgalera_smm.so      openssh              systemd
aspell                 gnome-settings-daemon-3.0             libgdal.so.30         openvpn              sysusers.d
bfd-plugins            gnome-settings-daemon-42              libgdal.so.30.0.1     os-prober            tc
binfmt.d               gnome-shell                           libmfhdfalt.so.0      os-probes            terminfo
bluetooth              gnupg                                 libmfhdfalt.so.0.0.0  os-release           thunderbird
brltty                 gnupg2                                libogdi.so.4          pam.d                thunderbird-addons
byobu                  gold-ld                               libogdi.so.4.1        pcmciautils          tmpfiles.d
cgi-bin                groff                                 libreoffice           php                  ubiquity
cnf-update-db          grub                                  libvpf.so.4           pkgconfig            ubuntu-advantage
command-not-found      grub-legacy                           libvpf.so.4.1         pm-utils             ubuntu-release-upgrader
compat-ld              gvfs                                  linux                 policykit-1          udev
console-setup          hdparm                                linux-boot-probes     polkit-1             udisks2
cpp                    hollywood                             linux-sound-base      pppd                 ufw
crda                   i386-linux-gnu                        locale                pulse-15.99.1+dfsg1  unity-settings-daemon-1.0
cups                   indicators3                           lp_solve              python2.7            update-notifier
dbus-1.0               init                                  lsb                   python3              usrmerge
debug                  initramfs-tools                       man-db                python3.10           valgrind
dpkg                   ispell                                mecab                 python3.11           virtualbox
elogind                jayatana                              memtest86+            python3.8            wine
emacs                  jvm                                   mime                  recovery-mode        wine-development
emacsen-common         kernel                                modprobe.d            rhythmbox            X11
environment.d          klibc                                 modules               rsyslog              x86_64-linux-gnu
evolution-data-server  klibc-K8e6DOmVI9JpyGMLR7qNe5iZeBk.so  modules-load.d        sasl2                xorg
file                   ld-linux.so.2                         mysql                 sftp-server          xserver-xorg-video-intel
firewalld              libarmadillo.so.10                    netplan               shim
firmware               libarmadillo.so.10.8.2                networkd-dispatcher   snapd
galera                 libcpufreq.so.0                       NetworkManager        software-properties
muthukumar@DevOpsEngineer:/lib$ 

  1. /media and /mnt: These directories are used as mount points for removable media (such as USB drives) and manually mounted file systems, respectively. Example:
muthukumar@DevOpsEngineer:/$ cd /media
muthukumar@DevOpsEngineer:/media$ ls
muthukumar
muthukumar@DevOpsEngineer:/media$ 

  1. /opt: The /opt directory is used for installing additional software packages from third-party vendors. Each application typically has its own subdirectory here. Example:
muthukumar@DevOpsEngineer:/$ cd /opt
muthukumar@DevOpsEngineer:/opt$ ls
google
muthukumar@DevOpsEngineer:/opt$ cd google/
muthukumar@DevOpsEngineer:/opt/google$ ls
chrome
muthukumar@DevOpsEngineer:/opt/google$ cd chrome/
muthukumar@DevOpsEngineer:/opt/google/chrome$ ls
chrome                     default-app-block                  libqt5_shim.so        nacl_helper_bootstrap  product_logo_32.xpm      xdg-mime
chrome_100_percent.pak     default_apps                       libqt6_shim.so        nacl_irt_x86_64.nexe   product_logo_48.png      xdg-settings
chrome_200_percent.pak     google-chrome                      libvk_swiftshader.so  product_logo_128.png   product_logo_64.png
chrome_crashpad_handler    icudtl.dat                         libvulkan.so.1        product_logo_16.png    resources.pak
chrome-management-service  libEGL.so                          locales               product_logo_24.png    v8_context_snapshot.bin
chrome-sandbox             libGLESv2.so                       MEIPreload            product_logo_256.png   vk_swiftshader_icd.json
cron                       liboptimization_guide_internal.so  nacl_helper           product_logo_32.png    WidevineCdm
muthukumar@DevOpsEngineer:/opt/google/chrome$ 
  1. /proc: The /proc directory is a virtual file system that provides information about running processes and system configuration as files that can be read. Example:
muthukumar@DevOpsEngineer:~$ cd /proc
muthukumar@DevOpsEngineer:/proc$ ls
1      1132   14182  16015  173   2322  2556  2792  2869  3335  50    53    67   759  87          diskstats      locks          sysvipc
10     1154   1452   16016  1757  241   2557  28    29    3338  502   5379  69   76   88          dma            mdstat         thread-self
100    1172   15     16031  19    242   2562  2806  2932  34    503   545   7    761  89          driver         meminfo        timer_list
101    118    153    16037  198   2435  2566  281   2934  35    51    55    70   762  90          dynamic_debug  misc           tty
1013   1185   15320  16101  2     2436  2567  2818  2940  360   514   554   71   765  91          execdomains    modules        uptime
1018   1187   15377  16102  20    2442  2580  2820  2949  37    5155  556   713  77   92          fb             mounts         version
102    1188   154    16203  201   2444  2592  2835  2950  38    5160  56    714  776  920         filesystems    mtd            version_signature
1027   1189   15436  16220  202   2458  26    2836  2951  39    5161  569   719  78   948         fs             mtrr           vmallocinfo
1028   1190   15464  16321  204   2459  2618  2838  2963  4     5163  57    722  783  98          interrupts     net            vmstat
103    12     155    16385  205   2465  2628  2840  2973  40    5165  58    724  79   99          iomem          pagetypeinfo   zoneinfo
10430  12042  15537  16409  206   2466  2643  2841  2977  41    5171  59    725  8    acpi        ioports        partitions
1046   13     156    16460  2061  2467  2649  2842  3     422   5172  6     73   80   asound      irq            pressure
1080   13064  15622  16516  207   2477  2659  2843  3039  43    5173  61    730  802  bootconfig  kallsyms       schedstat
11     13141  157    16529  208   2479  2676  2845  31    44    5176  62    734  81   buddyinfo   kcore          scsi
1108   1354   15729  16556  209   2488  2684  2848  3133  45    5187  63    738  83   bus         keys           self
111    1357   15732  16562  21    2499  2686  2854  3151  458   52    633   74   832  cgroups     key-users      slabinfo
1120   13639  15772  16619  210   25    27    2855  3171  46    5207  634   740  833  cmdline     kmsg           softirqs
1126   13834  15776  16649  211   2508  2764  2856  3192  47    5241  635   742  84   consoles    kpagecgroup    stat
1127   13852  16     16692  22    2511  2770  2857  32    4891  5259  636   749  85   cpuinfo     kpagecount     swaps
113    14     16008  16694  2226  2518  2776  2862  3244  49    5261  64    75   86   crypto      kpageflags     sys
1130   140    16014  17     23    2534  2781  2864  33    5     5271  65    753  860  devices     loadavg        sysrq-trigger
muthukumar@DevOpsEngineer:/proc$ 

  1. /root: This is the home directory for the root user, the system administrator. TO BE DISCUSED Example:
muthukumar@DevOpsEngineer:/$ cd /root
bash: cd: /root: Permission denied
muthukumar@DevOpsEngineer:/$ sudo -i
[sudo] password for muthukumar: 
root@DevOpsEngineer:~# cd /root
root@DevOpsEngineer:~# 
  1. /run: This directory stores temporary runtime files and data that are lost between reboots but are necessary for the current boot session. Example:
muthukumar@DevOpsEngineer:/$ cd /run
muthukumar@DevOpsEngineer:/run$ ls
acpid.pid      blkid          firewalld   log             openvpn-client   shm                sshd.pid    udisks2
acpid.socket   console-setup  gdm3        motd.d          openvpn-server   snapd              sudo        unattended-upgrades.lock
alsa           credentials    gdm3.pid    mount           pacct_shadow.d   snapd-snap.socket  systemd     unattended-upgrades.progress
apache2        crond.pid      initctl     mysqld          pacct_source     snapd.socket       thermald    user
atd.pid        crond.reboot   initramfs   netns           php              speech-dispatcher  tlp         utmp
atopacctd.pid  cups           irqbalance  NetworkManager  plymouth         spice-vdagentd     tmpfiles.d  uuidd
avahi-daemon   dbus           lock        openvpn         sendsigs.omit.d  sshd               udev        wpa_supplicant
muthukumar@DevOpsEngineer:/run$ 

  1. /sbin: Similar to /bin, this directory contains system binaries, but these binaries are usually reserved for system administrators and require elevated privileges. Example:
muthukumar@DevOpsEngineer:/$ cd /sbin
muthukumar@DevOpsEngineer:/sbin$ ls
a2disconf              depmod                 ip6tables                    mount.fuse3                slattach
a2dismod               devlink                ip6tables-apply              mount.lowntfs-3g           spice-vdagentd
a2dissite              dhclient               ip6tables-legacy             mount.ntfs                 split-logfile
a2enconf               dhclient-script        ip6tables-legacy-restore     mount.ntfs-3g              sshd
a2enmod                dmidecode              ip6tables-legacy-save        mysqld                     start-stop-daemon
a2ensite               dmsetup                ip6tables-nft                nameif                     sudo_logsrvd
a2query                dmstats                ip6tables-nft-restore        netExtender                sudo_sendlog
aa-remove-unknown      dnsmasq                ip6tables-nft-save           netplan                    sulogin
aa-status              dosfsck                ip6tables-restore            NetworkManager             swaplabel
aa-teardown            dosfslabel             ip6tables-restore-translate  newusers                   swapoff
accessdb               dpkg-preconfigure      ip6tables-save               nfnl_osf                   swapon
acpid                  dpkg-reconfigure       ip6tables-translate          nft                        switch_root
addgnupghome           dumpe2fs               ipmaddr                      nologin                    sysctl
addgroup               e2freefrag             ippeveprinter                ntfsclone                  tarcat
add-shell              e2fsck                 ipp-usb                      ntfscp                     tc
adduser                e2image                ipset                        ntfslabel                  telinit
agetty                 e2label                ipset-translate              ntfsresize                 thermald
alsa                   e2mmpstatus            iptables                     ntfsundelete               tipc
alsabat-test           e2scrub                iptables-apply               nxMonitor                  tlp
alsactl                e2scrub_all            iptables-legacy              on_ac_power                tune2fs
alsa-info              e2undo                 iptables-legacy-restore      openvpn                    tzconfig
anacron                e4crypt                iptables-legacy-save         ownership                  u-d-c-print-pci-ids
apache2                e4defrag               iptables-nft                 pam-auth-update            ufw
apache2ctl             ebtables               iptables-nft-restore         pam_extrausers_chkpwd      umount.udisks2
apachectl              ebtables-nft           iptables-nft-save            pam_extrausers_update      uninstallNetExtender
apparmor_parser        ebtables-nft-restore   iptables-restore             pam_getenv                 unix_chkpwd
apparmor_status        ebtables-nft-save      iptables-restore-translate   pam_timestamp_check        unix_update
applygnupgdefaults     ebtables-restore       iptables-save                paperconfig                update-ca-certificates
aptd                   ebtables-save          iptables-translate           parted                     update-catalog
arp                    ethtool                iptunnel                     partprobe                  update-cracklib
arpd                   faillock               irqbalance                   pccardctl                  updatedb.plocate
arptables              fatlabel               irqbalance-ui                phpdismod                  update-default-aspell
arptables-nft          fdisk                  isosize                      phpenmod                   update-default-ispell
arptables-nft-restore  filefrag               ispell-autobuildhash         php-fpm7.4                 update-default-wordlist
arptables-nft-save     findfs                 iucode-tool                  php-fpm8.2                 update-dictcommon-aspell
arptables-restore      firewalld              iucode_tool                  phpquery                   update-dictcommon-hunspell
arptables-save         fixparts               iw                           pivot_root                 update-fonts-alias
aspell-autobuildhash   fsck                   iwconfig                     plipconfig                 update-fonts-dir
atd                    fsck.cramfs            iwevent                      plocate-build              update-fonts-scale
atopacctd              fsck.ext2              iwgetid                      plymouthd                  update-grub
avahi-autoipd          fsck.ext3              iwlist                       poweroff                   update-grub2
avahi-daemon           fsck.ext4              iwpriv                       pppd                       update-grub-gfxpayload
badblocks              fsck.fat               iwspy                        pppdump                    update-gsfontmap
biosdecode             fsck.minix             kbdrate                      pppoe-discovery            update-icon-caches
blkdeactivate          fsck.msdos             kerneloops                   pppstats                   update-inetd
blkdiscard             fsck.vfat              killall5                     pptp                       update-info-dir
blkid                  fsfreeze               ldattach                     pptpsetup                  update-initramfs
blkzone                fstab-decode           ldconfig                     pwck                       update-java-alternatives
blockdev               fstrim                 ldconfig.real                pwconv                     update-locale
bluetoothd             gdisk                  locale-gen                   pwunconv                   update-mime
bridge                 gdm3                   logrotate                    rarp                       update-passwd
brltty                 genl                   logsave                      rcvboxautostart-service    update-pciids
brltty-setup           getcap                 losetup                      rcvboxballoonctrl-service  update-rc.d
capsh                  getpcaps               lpadmin                      rcvboxdrv                  update-secureboot-policy
cfdisk                 getty                  lpc                          rcvboxweb-service          update-shells
cgdisk                 getweb                 lpinfo                       readprofile                update-xmlcatalog
chat                   gnome-menus-blacklist  lpmove                       reboot                     upgrade-from-grub-legacy
chcpu                  groupadd               lsmod                        remove-default-ispell      usb_modeswitch
check_forensic         groupdel               lspcmcia                     remove-default-wordlist    usb_modeswitch_dispatcher
chgpasswd              groupmems              make-ssl-cert                remove-shell               usbmuxd
chmem                  groupmod               mariadbd                     resize2fs                  useradd
chpasswd               grpck                  mii-tool                     rfkill                     userdel
chroot                 grpconv                mkdosfs                      rmmod                      usermod
cpgr                   grpunconv              mke2fs                       rmt                        uuidd
cppw                   grub-bios-setup        mkfs                         rmt-tar                    validlocale
cracklib-check         grub-install           mkfs.bfs                     route                      vboxconfig
cracklib-format        grub-macbless          mkfs.cramfs                  rsyslogd                   vcstime
cracklib-packer        grub-mkconfig          mkfs.ext2                    rtacct                     vdpa
cracklib-unpacker      grub-mkdevicemap       mkfs.ext3                    rtcwake                    vigr
create-cracklib-dict   grub-probe             mkfs.ext4                    rtkitctl                   vipw
cron                   grub-reboot            mkfs.fat                     rtmon                      visudo
ctrlaltdel             grub-set-default       mkfs.minix                   runlevel                   vpddecode
cupsaccept             halt                   mkfs.msdos                   runuser                    wipefs
cups-browsed           hdparm                 mkfs.ntfs                    saned                      wpa_action
cupsctl                httxt2dbm              mkfs.vfat                    select-default-ispell      wpa_cli
cupsd                  hwclock                mkhomedir_helper             select-default-wordlist    wpa_supplicant
cupsdisable            iconvconfig            mkinitramfs                  service                    xtables-legacy-multi
cupsenable             ifconfig               mklost+found                 setcap                     xtables-monitor
cupsfilter             init                   mkntfs                       setvesablank               xtables-nft-multi
cupsreject             insmod                 mkswap                       setvtrgb                   zic
dcb                    installkernel          ModemManager                 sfdisk                     zramctl
debugfs                install-sgmlcatalog    modinfo                      sgdisk
delgroup               invoke-rc.d            modprobe                     shadowconfig
deluser                ip                     mount.fuse                   shutdown
muthukumar@DevOpsEngineer:/sbin$ 


  1. /srv: The /srv directory is used to store data for services provided by the system. Example:
muthukumar@DevOpsEngineer:/$ cd /srv
muthukumar@DevOpsEngineer:/srv$ ls
www
muthukumar@DevOpsEngineer:/srv$ cd www/
muthukumar@DevOpsEngineer:/srv/www$ ls
wordpress
muthukumar@DevOpsEngineer:/srv/www$ cd wordpress/
muthukumar@DevOpsEngineer:/srv/www/wordpress$ ls
index.php    wp-activate.php     wp-comments-post.php  wp-cron.php        wp-load.php   wp-settings.php   xmlrpc.php
license.txt  wp-admin            wp-config-sample.php  wp-includes        wp-login.php  wp-signup.php
readme.html  wp-blog-header.php  wp-content            wp-links-opml.php  wp-mail.php   wp-trackback.php
muthukumar@DevOpsEngineer:/srv/www/wordpress$ 

  1. /sys: Like /proc, the /sys directory is a virtual file system that exposes information about the kernel and its configuration. Example:
muthukumar@DevOpsEngineer:/$ cd /sys
muthukumar@DevOpsEngineer:/sys$ ls
block  bus  class  dev  devices  firmware  fs  hypervisor  kernel  module  power
muthukumar@DevOpsEngineer:/sys$ 

  1. /tmp: The /tmp directory is used for temporary files that are generally deleted when the system is rebooted. Example:
muthukumar@DevOpsEngineer:/$ cd /tmp
muthukumar@DevOpsEngineer:/tmp$ ls
hsperfdata_jenkins
jetty-0_0_0_0-8080-war-_-any-2413304685969546829
snap-private-tmp
systemd-private-4e78d68aaa7c47459d5bc2c04eb24aed-apache2.service-ympSEk
systemd-private-4e78d68aaa7c47459d5bc2c04eb24aed-bluetooth.service-EbVrQI
systemd-private-4e78d68aaa7c47459d5bc2c04eb24aed-colord.service-gZEWqY
systemd-private-4e78d68aaa7c47459d5bc2c04eb24aed-ModemManager.service-aDZv6v
systemd-private-4e78d68aaa7c47459d5bc2c04eb24aed-power-profiles-daemon.service-DNl3sb
systemd-private-4e78d68aaa7c47459d5bc2c04eb24aed-switcheroo-control.service-Z7vcT1
systemd-private-4e78d68aaa7c47459d5bc2c04eb24aed-systemd-logind.service-e0dh7L
systemd-private-4e78d68aaa7c47459d5bc2c04eb24aed-systemd-oomd.service-gPBztj
systemd-private-4e78d68aaa7c47459d5bc2c04eb24aed-systemd-resolved.service-1vv2yF
systemd-private-4e78d68aaa7c47459d5bc2c04eb24aed-systemd-timesyncd.service-tqPHar
systemd-private-4e78d68aaa7c47459d5bc2c04eb24aed-upower.service-EMYrw9
tracker-extract-3-files.1000
tracker-extract-3-files.128
winstone2819621653252770590.jar
muthukumar@DevOpsEngineer:/tmp$ 

  1. /usr: The /usr directory contains user-specific data and programs. It's typically read-only during normal system operation. Example:
muthukumar@DevOpsEngineer:/$ cd /usr
muthukumar@DevOpsEngineer:/usr$ ls
bin  games  i686-w64-mingw32  include  lib  lib32  lib64  libexec  libx32  local  sbin  share  src  x86_64-w64-mingw32
muthukumar@DevOpsEngineer:/usr$ 


  1. /var: This directory contains variable data, including logs, spool files, and other files that change frequently during system operation. Example:
muthukumar@DevOpsEngineer:/$ cd /var
muthukumar@DevOpsEngineer:/var$ ls
backups  cache  crash  lib  local  lock  log  mail  metrics  opt  run  snap  spool  tmp  www
muthukumar@DevOpsEngineer:/var$ 

These are some of the core directories in the Linux file system. The structure helps maintain a separation between system files, user files, and temporary data, contributing to the stability and organization of the operating system. Keep in mind that while this overview provides a general understanding, the exact layout can vary slightly between different Linux distributions.

Install PHP on Ubuntu using the terminal

17 August 2023 at 10:47

To install PHP on Ubuntu using the terminal, you can follow these steps:

  1. Update Package List: It's a good practice to start by updating your package list to make sure you're installing the latest version of PHP available in your repositories.
   sudo apt update
  1. Install PHP: You can install PHP along with commonly used extensions by running the following command:
   sudo apt install php
  1. Install Additional PHP Extensions (Optional): Depending on your project's requirements, you might need additional PHP extensions. You can search for available extensions using the following command:
   sudo apt search php- | grep '^php-'

Then, install the desired extension(s) using a command like:

   sudo apt install php-extension-name
  1. Check PHP Version: After installation, you can check the installed PHP version using:
   php -v
  1. Restart Web Server (if applicable): If you're planning to use PHP with a web server like Apache or Nginx, you'll need to restart the server to apply the changes.

For Apache:

   sudo systemctl restart apache2

For Nginx:

   sudo systemctl restart nginx

That's it! PHP should now be installed on your Ubuntu system. You can test it by creating a simple PHP file and running it through a web server, or you can use the built-in PHP CLI (Command Line Interface) to execute PHP scripts directly from the terminal.

I apologize for any confusion. The "php-extension-name" in my previous response was a placeholder for the actual name of the PHP extension you want to install. Let me clarify:

When installing PHP extensions on Ubuntu, you need to provide the correct package name for the extension you want to install. Here's how you can search for available PHP extensions and install them:

  1. Search for Available PHP Extensions: To find available PHP extensions, you can use the apt search command followed by "php-" as a prefix. This will list all the available PHP-related packages.
   sudo apt search php-
  1. Install the Desired PHP Extension: Once you've identified the extension you want to install from the search results, use the sudo apt install command to install it. Replace php-extension-name with the actual name of the extension.
   sudo apt install php-extension-name

For example, if you want to install the GD extension for image manipulation, the command would be:

sudo apt install php7.4-gd  # Replace "7.4" with your PHP version

Please replace php7.4-gd with the actual name of the extension you want to install. If you're unsure about the correct package name, you can refer to the search results from the apt search command.

Remember to adapt the version number (like "7.4") to the version of PHP you have installed on your system. If you're not sure about the PHP version, you can check it using the php -v command.

Install WordPress on Ubuntu using the terminal

17 August 2023 at 10:09

To install WordPress on Ubuntu using the terminal, you can follow these steps. This guide assumes you have a LAMP (Linux, Apache, MySQL, PHP) stack already set up on your Ubuntu server. If not, you'll need to set up the LAMP stack first.

Here's how you can install WordPress:

  1. Update and Upgrade Packages: Open a terminal and update the package list and upgrade existing packages:
   sudo apt update
   sudo apt upgrade
  1. Install Additional Packages: Install the required packages for WordPress:
   sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip
  1. Create a MySQL Database and User: Log into MySQL and create a database and user for WordPress:
   sudo mysql
   CREATE DATABASE wordpress;
   CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'password';
   GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost';
   FLUSH PRIVILEGES;
   EXIT;
  1. Download and Configure WordPress: Navigate to your web server's root directory (usually /var/www/html):
   cd /var/www/html

Download the latest WordPress package:

   sudo wget https://wordpress.org/latest.tar.gz

Extract the archive:

   sudo tar -xzvf latest.tar.gz

Rename the WordPress directory:

   sudo mv wordpress your-site-name

Set ownership and permissions:

   sudo chown -R www-data:www-data your-site-name
   sudo chmod -R 755 your-site-name
  1. Configure WordPress: Copy the sample configuration file:
   cd your-site-name
   sudo cp wp-config-sample.php wp-config.php

Edit the configuration file:

   sudo nano wp-config.php

Set the database details you created earlier:

   define('DB_NAME', 'wordpress');
   define('DB_USER', 'wordpressuser');
   define('DB_PASSWORD', 'password');

Save and close the file (Ctrl+O to save, Ctrl+X to exit).

  1. Access WordPress Installation: Open a web browser and navigate to your server's IP address or domain followed by /your-site-name (e.g., http://your_server_ip/your-site-name).

Follow the WordPress installation wizard to complete the setup.

  1. Complete the Installation:
    Provide the site title, admin username, password, and email address.

  2. Access the WordPress Admin Dashboard:
    Once the installation is complete, you can access the WordPress admin dashboard by going to http://your_server_ip/your-site-name/wp-admin.

That's it! You've successfully installed WordPress on your Ubuntu server using the terminal. Remember to configure any additional settings and security measures as needed.

14 MB log file and you want to split it into multiple 5 MB files using Linux commands

17 August 2023 at 10:07

If you have a 14 MB log file and you want to split it into multiple 5 MB files using Linux commands, you can use the split command. Here's how you can do it:

split -b 5M yourlogfile.log prefix_

In this command:

  • split is the command used to split files.
  • -b 5M specifies that you want to split the file into chunks of 5 MB each.
  • yourlogfile.log is the name of the input log file you want to split.
  • prefix_ is the prefix you want to use for the output files. The command will generate files named prefix_aa, prefix_ab, and so on.

After running this command, your log file will be split into multiple 5 MB files with the specified prefix. If you have a total of 14 MB of data, you will get three files: prefix_aa (5 MB), prefix_ab (5 MB), and prefix_ac (4 MB). The last file will be smaller if the input file size is not evenly divisible by 5 MB.

Install Drupal on Ubuntu using the terminal

17 August 2023 at 09:24

To install Drupal on Ubuntu using the terminal, you can follow these steps:

  1. Update System Packages: Open a terminal and update the package list to ensure you have the latest information about available packages.
   sudo apt update
  1. Install Apache Web Server: Install the Apache web server using the following command:
   sudo apt install apache2
  1. Install MySQL Database Server: Install MySQL server for your Drupal installation:
   sudo apt install mysql-server

During the installation, you'll be prompted to set a root password for MySQL.

  1. Install PHP and Required Extensions: Install PHP and the required extensions for Drupal:
   sudo apt install php libapache2-mod-php php-mysql php-gd php-xml php-mbstring php-ldap php-xmlrpc php-curl
  1. Create a MySQL Database for Drupal: Log into MySQL as the root user:
   sudo mysql -u root -p

Enter the MySQL root password, then create a database, user, and grant privileges to the user:

   CREATE DATABASE drupaldb;
   CREATE USER 'drupaluser'@'localhost' IDENTIFIED BY 'your_password';
   GRANT ALL ON drupaldb.* TO 'drupaluser'@'localhost';
   FLUSH PRIVILEGES;
   EXIT;
  1. Download and Extract Drupal: Navigate to your Apache web root directory:
   cd /var/www/html

Download the latest Drupal package:

   sudo wget https://www.drupal.org/download-latest/tar.gz -O drupal.tar.gz

Extract the archive:

   sudo tar -xzvf drupal.tar.gz

Rename the extracted folder to something cleaner (e.g., drupal):

   sudo mv drupal-x.y.z drupal
  1. Adjust Permissions: Set proper permissions for Drupal to access its files:
   sudo chown -R www-data:www-data drupal
  1. Configure Apache: Create a new virtual host configuration file:
   sudo nano /etc/apache2/sites-available/drupal.conf

Add the following configuration, adjusting paths and domains as needed:

   <VirtualHost *:80>
       ServerAdmin admin@example.com
       DocumentRoot /var/www/html/drupal
       ServerName your_domain.com

       <Directory /var/www/html/drupal/>
           Options Indexes FollowSymLinks
           AllowOverride All
           Require all granted
       </Directory>

       ErrorLog ${APACHE_LOG_DIR}/error.log
       CustomLog ${APACHE_LOG_DIR}/access.log combined
   </VirtualHost>

Enable the virtual host and Apache modules:

   sudo a2ensite drupal
   sudo a2enmod rewrite

Restart Apache to apply the changes:

   sudo systemctl restart apache2
  1. Drupal Installation: Open a web browser and visit http://your_domain.com. Follow the on-screen instructions to complete the Drupal installation.

Remember to replace your_domain.com with your actual domain name and adjust other settings according to your needs. This guide assumes a basic setup; you might need to adjust some details based on your specific environment and security requirements.

Try it Yourself:

❌
❌