Skip to main content

Linux command: runlevel

CentOS 4.8: /etc/inittab file

List of 7 runlevels on Linux:

  • 0 - halt
  • 1 - Single user mode
  • 2 - Multiuser, without NFS (same as 3, if NOT have networking
  • 3 - Full multiuser mode
  • 4 - unused
  • 5 - X10
  • 6 - reboot

Check current runlevel

runlevel
who -r

For systemd

systemctl get-default

Change default runlevel to 3

Edit /etc/inittab file

id:3:initdefault:

Just for fun, what if we set initdefault run level to 6.

Try settings initdefault run level to 6

The system keeps rebooting if we try setting initdefault run level to 6.

The system keep rebooting if initdefault run level is set to 6

Popular posts from this blog

Demistify Buffer Overflow Vulnerability

Collection of articles, blog posts, lectures, tutorials... about Buffer Overflow Vulnerability.

Check and install php7.0-mbstring extention on Ubuntu 16.04 and Microsoft Windows

While learning Facebook SDK for PHP I overlooked one of system requirements preventing my code from running on my host. That is The mbstring extension. Facebook SDK for PHP's system requirements Check if mbstring is enabled root@ubuntu001:~# php -a Interactive mode enabled php > echo extension_loaded('mbstring'); php >exit root@ubuntu001:~# apt-cache search php7 | grep mbstring php7.0-mbstring - MBSTRING module for PHP root@ubuntu001:~# Install php7.0-mbstring root@ubuntu001:~# apt-get install php7.0-mbstring Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required:   fontconfig-config fonts-dejavu-core libfontconfig1 libgd3 libjbig0   libjpeg-turbo8 libjpeg8 libmcrypt4 libtiff5 libvpx3 libxpm4 Use 'apt autoremove' to remove them. The following additional packages will be installed:   libapache2-mod-php7.0 php7.0-cli ph...

DNS: Notes

D omain N ame S ystem