This is how I install python 2.7.13 without erasing the current version of python that exists inside the OS. It is an alternative install.
$ wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tar.xz
$ tar xvf Python-2.7.13.tar.xz
$ cd Python-2.7.13
$ sudo make altinstall
Sometimes it’s annoying when you’re trying to work with your project and whenever you need to enter your key passphrase. So I wanna make this passphrase prompt ask only once.
and put this at the bottom of the file :
Or if you don’t want to be asked for passphrase at all, you can just generate new passphrase with no password.
This is how to install traceroute in ubuntu machine
apt-get install traceroute
And how to use it :
$ traceroute google.com
traceroute to google.com (126.96.36.199), 30 hops max, 60 byte packets
1 192.168.100.1 (192.168.100.1) 2.281 ms 2.378 ms 2.398 ms
2 188.8.131.52 (184.108.40.206) 9.254 ms 9.357 ms 9.378 ms
3 121.subnet125-160-11.speedy.telkom.net.id (220.127.116.11) 8.980 ms 8.966 ms 8.941 ms
4 18.104.22.168 (22.214.171.124) 9.611 ms 9.630 ms 9.598 ms
5 126.96.36.199 (188.8.131.52) 23.731 ms 184.108.40.206 (220.127.116.11) 32.981 ms 33.343 ms
6 18.104.22.168 (22.214.171.124) 29.036 ms 126.96.36.199 (188.8.131.52) 41.533 ms 184.108.40.206 (220.127.116.11) 24.494 ms
7 18.104.22.168 (22.214.171.124) 20.850 ms 126.96.36.199 (188.8.131.52) 20.496 ms 184.108.40.206 (220.127.116.11) 20.846 ms
8 18.104.22.168 (22.214.171.124) 21.115 ms 21.529 ms 24.440 ms
I use vagrant for daily development, now vagrant has this directory mounted when we setup vagrant at the first time. But sometimes I’d like to mount my own directory to my local machine.
This is the way I create samba share in my vagrant :
apt-get install samba samba-common
Create user for project
useradd -m user1 -d /srv/myproject
Open samba config file
Put the new config below at the very bottom
browseable = yes
path = /srv/myproject
guest ok = yes
public = yes
read only = no
create mask = 0644
directory mask = 0755
force user = user1
Restart samba :
service samba restart
What’s next :
Mount samba share with command line
If you looking for some text in files in some directory, this command should do the trick
grep -rnw '/path/to/somewhere/' -e "pattern"
When you work with vagrant, you might want your project folder to be mounted on some directory on your local. You can do that easily with file manager, but here’s my favorite way to mount my samba share in vagrant to my directory on my local. So I can work on that.
Before you do this, you might want to get your current user id, so your project is accessible. And make sure the destination directory is already exists.
sudo mount -t cifs -o uid=1001,gid=1001 //192.168.56.11/kripikpasta /tmp/kripikpasta
Simple tunneling with ssh with port forwarded to connect your service locally. Make sure your local port is available first.
$ ssh -f email@example.com -L 2000:website.com:5432 -N