Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Dec 7, 2012

How to view and kill the process in Linux using Terminal


 


We can see the currently running processes in Terminal. Process means the application, command, or script that is running in your computer. Process can be visible or it can be hidden. If you just open Mozilla Firefox, then the process is created. Each process has the unique ID, called PID.


 


To view the processes


 


Open the terminal and type this command:


 


ps -e


 


To view in the page manner type:


 


ps -e | less


 


linux processes



Here, PID refers to the process ID. Every process has the unique id.


How to find windows alternative software for Linux


 


Linux have lot of alternative to windows software. Good news, the alternative are free software. Try to note down the one that you need. Finding an open source application for your need might helps you to convert yourself to Linux in short period of time. The are are several website where you can find the alternative software for commercial software. Some of them are:


 


Method 1


 


The Linux Alternative Project (formerly the Linux Equivalent Project). The website is currently in beta form and it will periodically update the database with Windows software and the Linux equivalents and alternatives.


 


To view website ==> Linux Alt - Click Here




 


Method 2


 


Its mission is to provide easy access to high quality open source alternatives to well-known commercial products. And remember that open source software is also a freeware alternative.


 


To view website ==> Osalt - Click Here



Different ways to use wget command in Linux


 


Wget is non-interactive network downloaded meaning all the download operation will run in the background. Therefore you can download any file from the Internet with wget command.


 


Wget also lets user to download the entire website. The download process start with simple wget command followed by the website URL. Wget supports HTTP, HTTPS and FTP protocol to download file.


 


Download web pages using wget


 


For example you want to download the front page of jijokjose.com. You can simply follow the command


 


wget jijokjose.com


 


the download start and saved your file in home directory which you can use for later off-line uses. Now lets suppose you have connection problem or the jijokjose server has some problem. Wget try to reconnect to the server 20 times by default. You can limit the reconnection limit by following command


 


wget -t jijokjose.com


 

Dec 2, 2012

How to Install JDK 7 on Ubuntu


There are several JDK implementations available for Linux, such as Oracle JDK 7, OpenJDK, Sun JDK 6, IBM JDK and GNU Java Compiler. We shall choose the Oracle JDK 7 (Ubuntu chooses OpenJDK as its default JDK, which is not 100% compatible with Oracle JDK).



Step 1 : Check if JDK has already been Installed


 


Open a Terminal or press Ctrl + Alt + T and issue this command:


 


javac -version


 


If a JDK version number (e.g., "javac 1.7.0_{xx}") appears, JDK has already been installed. You can skip the installation and goto step 3.


 


Step 2 : Download and Install JDK


 


Goto JDK (Java SE) download site at



Select "Java SE 7ux" ⇒ JDK ⇒ Download ⇒ "Accept Licence Agreement" ⇒ Select Linux x86 (for 32-bit system) or Linux x64 (for 64-bit system) "tar.gz" package, e.g., "jdk-7ux-linux-i586.tar.gz". The tarball will be stored in folder "~/Downloads", by default.


We shall install JDK under "/usr/lib/jvm". First, create a directory "jvm" under "/usr/lib" (with superuser authority "sudo"). Open a Terminal and issue these commands:


 


cd /usr/lib


sudo mkdir jvm


 

Dec 1, 2012

How to Install NetBeans on Ubuntu


To use NetBeans for Java, PHP programming, you need to first install JDK. Read "How to install JDK on Ubuntu".



Step 1 : Download netbeans


 


Download NetBeans from http://netbeans.org/downloads/. Choose platform "Linux (x86/x64)" ⇒ "Java SE". You shall receive a sh file (e.g., "netbeans-7.x-ml-javase-linux.sh") in "~/Downloads".


Set the downloaded sh file to executable and run the sh file.




Step 2 : Install netbeans


 


Open a Terminal and type the following commands.


 


cd ~/Downloads


chmod a+x netbeans-7.x-ml-javase-linux.sh   // Set to executable for all (a+x)


./netbeans-7.x-ml-javase-linux.sh                   // Run


 


Follow the instructions to install NetBeans.




How to install LAMP in ubuntu


 



Open terminal or press Ctrl + Alt +T and type the following command


 


sudo apt-get install lamp-server^


 


lamp 2





 


