Showing the difference between runlevels in linux

Posted by Dark Training on February 17, 2010 tags: | linux

If you want to quickly find out what the difference between runlevels in linux (say if you want to switch from a GUI to a non-gui) you can use

# /sbin/chkconfig --list 

</p>

This will print columns showing you what is on and what is off for each runlevel. Neat but it's too much information, I just want to compare 5 and 3. Here is how you can clean that up:

#  /sbin/chkconfig --list|awk '{printf("%-19s%-19s%-19s\n", $1,$5,$7)}'</p>

This gives the output nice and still column formatted