[How To] Find the current working shell

shell image

Sometimes working from command line might require to know which shell you are currently using. To find out the current working shell, below steps will be helpful: Try below command first: ps -p $$ Output: PID TTY TIME CMD 2248 pts/8 00:00:00 bash Another command which also works on MAC OS and other Linux distributions: echo $0 Output: -bash The ...

Read More »

Linux command to check servers internal, external / public IP address

shell image

While working from shell with no GUI, you may need to check servers internal & external / public IP address. This can be achieved using a simple command as below: To check servers external / public IP address: dig +short myip.opendns.com @resolver1.opendns.com To check servers local IP address: curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/< ...

Read More »

[Solved] SocketException Permission denied - CakePHP

cakephp-logo

CakePHP is a PHP development framework used in many projects. CakePHP supports sending mail via built in mail functions of PHP, smtp server. One may face following error message while sending mail: SocketException Permission denied - CakePHP The issue is related to the SELinux policy of the OS. SELinux forbid PHP/Apache to make network connections. In this case, one has ...

Read More »