Updated for  modern Linux versions