Linux case
refactor setOS function