How can i enable mining My goal is to understand bitcoin.
I do not want to earn money with mining.

I have a server without GPU (intel i5 with 4 cores)

Here is what i've done: I have downloaded, maked and installed bitcoin sourcecode from github. It seems to work because i can interact with bitcoind with bitcoin-cli command.

I want to enable mining, but i do not know how to do. I have read some tutorials but i do not understand if mining is really enabled.

How long does it take on an intel i5 to generate the smallest bitcoin fraction as possible. I just want to see if it works

Thanks
Bitcoin Core does not have mining code anymore, at least for mainnet. You cannot use Bitcoin Core to mine. Instead you will have to download other mining software such as cgminer or bfgminer. However, none of those software include support for CPU mining because mining with CPUs (and even GPUs) is not efficient nor worth the cost. Mining these days is done with specialized mining hardware.


  How long does it take on an intel i5 to generate the smallest bitcoin fraction as possible. 


Probably a few days or weeks, possibly never. In order to "generate the smallest bitcoin fraction", you need to join a mining pool. It isn't possible to just generate a small fraction of the block reward, mining doesn't work like that. To get less than the block reward, you have to join a mining pool. To even get a chance at getting any sort of reward, you have to join a mining pool. But in order to even get any reward from the pool, you will need to be able to mine a share, which is essentially a block but at a lower difficulty than the network (the pool sets that difficulty).

With CPU mining, it is unlikely that you will even find a share. Even if you do, you will need to find a lot of shares just to reach a pool's minimum payout. So you will never get "the smallest bitcoin fraction" just by CPU mining.

Furthermore, just running some mining software isn't going to teach you anything about how Bitcoin works or how mining works.