SMB simple configuration

I write here just a simple guide to enable the SAMBA file sharing on a linux.

First, into /etc/samba/smb.conf
define name of the sharing and path of the folder that you want to share

path = /opt/folder2share
browsable = yes
writable = yes
read only = no
create mask = 0777 # Permissions of file inside

If you want to restrict the write permissions, just change them into that file.

Then, add a local user to access via samba using:

sudo smbpasswd -a user
New SMB password:
Retype new SMB password:

After, just restart the smb process and use it!


command YES

A funny trick discovered today, to automatic answer “yes” or “no” to a package installation using dpkg that require a human interaction during the installation.


# yes Y | dpkg -i mypersonalpackage.deb

You can also set yes N to always answer “NO”, or just yes if is allowed the lowercase answer into the installation.

Good installation! 😉

save locat GIT on remote server

There are many guides about git on remote server, remote repo and so on.
Here I just want to describe a simple procedure if you don’t have enough time to correctly setup the remote repo BEFORE cloning on your local pc, but you should fast start to develop and after many commit you can take a breath and think about remote backup of your local work.

First step:
on the remote server:
$ cd ~/myrepo
$ git init
$ git config receive.denyCurrentBranch ignore

and, on you local pc:
$ cd ~/myrepo
$ git remote add master ssh://<user>@<remoteIP>:/home/<user>/myrepo.git/
$ git push --set-upstream master master

Then, on you remote server you should see your modified files and your commits on git log command.
If not, on the server side, do a
$ git reset --hard
and you’ll find files and commits.

Good versioning!

Skype multiple account

On the last years, the Skype version for Linux seems unchanged, without features or relevant upgrades (and with many bugs…thank you MS..).
For that, a stable procedure to call a secondary instance of your Skype for Linux program is:

$ skype --secondary &

It launch a secondary session, while the first is running.
If you use the notification icons, you can see the two icons of the two instances, and each instance has the status configuration indipendent from the other.


Linux installation data

Sometimes, it could be useful to remember the data of installation of your Linux system, even just to be proud of the long years of life of your Linux distribution without big problems.

A simple way to know that date is with the command:

$ sudo dumpe2fs /dev/sda1 | grep 'Filesystem created'

that shows the date of creation of filesystem, in the indicated partition.

If you are not sure about your the root partition, check it using the disk free command:

$ df -h

the root partition is the one mounted on “/“.

Enjoy! 😉

2015 in review

The stats helper monkeys prepared a 2015 annual report for this blog.

Here’s an excerpt:

A San Francisco cable car holds 60 people. This blog was viewed about 3,600 times in 2015. If it were a cable car, it would take about 60 trips to carry that many people.

Click here to see the complete report.


Torrentflux is a very useful web-application to download torrent on Linux, based on php and Apache webserver.

Pratically, the only interface of this program is a website where the user can easily manage the torrent downloads. It’s very useful because it runs in background without use the GUI and the influence on the system is low. Moreover, the web interface permits to enable the access to the Torrentflux by remote, just setting the right ports forwarding on the home router and using the public IP assigned by the ISP provider on the home connection.

This program runs on apache (PHP webserver) and use the mysql engine.
So, for a debian-based linux the installation steps are:

$ sudo apt-get install mysql-client mysql-server mysql-common

and follow the required database configuration (mainly are required passwords for the database users).

$ sudo apt-get install php5 php5-mysql
$ sudo apt-get install apache2

and then the last step

$ sudo apt-get install torrentflux

After these steps, the Apache2 service need to be restarted

$ sudo service apache2 restart

and the link to the application checked under /var/www/html/.
If is not present, it is necessary to create the link to torrentflux on the webserver

$ sudo ln -s /usr/share/torrentflux/www/ /var/www/html/torrentflux

Finally, the Torrentflux web interface should be running at address

Have good downloads!