Category Archives: Ubuntu

Installing GCC 16.2 on Ubuntu 26.10 and 24.04

GCC 16.2 can be installed directly from the Ubuntu 26.10 repositories. On Ubuntu 24.04, the exact release can instead be built from source alongside the existing GCC 13 installation. This guide puts the package-based installation first, followed by the source build, then shows how to switch GCC and G++ together with update-alternatives for existing CMake projects.

Choose the installation section for your Ubuntu release. Ubuntu 26.04 LTS and Ubuntu 26.10 have different GCC packages: the catalog checked for 26.04 lists a development snapshot, while 26.10 provides GCC 16.2. These are installation instructions; the source-build starting machine has Ubuntu 24.04 on x86-64 and GCC 13.3.0.

(more…)

Cloning a Git Repository over SSH Without a Password on Ubuntu

When I tried to clone a Git repository from my Ubuntu laptop over SSH, the server asked for the git user’s password. I already had an Ed25519 public key on the laptop. Here is how to authorize that key on the server so Git can use it instead of asking for the remote account password.

git clone git@git.developernote.com:~/repositories/tradeclient.git
Cloning into 'tradeclient'...
git@git.developernote.com's password:
(more…)

How to Set Up a Graphical Desktop on Ubuntu 24.04 and Connect from Windows via RDP

This guide explains how to add a graphical desktop to an Ubuntu 24.04 VPS and access it using Windows Remote Desktop. The setup uses XFCE, xrdp, and a regular Linux user. RDP connections travel through an SSH tunnel, with xrdp listening only on localhost.

(more…)

Experimentations with LDAP/SASL on Ubuntu

SASL

I configured Kerberos on Ubuntu 24.04 WSL and was able to run the following command:

export KRB5_TRACE=/dev/stderr
ldapsearch -H ldap://myserver.my.local -Y GSSAPI

that produced the following output:

(more…)

Increasing image size in WordPress

I updated my Ubuntu 24.04 and my WordPress stopped loading images of size 1.3MB and higher.

I fixed this by adding the following:

client_max_body_size 32M;

to Nginx configuration.

(more…)

Nginx TCP proxy with SSL Termination

Obtaining the certificates

Obtain private and public keys from exported pfx file:

openssl pkcs12 -in ldaps.pfx -nocerts -nodes -out ldap.key
openssl pkcs12 -in ldaps.pfx -clcerts -nokeys -out ldap.crt
(more…)

An error occurred when accepting connection in the local socket. Code: 24

Tried the following

sysctl net.core.somaxconn
net.core.somaxconn = 4096
sudo sysctl -w net.core.somaxconn=8192

but without a success.

(more…)

Configuring a TCP proxy with Nginx on Ubuntu 24.04

Install Nginx with stream module:

sudo apt install nginx-full

The output of the command

nginx -V

should contain with-stream=dynamic.

And add the following to /etc/nginx/nginx.conf:

stream {
    server {
        listen 12345;                    # The port that Nginx listens to
        proxy_pass 192.168.0.121:389;    # Where to forward connections
    }
}
(more…)

Exporting and importing WSL distributions

Exporting

In PowerShell:

wsl --export Ubuntu Ubuntu-01.tar

where Ubuntu is the distro name.

Importing

wsl --import UbuntuA C:\Users\dmitriano\wsl\UbuntuA Ubuntu-24.01.tar

probably the folder C:\Users\dmitriano\wsl\UbuntuA should exist.

(more…)

Using lb to measure LDAP performance

Download and install latest Go:

wget https://go.dev/dl/go1.25.1.linux-amd64.tar.gz
tar xf ../distrib/go1.25.1.linux-amd64.tar.gz
realpath go
export GOROOT=/home/dmitriano/dev/tools/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

Install the package:

go install github.com/hamano/lb@latest
(more…)