Linux: See the available disk space

The df command is a useful command that reports the total usage in all mounted filesystems in table format.

The first column shows the name of disk partition, ie, /devdisk1@ and devfs. Other columns normally show the Used Space, Available Space, and Capacity which is the percentage of available space against the used space.

Screen shot 2017 10 23 at 5.18.57 pm

 Basic Linux Commands

There is never a shortage of good cheatsheets specially for Linux

Directory Listing

Gemfile				app				dump.rdb			spec

Directory Listing with hidden files

$ ls -al
total 1376
drwxr-xr-x   49 thorpeobazee  staff    1666 Sep 17 22:33 .
drwxr-xr-x   13 thorpeobazee  staff     442 Sep 17 21:06 ..
-rw-r--r--    1 thorpeobazee  staff     633 Sep  7 08:28 .babelrc
-rw-r--r--    1 thorpeobazee  staff     163 Sep 12 18:19 .eslintrc
drwxr-xr-x   16 thorpeobazee  staff     544 Sep 18 09:44 .git
-rw-r--r--    1 thorpeobazee  staff     736 Sep  7 08:28 .gitignore
drwxr-xr-x    9 thorpeobazee  staff     306 Jun  7 12:05 .idea
-rw-r--r--    1 thorpeobazee  staff      20 Sep  7 08:28 .jshintrc
-rw-r--r--    1 thorpeobazee  staff      30 Jun  5 19:35 .rspec
-rw-r--r--    1 thorpeobazee  staff     898 Jun 16 13:42 .rubocop.yml
-rw-r--r--    1 thorpeobazee  staff      14 Jun  5 19:35 .ruby-gemset
-rw-r--r--    1 thorpeobazee  staff       6 Jun  5 19:35 .ruby-version
drwxr-xr-x    5 thorpeobazee  staff     170 Sep  7 08:28 .storybook
-rw-r--r--    1 thorpeobazee  staff    2515 Sep 12 18:19 Gemfile
-rw-r--r--    1 thorpeobazee  staff   19934 Sep 12 18:19 Gemfile.lock

Change Directory

Changes directory to other_dir

cd other_dir

Show the name of the current working directory

$ pwd

 Installing COMODO Positive SSL on your NGINX server

I just renewed my SSL certificate and have gotten a COMODO Positive SSL certificate from Here’s some instruction to setup up COMODO Positive SSL

CSR Certificate

Your CSR Certificate will contain information about you and your website. This is needed by your provider to generate your crt files

Generate your CRT

You will receive your files through email or the comodo website. Here are what you will receive

  • AddTrustExternalCARoot.crt
  • COMODORSAAddTrustCA.crt
  • COMODORSADomainValidationSecureServerCA.crt
  • your_domain_com.crt

You will need to generate your crt file via the following command

cat your_domain_com.crt COMODORSADomainValidationSecureServerCA.crt  COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > server.crt

Add your certificate location to your server block

server {
    listen 443;

    ssl on;
    ssl_certificate /etc/nginx/ssl/your_domain_com/server.crt;
    ssl_certificate_key /etc/nginx/ssl/your_domain_com/server.key;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;



Screen shot 2016 11 15 at 7.25.15 pm

 How to fix OpenSSL Padding Oracle vulnerability (CVE-2016-2107) on Ubuntu

OpenSSL Padding Oracle vulnerability (CVE-2016-2107) is a memory vulnerability that allows users to run malicious code. It is real simple to update Ubuntu to fix this issue.

Option 1

apt-get install --only-upgrade libssl1.0.0
root@localhost:~# apt-get install --only-upgrade libssl1.0.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libssl1.0.0 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

This will magically be fixed!

Option 2

You will just need to update your Ubuntu by way of

apt-get update -y
Ign trusty InRelease
Get:1 trusty-security InRelease [65.9 kB]     
Get:2 trusty-updates InRelease [65.9 kB]             
Get:3 trusty-backports InRelease [65.9 kB]
Removing debian:spi-cacert-2008.pem
Removing debian:SG_TRUST_SERVICES_RACINE.pem

Check your website through SSL Labs and you will notice a nice A+ instead of an automatic F

Ssllabs cve 2016 2107

Ssllabs cve 2016 2107 fixed