Blog
- Home
- Blog
This article covers how to use the Sed command on Ubuntu 20.04. Searching and replacing a string of text in a file with the Sed command isn't complicated as you imagine.
sed is a stream editor. It can perform basic text manipulation on files and input streams such as pipelines.
With sed, you can search, find and replace, insert, and delete words and lines.
It supports basic and extended regular expressions that allow you to match complex patterns.
To Find and replace text within a file using sed command:
The procedure to change the text in files under Linux/Unix using sed:
1. Use Stream EDitor (sed) as follows:
$ sed -i 's/old-text/new-text/g' input.txt
2. The s is the substitute command of sed for find and replace
3. It tells sed to find all occurrences of 'old-text' and replace with 'new-text' in a file named input.txt
4. Verify that file has been updated:
more input.txt
This article covers how to install Cockpit on Ubuntu 20.04 system. Cockpit is a free and open source web console tool for Linux administrators and used for day to day administrative and operations tasks.
To Install the Cockpit package on Ubuntu 20.04 LTS Server, run the command:
$ sudo apt update
$ sudo apt install cockpit -y
Once cockpit package is installed successfully then start its service using the following systemctl command,
$ sudo systemctl start cockpit
Run the following to verify the status of cockpit service,
$ sudo systemctl status cockpit
Features of Cockpit:
Cockpit allows you to perform:
1. Service Management – Start, stop, restart, reload, disable, enable, mask e.t.c
2. User Account Management – Add users, delete, Lock, assign Administrator role, set password, force password change, Add Public SSH keys e.t.c.
3. Firewall Management
4. Cockpit Container management
5. SELinux Policy management
6. Journal v2
7. iSCSI Initiator configurations
8. SOS-reporting
9. NFS Client setup
10. Configure OpenConnect VPN Server
11. Privileged Actions – Shutdown, Restart system
12. Join Machine to Domain
13. Hardware Device Management
14. System Updates for dnf, yum, apt hosts
15. Manage the Kubernetes Node
This article covers how to install XAMPP on your CentOS system. XAMPP is an easy to install and use Apache distribution packaged with MariaDB, PHP, and Perl.
XAMPP was first developed by a project team called Apache Friends. As an open-source Apache distribution of a PHP development environment, it consists of cross-platform software (X): Apache (A), MariaDB (M), PHP (P) and Perl (P).
To install XAMPP on CentOS 8 Linux system:
1. Update system
Ensure your CentOS system is updated.
$ sudo dnf -y update
$ sudo dnf -y install libnsl
2. Download XAMPP on CentOS 8
Install wget on CentOS 8:
$ sudo dnf -y install wget
Download XAMPP installer. Choose the installer matching the PHP version you want to have.
### PHP 8.0 ###
$ wget https://www.apachefriends.org/xampp-files/8.0.1/xampp-linux-x64-8.0.1-0-installer.run
### PHP 7.4 ###
$ wget https://www.apachefriends.org/xampp-files/7.4.14/xampp-linux-x64-7.4.14-0-installer.run
### PHP 7.3 ###
$ wget https://www.apachefriends.org/xampp-files/7.3.26/xampp-linux-x64-7.3.26-0-installer.run
3. The binary installer should be executable.
### PHP 8.0 ###
$ chmod a+x xampp-linux-x64-8.0.1-0-installer.run
### PHP 7.4 ###
$ chmod a+x xampp-linux-x64-7.4.14-0-installer.run
### PHP 7.3 ###
$ chmod a+x xampp-linux-x64-7.3.26-0-installer.run
4. Then run the XAMP installer:
### PHP 8.0 ###
$ sudo ./xampp-linux-x64-8.0.1-0-installer.run
### PHP 7.4 ###
$ sudo ./xampp-linux-x64-7.4.14-0-installer.run
### PHP 7.3 ###
$ sudo ./xampp-linux-x64-7.3.26-0-installer.run
How to Start and use XAMPP on CentOS 8:
XAMPP is installed to /opt/lampp/. To start XAMPP services, run:
$ sudo /opt/lampp/lampp start
To verify installation of XAMPP on CentOS 8 visit the Apache web page:
http://localhost
Stopping and Uninstalling XAMPP on CentOS 8:
To stop XAMPP services run:
$ sudo /opt/lampp/lampp stop
To uninstall XAMPP on CentOS 8, run:
$ cd /opt/lampp
$ sudo ./uninstall
$ sudo rm-rf /opt/lampp
This article covers how to install TeamViewer on Debian 10. TeamViewer is a cross-platform application that can be used for remote control, desktop sharing, online meetings, and file transfer between computers.
To install TeamViewer on Debian:
TeamViewer is proprietary computer software, and it is not included in the default Debian repositories.
TeamViewer maintains its own APT repository from which we’ll install the package, and update it when a new version is available.
1. Download TeamViewer
Open your terminal either by using the Ctrl+Alt+T keyboard shortcut or by clicking on the terminal icon.
Use wget to download the latest TeamViewer .deb package:
$ wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
2. Install TeamViewer
Install the downloaded .deb package by typing the following command:
$ sudo apt install ./teamviewer_amd64.deb
When prompted Do you want to continue? [Y/n], type Y to continue the installation.
This article covers how to install and configure a Git server on Ubuntu. Git is basically a Version control system which allows you to keep track of your software at the source level. With Git, You can easily track changes, revert to previous stages, and branch to create alternate versions of files and directories.
To install Git on Ubuntu Server:
1. Run the following commands as sudo user:
$ sudo apt update && sudo apt install git
2. To install the git package on CentOS servers type:
$ sudo yum install git
3. Next, create a new user that will manage the Git repositories:
$ sudo useradd -r -m -U -d /home/git -s /bin/bash git
The user home directory is set to /home/git.
All the repositories will be stored under this directory.
This article covers how to install Go on your Ubuntu 20.04 machine. Now you can start programming Go language. Go is a popular programming language created by Google.
Many modern applications such as Docker, Kubernetes, and Caddy are written in Go.
To install Go on Ubuntu:
1. Use curl or wget to download the current binary for Go from the official download page. As of this writing, the current version is 1.12.9.
Check the download page for updates, and replace 1.12.9 with the most recent stable version if necessary:
$ curl -O https://storage.googleapis.com/golang/go1.12.9.linux-amd64.tar.gz
Verify the .tar file using sha256sum:
$ sha256sum go1.12.9.linux-amd64.tar.gz
3. Extract the tarball:
$ tar -xvf go1.12.9.linux-amd64.tar.gz
4. Adjust the permissions and move the go directory to /usr/local:
$ sudo chown -R root:root ./go
$ sudo mv go /usr/local