When you search for the name of the package that the given command seems to install cannot be found using apt-cache search. e.g. You will see this used most often when someone tells you how to install LAMP server setup (Linux-Apache-MySQL-PHP) by using the command “sudo apt-get install lamp-server^”. If you miss the caret at the end or try to search for lamp-server, it just doesn’t work.


 

Nov 30, 2012

Hacking Website Database with SQLmap in Backtrack 5 or Linux OS


All we needed is a vulnerability webpage. Lets say you have a url like this



http://www.site.com/section.php?id=51



and that it is prone to sql injection because the developer of that site did not properly escape the parameter id.



This can be simply tested by trying to open the url



http://www.site.com/section.php?id=51'



We just added a single quote in the parameter. If this url throws an error then it is clear that the database has reacted with an error because it got an unexpected single quote..



To understand the process please change video quality to 1080p and watch in HD Quality





Test and Boot an ISO Image Using Virtual Machine


 



To test an ISO image without burning to a disc using Oracle VirtualBox or VMWare Workstation. Of course, you can use any of the other virtual machine software to get a similar result. I also have Virtual PC installed and it too does a good job of mounting ISO images for testing, but for this article VirtualBox is used because it’s freely available to run on all Windows and Unix systems.


 


Simply follow the steps to load an ISO image into VirtualBox:


 


Step 1


 


Download and install VirtualBox.


 


Step 2


 


Run VirtualBox.


 


Boot an ISO Image Using Virtual Box 1


Nov 27, 2012

Internet access problem in Terminal using proxy server network connection



Internet access problem in Terminal using proxy server network connection



When we use different internet connection in one laptop, and if one of those connections is proxy server network connection, then we may have a problem with accessing internet in Ubuntu Software Center and in Terminal.



In direct connection we haven’t any problem with internet access. But when we switch to proxy connection, at first everything is ok, internet works in Gnome.(firefox and all applications can take access from GNOME). But Terminal and Software Center gives connection error. We can do this simple action in Terminal.



Open Terminal or press Ctrl + Alt + T and type the following commands.



Step 1



Navigate to /etc/apt directory using



cd /etc/apt



Internet access problem in Terminal using proxy server network connection 1





Nov 25, 2012

How to solve no interfaces listed in Wireshark


 



After installing wireshark in linux some peoples got an error that no interface is listed which look likes below.


 


wireshark no interface 1


 


To eliminate this error do the following.


 


Method 1


 


Some of the specific files/devices that needed permissions in Ubuntu, so open wireshark in root account or use the following command to open wireshark.


 


sudo wireshark


 

Nov 23, 2012

How to install a .tar.gz (or .tar.bz2) file in linux


 


The answer is you cannot "install" a .tar.gz file or .tar.bz2 file. Because .tar.gz files are gzip-compressed tarballs, compressed archives like .zip files. .bz2 files are compressed with bzip2.


 


Step 1


 


Open a terminal or press Ctrl + Alt + T




 


Step 2


 


Use the command cd <foldername> to navigate to the correct folder.


 


Make sure you first read a file called INSTALL or INSTALL.txt or README




 


Step 3


 


Extract the files with one of the commands


 


If it's tar.gz use


 


tar xvzf PACKAGENAME.tar.gz


 


If it's a tar.bz2 use


 


tar xvjf PACKAGENAME.tar.bz2




 

Nov 16, 2012

How to Repair GRUB 2 When Ubuntu Won't Boot


 


Using Terminal Method



If you have Ubuntu 12.04 installed, ensure you use a Ubuntu 12.04 live CD.


Open a terminal after booting into the live environment. Identify the partition Ubuntu is installed on using one of the following commands:


 


sudo fdisk -l


sudo blkid


 


Step 1


 


Here is the output of both commands. In the sudo fdisk -l command, the Ubuntu partition is identified by the word Linux in the System column. 


 


Output of drive information 1




Nov 11, 2012

Apache 2 Web Server in Linux - Start, Stop and Restart


 


Start Apache 2 Web Server


 


To start Apache 2 web server, enter:


 


/etc/init.d/apache2 start


 


or


 


sudo /etc/init.d/apache2 start




 


Restart Apache 2 Web Server


 


Restart Apache 2 web server, enter:


 


/etc/init.d/apache2 restart


 


