Search blog

Sunday, October 22, 2017

Empty/Delete Trash in Ubuntu Using Command Line/Terminal

If you would like to empty your Ubuntu Trash using command line here's how to do it. Open your terminal (CTRL+ALt+T) and enter the command below:

 rm -rf ~/.local/share/Trash/*  

Tuesday, October 10, 2017

[SOLVED] - Allow Other Users to Access Your Localhost Website In Your LAN

Follow the instructions below, if you would like to allow access to your localhost website amongst your peers in the same Local Area Network:

1. First, you may create a Virtual Host for your local website. To learn how to create virtual host in your localhost, you can go through my following tutorials. If you make use of virtual host then you can use local domain name such as http://wordpress.local or http://drupal.local etc. If you do not make use of localhost then
If you aren't using Virtual Host then you will have to use something like http://192.168.1.1:80/path-to-website. Here:
  • 192.168.1.1 is your local ip. Visit this link to find your local ip: https://goo.gl/NT31td
  • 80 is the port number, which is the port number for http, the port that is used to access your website locally and remotely
 2. Once you have created your Virtual Host then your peers will need to update their host file by adding the lines below:

 127.0.0.1     example.local  

where,
  •  127.0.0.1 needs to be replaced with your local ip
  • example.local needs to be replaced with the virtual host you created for your website
To update your host file check the respective link below :

Check Active Port & Port Numbers In Your Localhost-Ubuntu System

If you would like to know the active/open ports, or in networking terms, which ports are listening and their port numbers in your Ubuntu system, open your terminal and enter the following command:

 sudo nmap -sT -O localhost  

Then you should get output as shown in the image below:

Check Active Port & Port Numbers In Your Localhost-Ubuntu System
Click on image to enlarge

For further reading, you may visit the following page: Verifying Which Ports Are Listening

Monday, October 9, 2017

What is Port Fowarding?

While working on WD My Cloud and trying to set up its Cloud Service I had to configure Port Forwarding to enable its Cloud Access service. Unless Port Forwarding was configured, using it's Cloud Service didn't seem to be possible. And that's when I had to research on Port Forwarding. Without setting up Port Forwarding, the connection status displayed at WD's Admin Dashboard was as follows:
"Connected: Relay connection established"

Although, while at college I'd to study subjects such as Data Communication & Computer Networking, where topics such as Port Forwarding etc are covered; since my work doesn't involve Computer Networks I seem to have forgotten the concept.

Anyway here are some wonderful explanation I found related to Port Forwarding.

1. What is Port Forwarding?
Ans:  In simple concept, Port is not a physical connection but its a logical connection that is used by programs and services to exchange information.

Explanation 1:



Explanation 2:



Top 5 Posts (Weekly)