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 handy for those of you who want to benchmark how long does a program runs. In the following example the assumption is that you want to pass along two parameters for your program to … Continue reading

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

Auto Login Using SSH Public and Private Keys

Assume that your main server (the one you use the most) is ServerA. And from ServerA, you want to automatically login to ServerB. For illustration purpose, ServerB can be a repo server and you don’t want to keep being asked … Continue reading

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

Linux Soft Symlink Folder or Directory

$ ln -s /home/rpringad/somefolder /home/rpringad/newfolder #or if your current directory is already /home/rpringad: $ ln -s /home/rpringad/somefolder /home/rpringad/newfolder $ ln -s existingSourceFolder newLinkedFolder

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

How To Know Which Linux Distribution You Are Using?

There are three commands that you can use, pick one of them: 12345cat /etc/issue cat /proc/version dmesg | head -1

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 error stream. Sometime 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: 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? We here is how to colorize your shell menu Open your favorite text editor vim or nano, and add … Continue reading

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