or


 


sudo /etc/init.d/apache2 restart




 

Nov 6, 2012

Remove Old Kernels from Ubuntu 12.10 with Ubuntu Tweak


 



If you’ve been using and updating Ubuntu for sometime now, you may have old kernels installed on your system that are not useful anymore.


 


Using Ubuntu Tweak, this brief tutorial is going to show you how to remove those old kernels from Ubuntu 12.04 / 12.10 easily with few clicks. If these unused kernels are not removed, they may just end of using valuable space on your system’s disks.


 


Step 1


 


To get started, press Ctrl + Alt + T on your keyboard to open the terminal. When it opens, run the commands below to add Ubuntu Tweak PPA


 


sudo add-apt-repository ppa:tualatrix/ppa



Nov 4, 2012

Install LAMP (Linux + Apache + MySQL + PHP ) in Ubuntu 12.10


LAMP stands for Linux, Apache, MySQL and PHP. This script installs those programs and packages at once easily in Ubuntu.



Press Ctrl + Alt + T on your keyboard to open the terminal. When it opens run the commands below to install the packages.


 


sudo apt-get install lamp-server^


 



During the installation, you’ll be prompted to create a password or MySQL server. Create one to continue.


 


Test 1 - Apache


 


After the installation, test Apache by opening your web browser and typing localhost. When you seen the screen below, it means Apache is functioning.


 


Install LAMP (Linux + Apache + MySQL + PHP ) in Ubuntu 12.10




Nov 1, 2012

Install wine 1.5.16 in ubuntu 12.10


 



Wine version 1.5.16 has just been released and the following steps show you how to install it in Ubuntu 12.10.


 


For more about this release, please click here.


 


And if you don’t know what Wine is, it is a program that lets you run or install programs designed for Windows in Linux systems, including Ubuntu.


 


If you ever wanted to install Windows programs in Linux, then Wine is the program you’ll need to help you do that.


 


Step 1


 


To get started, press Ctrl + Alt + T on your keyboard to open the terminal. When it opens run the commands below to add Wine’s PPA.


 


sudo add-apt-repository ppa:ubuntu-wine/ppa



Oct 30, 2012

Hide the guest account on ubuntu 12.10 from the logon screen


 



Here’s a quick way to hide the guest account from the logon screen. 



To get started, press Ctrl + Alt + T on your keyboard to open the terminal. When it opens, run the commands below to hide the guest account from the logon screen.


 


sudo sh -c 'echo "allow-guest=false" >> /etc/lightdm/lightdm.conf'


 


Restart your computer and the guest account should be gone.


 


Hide gust account in ubuntu 12.10





Oct 24, 2012

Return to Gnome Classic in Ubuntu


As you may well know, Ubuntu comes with Unity Desktop by default and fallback to Unity 2D if your graphic card isn’t capable of running the 3D version of Unity. Now, if Unity is not what you’re used to, you can still switch your desktop session to the classic Gnome Desktop easily by running just one command. And to do the following step.



Press Ctrl + Alt + T on your keyboard to open Terminal. When it opens, run the commands below to enable Gnome Classic.


 


sudo apt-get install gnome-session-fallback


 


Restart and on the logon screen, click the option to change your session.


 


Return gnome 1


 

Oct 20, 2012

How to enable root login in Ubuntu 12.10


 



Here’s a quick way to login as root in Ubuntu 12.10. This is not recommended as the root user account is disabled for a reason.



To get started, press Ctrl + Alt + T on your keyboard to open the terminal. When it opens, run the commands below to create a root password.


 


sudo passwd root


 


Next, run the commands below to enable root login in Ubuntu 12.10


 


sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'


 


Method 1 - Login using terminal


 


To login as root you must open terminal by pressing Ctrl + Alt + T. Run the following command


 


su root


 


Now enter your root password.



Oct 17, 2012

Disable Overlay Scrollbar in Ubuntu 12.10


 



If you are used to the regular scrollbar that was in previous versions of Ubuntu, then you’ll want to disable this new overlay feature now in Ubuntu.


 


To get started press Ctrl + Alt + T on your keyboard to open the terminal. When it opens, run the commands below.


 


gsettings set com.canonical.desktop.interface scrollbar-mode normal


 


old scrollbars