Adapted to linux