How to Run PHP in Linux ( Ubuntu 13.04)

As we all know PHP is Most Popular Scripting Language, Facebook also developed in PHP,  So, why can't Use and Learn Open Source Language in an Open Source Platform Linux.

Well, Before Installing PHP on your LINUX machine, you Need to Install First Apache2
to Install Apache2
Open the Terminal and type the following commands

sudo apt-get update

sudo apt-get install apache2
When Apache Installation Completed Successfully you need to install PHP and PHP support for Apache2

To Install PHP and PHP support of Apache 2.0 on your Linux ( Ubuntu 13.04) . 
Type This Command in the Terminal

sudo apt-get install php5 libapache2-mod-php5

Now, Open the Editor to Type your Code.

sudo gedit/var/www/adityaphp1.php

An Empty GEDIT Editor will Open , Type your Script

For Example :-
 <?php
echo "Hello cyberaditya";
?>

then save this file, Now to run this file open your Favourite Browser and Within the address bar type 

http://localhost/adityaphp1.php
Fork Bomb in Linux
Hello Everyone, today we will Learn about the Fork Bombing,  Fork Bomb is a Denial of Service attack which replicates the CPU Process and Executes the copies of that process and makes system dump.
The Above Diagram Describe the Fork Bomb Architecture , it shows that a Process F is Decomposed into the Copy of F1 and F2, and these get Sub Replicated and this Process Continues until the System is Running.

To Execute the Fork Bomb on your Linux machine, open the terminal and Type these 13 characters 
:(){ :|:& };:

Note :- Try this at your Own Risk 

To Create Fork Bomb in C here is the Code :-

/* Fork Bomb in C 
    www.cyberaditya.in */ 
#include <stdlib.h>
 #include <unistd.h>
 
 int main()
 {
   while(1)
     fork();
 }

Countermeasure to Fork Bomb :-

If your PC is Encountered With Fork Bomb, Open the Terminal and Type the kill Command , this command will Kill the Process which have the bomb name:

killall -KILL processWithBombName
Hello Everyone, Welcome to cyberaditya in this Post we will Understand the ipcalc and sipcalc command in Linux
ipcalc and sipcalc command in Linux (Ubuntu 13.04)

IPCALC

IPCALC is used to calculate the sub-net under the Linux, it is used for retrieving the address information from the interface. IPCALC takes an IP address and net-mask calculates the resulting broadcast By giving a second net-mask  you can design sub- and super networks  It is also intended to be a teaching tool and presents the results as easy to understand binary values.

How to Install IPCALC ?

To install IPCALC open the terminal (ctrl+alt+t), then type this command
sudo apt-get install ipcalc
after the installation type ipcalc in the terminal to display its result.
(snapshot given above display the results)

SIPCALC


Sipcalc is also an ip subnet calculator consisting of two parts. A plain text based console version, and web (cgi) based counterpart. Sipcalc, in it’s simplest form takes an ip-address and a subnet mask on the command-line and outputs information about the subnet. Sipcalc has support for both IPv4 and IPv6 addresses. 

How to Install SIPCALC

To install SIPCALC open the terminal , then type this command

sudo apt-get install sipcalc

After the installation type sipcalc command to display its result. 
Resume Interrupted Download in Linux

Hello Everyone, It may happened with you that you are downloading any File from any down loader and Download Get Interrupted on 60% or more, well its too Frustrating if it can't be resumed, most of the Windows User Uses IDM to download, but if you are a Linux User, you Do not Need Third Party Download Client to download Data, Linux came with Built in Command wget which will fetch the data from the server and download it to your present working Directory (pwd) , to download any file from the server open the terminal ( Ctrl + Alt + T)

type wget "Link of Website to Fetch Data"

example :- if you are downloading ubuntu 13.04 64 Bit
 wget http://ftp.ticklers.org/releases.ubuntu.org/releases//raring/ubuntu-13.04-desktop-amd64.iso

and If it get Interrupted, you can Resume it by using the Command

wget -c "Link of Website to Fetch Data"
i.e,

wget -c http://ftp.ticklers.org/releases.ubuntu.org/releases//raring/ubuntu-13.04-desktop-amd64.iso


Your Download will Start from where you Left previous Download
Harsh Dubey :- Founder Flipmyprice.com

Hello Everyone, As we all Know that Social Networking Sites Such as Facebook , Twitter created a Huge Impact in the cyber world, it has also been said that the Total Population on these Social Networking Sites are More than  the actual Population..  
It has become our part of Life, what is Happening ? How is Happening ? where are you  ?

all are shared on these site.. 
Some Famous Anonymous Said that :- If you want to Do Big Than Try New and Different thing.. 

well there are Dozens of Social Networking Sites Before Facebook But Fb makes there Brand Impact..

Inspired By Mark Zuckerberg Site Facebook an Engineering Student of Global Engineering College Jabalpur  , Harsh Dubey Developed a New Social Networking Site which is Different from Facebook but Coded in the Same Language in which FB has Developed i.e., PHP.

Website Name :- http://flipmyprice.com/

Interview of Harsh Dubey by Cyber@ditya.in

Q1 :-  Is this your First Interview ?

Ans :- Yes 1st and will be most memorable....!

Q2:- How long You have been Worked in this Site ?

Ans :- -Almost 4 months(Or i can say 2 decades coz that time was too long for me).

Q3:- What Language it had been Coded in ?

Ans:- P.H.P. as i don't know anything else so much.

Q4:- How this Site is Different from Other Social Networking Site ?

Ans :- I am trying to add a random chat box in it which will connect you with a person with same interests as you have.
so that you will be engaged with a new one daily.

Q5:- Do you have Any Team ?

Ans:-May be i will have one


Q6. What's Next ? Will you Expand this Site Further More ?

Ans:- Yes first of all i will choose a catchy name for it.

/*After Interview :
Bhai bada proud feel kr rha hu maakasam..
*/
Hello Everyone, As My Previous Post are from Linux so, In This Post I will continue to Linux itself, Today we will Learn Simple tip to Check File Size from the Linux terminal.

Well there are many ways by which we can check the file size under Terminal, but today we will learn about stat command. To know More about stat command.
Open the Terminal ( Press Alt + Ctrl + T)

type "man stat" without quotes to know more details


it will display the details of stat
Now, to Know the size of the file situated in any directory , First Change the path to the Directory at which the file is present, ex:- if the file is in desktop type cd /home/aditya/Desktop

then type ls to display the list of files in this directory.

Now, 
type 
stat -c %s filename.txt

the extension could be any depending on the file type.
example:-

use this command to read in simple way

ls -lah fw8ben.pdf | awk '{ print $5}'




Copyright © 2012 cyberaditya.