Posts

How to install Anaconda (conda) in Ubuntu/Linux

Image
Anaconda is a packaging tool and installer. The main difference between Anaconda and pip is that anaconda works for python and also non-python packages where as pip is only for python packages. 1.Download anaconda Download either for Python 2.7 (32bit/64bit) or Python 3.5  (32bit/64bit) Just download any one of these. For Python 2.7 64 bit wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda2-2.5.0-Linux-x86_64.sh 32 bit wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda2-2.5.0-Linux-x86.sh For Python 3.5 64 bit wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda3-2.5.0-Linux-x86_64.sh 32 bit wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda3-2.5.0-Linux-x86.sh 2. Install anaconda bash Anaconda*.sh 3. Verify if conda was installed conda --version

How to Install Antlr4 in Ubuntu/Linux

Image
Antlr is a parser generator written in Java. Execute these commands to download atlr .jar file in /usr/local/lib directory cd /usr/local/lib curl -O http://www.antlr.org/download/antlr-4.5-complete.jar add antlr4 to your class path. export CLASSPATH=".:/usr/local/lib/antlr-4.5-complete.jar:$CLASSPATH" create alias alias antlr4='java -Xmx500M -cp "/usr/local/lib/antlr-4.5-complete.jar:$CLASSPATH" org.antlr.v4.Tool' alias grun='java org.antlr.v4.runtime.misc.TestRig' Test installation java org.antlr.v4.Tool ANTLR Parser Generator Version 4.5 -o ___ specify output directory where all output is generated -lib ___ specify location of grammars, tokens files -atn generate rule augmented transition network diagrams ........... ........... The above 3 commands (one export and two alias commands) needs to be run every time you start a new terminal. To solve this problem put the three commands in your .bashrc  file li...

How to login as root / superuser in ubuntu linux ?

ROOT Open up your terminal ( ctrl+alt+t ) and enter this command. sudo su enter your password and now you are root user! Notice the $ prompt has changed to # . aman@vostro:~$ sudo su [sudo] password for aman: root@vostro:/home/aman# Now, you don't need to use sudo anymore. for eg. now simply use apt-get update instead of sudo apt-get update . You must be very cautious being a root user. To come back to your normal $ prompt hit ctrl+d .

How to make a gui Calculator in Python using Tkinter

Image
I have written a basic & simple GUI calculator in python using Tkinter module. Since Tkinter is cross-platform so it works on both windows and Linux . If you are a beginner, and want to learn some basic GUI with python, this will be helpful for you. you can download the program HERE    or, you can clone it from my github repository Read more »

Monitor Network traffic & Live up/down speed in linux terminal with vnstat

Image
Vnstat is an Open Source, command-line based network traffic monitoring tool for Linux and BSD. It keeps track of network traffic for different network interfaces. It always runs in the background to do so. It can also show current/live Internet  download/upload speed. It uses network interface information from the Kernal and is not a packet sniffer therefore it ensures light use of system resources. Install vnstat Open up your terminal (ctrl+alt+t) and enter (for Ubuntu/Debian/Linux Mint) sudo apt-get install vnstat After installation it will automatically start and it will auto start at each system boot. you can check this using systemctl aman@vostro:~$ systemctl status vnstat ● vnstat.service - vnStat network traffic monitor Loaded: loaded (/lib/systemd/system/vnstat.service; enabled; vendor preset: e Active: active (running) since Mon 2017-01-09 11:46:21 IST; 25s ago Docs: man:vnstatd(1) man:vnstat(1) man:vnstat.conf(5) Main PID: 8511 (vnstatd) ...

Make a simple basic Keylogger in Python for Linux

Image
Keylogger is a program used to monitor keystrokes. the keystrokes are stored in a file somewhere. Lets say you want to see what other people were doing on your computer, when you were away. you can just start the keylogger and spy on them! A Keylogger can be used by a hacker to record sensitive information like usernames, password or credit card detail etc. NOTE: This piece of code should not be used for unethical means. if you do so you are on your own risk. I have written a very simple keylogger in python using pyxhook  module which is an implementation of  pyhook module (for Windows OS). Let's first see how to run the keylogger and after that we will understand how it is written. Read more »

Useful Apt-Get and Apt-Cache commands for Ubuntu/Debian/Linux Mint

Image
apt-get is a  package management command line tool. It is used to download, install & remove and update software packages that are on online repositories. On the other hand apt-cache is used to to search and get information about the packages available in the repository. Read more »