Linux short cuts

Basic Commands

List files / Show Hidden file / long listing

ls / ls - a / ls -la

Remove/delete Files

rm filename

Display files permissions in number format i.e “0755”

stat -c '%a - %n' *

change directory / home directory / root Directory

cd directory / cd ~ / cd /

Check for installed package

which packagename

Install netstat

apt-get install net-tools

MAMP mysql

/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot


Mysql version

mysql --version

Start Apache – Debian

systemctl start apache2.service

Stop Apache – Debian

systemctl stop apache2.service

Restart Apache – Debian

systemctl restart apache2.service

SSHD is Running

ps aux | grep sshd

Enable virtual host / Disable virtual host

Sudo a2ensite example.com / sudo a2dissite example.com

able / disable mods

sudo a2enmod modname / sudo a2dismod modname