Linux

1) To Open Terminal
CTRL+ALT+T
————————————————————————
2) file permission

sudo chmod -Rf 777 [file_name/folder_name]

 

————————————————————————
3) Copy
CTRL + Shift + C
————————————————————————
4) Paste
CTRL + Shift + V
————————————————————————
5) New Tab
CTRL + Shift + T
————————————————————————
6) ssh Connection
ssh account_name@system_name/address
e.g.: ssh hb@192.168.36.39

ssh -i pemfile.pem user@ip/host
e.g. ssh -i blog.pem ubuntu@192.168.36.1

————————————————————————
7) To view small file
cat [file_name]
————————————————————————
8) To view large file
less [file name]
————————————————————————
9) to quit
q
————————————————————————
10) To create new file or edit existing file
nano [file name]
————————————————————————
11) To write/save file in nano editor
CTRL + O
————————————————————————
12) To exit from nano editor
CTRL + X
————————————————————————
13) To shut down system
init 0;
————————————————————————
14) To restart
init 6;
————————————————————————
15) To kill process from terminal
kill -9 [process id]
————————————————————————
16) View list of files
ls -larth
ls -l
ls
ls -l *.php
ls -l filepattern*
————————————————————————
17) To create copy of file
cp sourcefile newfile
————————————————————————
18) To move/rename file
mv sourcefile newfile
————————————————————————
19) To open file in default editor from windows
select file
CTRL + Enter
————————————————————————
20) Grep Command to search any word or text in files recursively
grep -r ‘text to search’ *
————————————————————————
21) Format Code
Shift + VG
=

————————————————————————-

22) Php Process check:

watch “ps aux | grep php”

————————————————————————-

************************************************************************
********************** VIRTUAL HOST CREATION ************************
************************************************************************
to create virtual host in ubuntu 12.4 above

link for the help->http://ubuntuforums.org/showthread.php?t=2193241

1. Create conf file in /etc/apache2/sites-available:

Code:

 <VirtualHost *:80>
 ServerName local.trial.bp
 DocumentRoot /var/www/html/trial
 DirectoryIndex index.php
 <Directory />
 Options All
 AllowOverride All
 Require all granted
 </Directory>
</VirtualHost>