Setup SSH key passphrase only ask once

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.

vim ~/.bash_profile

and put this at the bottom of the file :

eval $(ssh-agent)

Or if you don’t want to be asked for passphrase at all, you can just generate new passphrase with no password.

Traceroute command line in ubuntu

This is how to install traceroute in ubuntu machine

apt-get install traceroute

And how to use it :

$ traceroute
traceroute to (, 30 hops max, 60 byte packets
 1 (  2.281 ms  2.378 ms  2.398 ms
 2 (  9.254 ms  9.357 ms  9.378 ms
 3 (  8.980 ms  8.966 ms  8.941 ms
 4 (  9.611 ms  9.630 ms  9.598 ms
 5 (  23.731 ms (  32.981 ms  33.343 ms
 6 (  29.036 ms (  41.533 ms (  24.494 ms
 7 (  20.850 ms (  20.496 ms (  20.846 ms
 8 (  21.115 ms  21.529 ms  24.440 ms

Setup read and write samba share in vagrant ubuntu

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

vim /etc/samba/smb.conf

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

Mount samba share with command line

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 // /tmp/kripikpasta