Category Archives: Ubuntu

Enabling SSH (https) for Apache 2 in Ubuntu/Mint/Possibly other Debian distro

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051# Intall apache $ sudo apt-get install apache2   # Enable SSL module $ sudo a2enmod ssl # Restart Apache $ sudo service apache2 restart # Create a directory to store the SSLCertificateFile and SSLCertificateKeyFile $ mkdir  /etc/apache2/ssl # Generate … Continue reading

Posted in Linux, Ubuntu, Web Development | Leave a comment

Adding New VirtualHost in Apache2

On linux Ubuntu 1. If your apache has /etc/apache2/sites-available directory then just create a new file “dev.newwebsite.com.conf” with the following content: 12345678910111213<VirtualHost *:80>     ServerName dev.newwebsite.com     DocumentRoot "/var/www/www.newwebsite.com"     # Error handlers     ErrorDocument 500 … Continue reading

Posted in Operating System, php, Ubuntu | Leave a comment

Benchmark How Long a Program Runs In Linux Using Bash

The following bash code might come in handy if you want to benchmark how long a program runs. The example assumes you want to pass two parameters along to the program. A timestamp is captured at the start and end … Continue reading

Posted in Linux, Operating System, Ubuntu | Leave a comment

Auto Login Using SSH Public and Private Keys

2026 update: This post originally used ssh-keygen -t rsa. The current recommendation (e.g. GitHub’s SSH key guide) is Ed25519 — it produces shorter keys, is faster, and is considered more secure. Use RSA (4096-bit) only as a fallback for systems … Continue reading

Posted in Linux, Operating System, Ubuntu | Leave a comment

Linux symlinks: creating, deleting, and the gotchas worth knowing

The basic command for creating a symbolic link (a “symlink” or “soft link”) to a folder or file is ln -s: 12345678ln -s /home/ronald/somefolder /home/ronald/newfolder # or if your current directory is already /home/ronald: cd /home/ronald ln -s somefolder newfolder … Continue reading

Posted in Linux, Operating System, Ubuntu | Leave a comment

A Linux primer: identifying your distro and other commands that work everywhere

Here are a few commands you can use to find out which Linux distribution you’re on — pick whichever your system has: 1234567cat /etc/issue cat /proc/version dmesg | head -1 cat /etc/*-release Of those, cat /etc/*-release is the most reliable … Continue reading

Posted in Linux, Operating System, Ubuntu | Leave a comment

How to Set up an FTP Server in Ubuntu Linux

Login to your Linux shell menu as root 12[root@locahost]# apt-get install vsftpd [root@locahost]# vim /etc/vsftpd.conf At VIM, 1st comment out anonymous_enable by adding a # sign at the beginning of the line # anonymous_enable=YES 2nd remove comment at local enable … Continue reading

Posted in Linux, Operating System, Ubuntu | Leave a comment

Adding color to your tail

Tail is a very useful tool for monitoring an error stream. Sometimes the output from tail can have too much information, and its black-and-white monotone output can be hard to follow with the eyes. The basic: a Linux terminal has … Continue reading

Posted in Linux, Operating System, Ubuntu | Leave a comment

Fix Microsoft Mouse in Linux Ubuntu

123456789101112nano /etc/X11/xorg.conf Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" # Option "Device" "/dev/input/mice" Option "Protocol" "ExplorerPS/2" Option "Emulate3Buttons" "false" Option "ZAxisMapping" "4 5" Option "ButtonMapping" "1 2 3 6 7" EndSection

Posted in Linux, Operating System, Ubuntu | Leave a comment

Colorize Linux Shell Menu

Do you ever feel like you’re going blind because the prompt text color and the result text color are the same? Here’s how to colorize your shell prompt. Open your favorite text editor (vim or nano), edit your ~/.bashrc, and … Continue reading

Posted in Linux, Operating System, Ubuntu | Leave a comment