How do you check Linux is CentOS or Ubuntu?

How do you check Linux is CentOS or Ubuntu?
Answer
So, here are some approaches you can use:
  1. Use /etc/os-release awk -F= ‘/^NAME/{print $2}’ /etc/os-release.
  2. Use the lsb_release tools if available lsb_release -d | awk -F”t” ‘{print $2}’
 

Tìm kiếm

Back
Top