Category: Ubuntu

Installing `mongorestore` on Ubuntu 22.04

When working with MongoDB, the mongorestore utility is an essential tool for restoring databases from BSON dump files. On Ubuntu 22.04, mongorestore is included in the MongoDB Database Tools package, which is distributed separately from the MongoDB server. This guide walks you through the installation process step by step. Step 1: Import the MongoDB Public GPG Key Before adding the MongoDB repository, you need to import its public GPG key:

Step 2: Add the MongoDB APT Repository Add the MongoDB repository to your system’s APT sources:

Step 3: Update the Package List Update the local package index to include the new MongoDB repository:

Step 4: Install the MongoDB Database Tools Install the tools package, which includes mongorestore along with other utilities such as mongodump, mongoimport, and mongoexport:

Step 5: Verify the Installation Confirm that mongorestore is installed and available on your system:

You should see

Read More »

How to Install the PostgreSQL Client on Ubuntu 22.04 and 24.04

Whether you’re managing cloud-hosted databases or working in a containerized environment, the PostgreSQL client is an essential tool for developers, sysadmins, and database engineers alike. This article walks you through installing the PostgreSQL client on Ubuntu 22.04 (Jammy Jellyfish) and Ubuntu 24.04 (Noble Numbat)—two of the most widely used LTS releases. What Is the PostgreSQL Client? The PostgreSQL client includes tools like psql, which allow you to connect to PostgreSQL servers, run SQL queries, perform backups, and administer remote databases. It’s commonly installed on application servers, staging environments, and development machines to interact with databases hosted elsewhere. Which Version Should I Install? Both Ubuntu 22.04 and 24.04 come with a default version of PostgreSQL in their package repositories: Ubuntu Version Default PostgreSQL Client Version 22.04 (Jammy) 14 24.04 (Noble) 16 If you’re fine using the default version, installation is straightforward. If you need a newer or specific version, you can

Read More »

Make vi Work On Ubuntu

Posting this because I always forget and have to goggle for the answer. The default “vi” installed with Ubuntu has terminal emulation problems on both Ubuntu Desktop and through putty. The fix is simple … install “vim” …

Read More »

Dirty Cow Vulnerability (CVE-2016-5195)

On October 19, 2016, a privilege escalation vulnerability in the Linux kernel was disclosed. The bug is nicknamed Dirty COW because the underlying issue was a race condition in the way kernel handles copy-on-write (COW). Dirty COW has existed for a long time — at least since 2007, with kernel version 2.6.22 — so the vast majority of servers are at risk. Exploiting this bug means that a regular, unprivileged user on your server can gain write access to any file they can read, and can therefore increase their privileges on the system. More information can be found on CVE-2016-5195 from Canonical, Red Hat, and Debian. Fortunately, most major distributions have already released a fix. You can follow this tutorial to see if your server is vulnerable and to apply updates as needed. Check Vulnerability Ubuntu/Debian To find out if your server is affected, check your kernel version. uname -rv

Read More »

Fix Completion In Shell On Ubuntu

Sometimes with a new user on Ubuntu I find that filename auto-completion is missing in the shell. I found two issues that cause this: 1. Ubuntu sets new users to /bin/sh which is a very limited shell. So first step is to change the user to /bin/bash:

2. The /etc/bash.bashrc has filename completion disabled by default. Edit this file and un-comment the appropriate lines. Here’s what it looked like on one server:

So I changed to:

Upon login the new user should now have filename completion features. Also note that by default “vi” is handicapped. Here’s how to upgrade to a full feature set: http://blogs.reliablepenguin.com/2013/10/25/fix-vi-ubuntu

Read More »

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.