Linux Commands Archive

If you need a quick reminder of the commands to use for checking stuff in the Linux systems, refer to this post. I hope you get what you wanted. I will update this post to the dead, I swear! 😀

Change runlevels

—- View —-
– runlevel
– who -r
– systemctl get-default
——————–

—- Configure —-
The following requires restart before applying the setting:
– systemctl set-default graphical.target
– systemctl set-default multi-user.target

If you want to not restart the linux system use “isolate”
– systemctl isolate graphical.target
– systemctl isolate multi-user.target
——————–

Set SELinux

Set SELinux
—- View —-
– sestatus
– getenforce
– getsebool -a
——————–

—- Configure —-
Temporarily change SELinux State:

To set permissive mode:
– setenforce 0
To set enforcing mode:
– setenforce 1

Permanently change the setting:
/etc/selinux/config

setsebool -P kerberos_enabled on

—- Logs —-
To check the logs:
/var/log/audit/audit.log

—- References —-
geeksforgeeks.org/run-levels-linux/
——————–

Author photo
Publication date:
Hi! I’m Shanuka, a skilled Network Engineer working for an IT-based company in Sri Lanka. I specialize in designing, implementing, and securing complex networks, with a keen interest in emerging technologies such as cloud computing, automation, and AI-driven system optimization.

Leave a Reply

Your email address will not be published. Required fields are marked *