Remove byte-order mark from the beginning of the file

When a file is saved with BOM (byte-order mark) on a Mac or Linux machine Windows PowerShell cannot execute the script. Unfortunately the “cat” command does not show the byte-order mark at the beginning of the file. Some editors show a question mark at the beginning of the file. I have discovered it when I […]

Attach an AWS EBS volume to a Linux server

Format and mount the volume List the available disk devices and their mount points The nvme1n1 volume is not yet mounted Create a partition on the volume List the existing partitions Create a new partition Check the partition list lsblk Detect the new partition with If there is a file system on the partition to […]

DevOps Engineering part 1. (Ubuntu server) – Install the DevOps development tools on Ubuntu server

Ubuntu server does not have a user interface, we will use the terminal to install the DevOps tools. Terraform On your workstation open a web browser and navigate to to get the version of the latest Terraform release. Substitute the x.x.x with the latest version AWS CLI To install AWS CLI with the package […]

Using the Windows Subsystem for Linux (WSL)

Sharing files between Windows Subsystem for Linux and Windows Access the Windows files from Linux Start WSL In the terminal navigate to the /mnt directory The drives are mounted to sub-directories Access the Linux files from Windows Start the WSL application in Windows 10 (in this case with the Ubuntu distro) Open Windows Explorer in […]

Install missing commands on Linux distributions

On some lean systems, mostly in Docker containers, some important commands are not readily available. The table below shows the command to install them. To get the name of the Linux distribution execute To find the package that contains the command, install apt-file Update the file package mapping database Search for the command at the […]

Raw-mode is unavailable courtesy of Hyper-V error in VirtualBox

For VirtualBox to be able to start virtual machines, Hyper-V has to be turned off in Windows 10. If you get the error message when you try to launch a virtual machine in VirtualBox Raw-mode is unavailable courtesy of Hyper-V Check the Hyper-V setting Open a command prompt as an administrator, Execute the command: bcdedit […]

Set up a user to connect to a Linux server with a private-public key pair

To secure a Linux server, disable password authentication on it. This way only those users can connect to it, who have access to an authorized private key. To enable users to connect to a Linux server with a private-public key pair Generate an RSA key pair In a Bash terminal on your workstation execute ssh-keygen Follow […]