Posts

Install Composer on Ubuntu 21.04

Image
 In this tutorial, How to install and use PHP package manager Composer on Ubuntu 21.04 What is PHP Composer? Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) from https://getcomposer.org/ Install Composer PHP package manager The command below install Composer not just limit Ubuntu, you can use Debian and Other similar Linux systems.the latest version of Composer is not available through from APT ( Ubuntu or Debian) and Yum/DNF for Redhat-based operating systems. We will install it Github repository. Step 1: Install PHP and cURL sudo apt install -y curl unzip php php-curl Step 2: Download Composer on Ubuntu curl -sS https://getcomposer.org/installer -o composer-setup.php  Step 3: Use the PHP to install Composer sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer  Step 4: Check Composer Version composer -V The output terminal below:    How to install packages wi

Manage Packages on RPM Linux Distros With DNF

 In this tutorial, How to install and remove packages on RPM-based Linux Distros with DNF. DNF is the default package manager on Fedora and RHEL. when you run yum command on new Linux distros, it is actually using DNF in the background. Verify command below ls -l /usr/bin/yum The output the yum command is a symbolic link to dnf. Search package with DNF dnf search nginx get more infomation abount a certain package dnf info nginx List all packages installed your system. dnf list installed Installing package use DNF sudo dnf install nginx How to view all the dependencies installed of nginx dnf deplist nginx Uninstall package use DNF sudo dnf remove nginx DNF keeps a record of all transactions that involve installing or removing software packages dnf history Removing Unused Dependencies To remove such dependencies sudo dnf autoremove remove data downloaded along with installed packages. sudo dnf clean packages clean up your software package cache and other metadata that installed packages

Run Multiple Commands in Linux

Image
In this tutorial, How to Run Multiple Commands in Linux at Once. You will executing multiple Linux commands at one. On Linux, there are three ways to run multiple commands in terminal. 1. Using Logical OR (ll) operator The syntax command A || command B if command A runs successfully, command B won't execute. Command B will only execute if command A fails Example: sudo find /tmp -name devopsroles.com || touch huuphan.com The output terminal as below 2. Using the AND (&&) Operator The syntax command A && command B Command A runs successfully, If command B not error. Example: mkdir /tmp/devopsroles && cd /tmp The output terminal as below 3. Using the Semicolon(;) Operator The syntax command A ; command B Command A and command B run executed sequentially  The output terminal as below

How to check CPU in Linux

Image
In today's tutorial, we'll guide you on checking your CPU in a Linux system. Follow these steps: Open the terminal on your Linux system. Type 'lscpu' and press enter to access detailed CPU information. For a quick overview, you can use 'cat /proc/cpuinfo'. If you want real-time CPU usage data, try the 'top' command. Learn about your CPU's architecture, cores, and clock speed. This knowledge helps optimize system performance. Understanding your CPU is key for effective troubleshooting. Armed with this information, you can make informed decisions for a smoother Linux experience. Happy exploring!" Check CPU in Linux  Retrieve CPU details using the 'cat' command. $ cat /proc/cpuinfo View CPU architecture information using the 'lscpu' command. $ lscpu The terminal output is as follows: use cpuid command show x86 CPU $ cpuid display Linux hardware information $ sudo dmidecode processor type Inxi tool command to display Linux system in