Update linux.sh

Partially rewritten code