How to Disable SELinux in Ubuntu Server/Desktop
https://www.configserverfirewall.com/ubuntu-linux/disable-selinux-ubuntu/
In this tutorial I will explain how to configure SELinux on Ubuntu Operating system. SELinux or Security Enhanced Linux is an additional layer of security services on top of the standard Linux DAC Mechanism and brings further protection to your Linux operating System By denying everything that has not been specifically allowed.
Security Enhanced Linux is an implementation of the Mandatory Access Control Mechanism of the Linux kernel. Mandatory Access Control is an additional layer of security added to top of the standard Discretionary Access Control (User/Group based permissions).
Even though it's has been added to provide additional security to the Linux operating system, most administrators prefer to disable SELinux because without proper configuration, some application will not run when SELinux is enabled.
So how do we disable SELinux on Ubuntu?
There is no need. SELinux is not installed by default in Ubuntu. Security Enhanced Linux is primarily used by the Red Hat based Linux distributions, that includes Red Hat Enterprise Linux, CentOS and Fedora.
Debian based distributions, including Ubuntu do not deliver SELinux by default, instead they use a system called AppArmor for Mandatory Access Control (AppArmor is disabled by default on Ubuntu).
Install SELinux on Ubuntu
The following steps describe how to install and configure SELinux on Ubuntu/Debian.
Install selinux-policy-default and related packages:
sudo apt-get update
sudo apt-get install selinux-basics selinux-policy-default auditdRun the selinux-activate command:
sudo selinux-activateOpen the /etc/default/rcS file and set FSCKFIX=yes:
FSCKFIX=yesRestart the computer (it will take a while to reboot):
sudo systemctl reboot
After the system rebooted, run the check-selinux-installation command to make sure that the installation is successful.
Enable and Disable SELinux on Ubuntu
By default SELinux on Ubuntu run in permissive mode. To enable SELinux, Open the /etc/selinux/config file and set SELINUX=enforcing:
SELINUX=enforcing
Then, Save the config file and restart the computer:
sudo systemctl reboot
If you want to permanently disable SELinux, set SELINUX=disabled and restart the computer.

You need to restart your Ubuntu system every time you switch between enforcing and disabled modes permanently.
To view The SELinux status on Ubuntu, Type:
sestatus
To check current running mode, Type:
getenforce
Run setenforce command to switch between Enforcing and Permissive mode without having to restart the computer (Enforcing = 1, Permissive = 0).
setenforce 0
Summary
- SELinux is a security enhancement for the Linux kernel, and is Originally developed by the National Security Agency's office of Information Assurance as an enhancement to Linux Security.
- If you use CentOS, Fedora or RHEL, SELinux is enabled by default.
- Apparmor is the default way of implementing Mandatory Access Control in Debian/Ubuntu based Linux distributions.
How to Disable SELinux in Ubuntu Server/Desktop的更多相关文章
- Ubuntu Server 与 Ubuntu Desktop之间的区别
服务器版本的内核时钟频率由桌面的100hz转为1khz,这一点是为某些服务器应用提供更好的性能和吞吐量. 除此之外,服务器内核支持SMP"对称多处理"(Symmetrical Mu ...
- Ubuntu Server VS Ubuntu Desktop区别
今天有位朋友问我,Ubuntu Server 与 Ubuntu Desktop的区别在哪里!区别如下: SERVER没有GUI SERVER没有一堆的桌面软件 SERVER在编译时使用的参数不一样,会 ...
- Ubuntu Server 与 Ubuntu Desktop区别
今天有位朋友问我,Ubuntu Server 与 Ubuntu Desktop的区别在哪里!区别如下: SERVER没有GUI SERVER没有一堆的桌面软件 SERVER在编译时使用的参数不一样,会 ...
- Ubuntu Desktop变为Ubuntu Server服务器版的方法
去Ubuntu官网看到有好几种版本可以下载,alternate(文本安装).desktop9(桌面).netbook(上网本).server(服务器). 使用server版某个理由: 32位的系统可以 ...
- Ubuntu Server : 自动更新
Ubuntu(16.04/18.04) 默认会每天自动安装系统的安全更新,但是不会自动安装包的更新.本文梳理 Ubuntu 16.04/18.04 系统的自动更新机制,并介绍如何配置系统自动更新所有的 ...
- 实战Ubuntu Server上配置LXDE+VNC环境
1.安装x-window 使用apt-get 安装 xorg sudo apt-get install xorg 如果提示以下内容,就说明需要update下源列表,使用sudo apt-get upd ...
- Compiling Xen-4.4 From Source And Installing It On Ubuntu Server (Amd-64)
First of all, you should install a clean Ubuntu Server (Amd-64) on your server. (Version 14.04 is st ...
- Ubuntu Server修改IP、DNS、hosts
本文记录下Ubuntu Server 16.04修改IP.DNS.hosts的方法 -------- 1. Ubuntu Server 修改IP sudo vi /etc/network/interf ...
- Ubuntu Server忘记密码后,单用户模式修改密码进去不了桌面的无奈
俗话说的好,好记性不如烂笔头.有时候脑子一热,就想不起来之前设置过的密码是什么了.我可怜地忘了我的Ubuntu Server的密码,回忆了n种组合都不行,于是只能进行单用户模式的修改密码了. 以下的操 ...
- Ubuntu Server 14.04 LTS(64bit)已安装 weblogic Server 12c(12.1.3) Zip Distribution
这里说的对Ubuntu Server 14.04 LTS(64bit)已安装weblogic Server 12c(12.1.3) Zip Distribution遇到的问题.至于Windows什么好 ...
随机推荐
- nestjs 和 .net DI 使用并注册的区别
核心:对象之间的关系 各种 引用 --- 方便使用各种服务 1. .net 注册服务 三种注册方式 build.Service.Addsigtel 单例 瞬时 等 .addSingtel<IU ...
- mongo对文档中数组进行过滤的三种方法
前言 在mongo中数据类型有很多种,常见的包括: 数据类型 例子 描述 String { "x" : "foot" } 字符串.存储数据常用的数据类型.在 M ...
- day04-常用DOS命令
打开cmd的方式 开始-W-windows系统-命令提示符 win键+R键 鼠标在任意文件夹上, shift+鼠标右键 资源管理器的地址栏前面加cmd,然后回车 管理员方式运行:选择命令提示符右键以管 ...
- EBS GL 当前职责有访问权限的所有账套
CREATE OR REPLACE VIEW CUX_GL_ACCESS_LEDGER_V AS SELECT L.LEDGER_ID,L.NAME,L.LEDGER_CATEGORY_CODE FR ...
- idea高效实用快捷键【待补充】
1.快捷键 ctrl+alt+L代码格式化 2.快捷键 ctrl+h查看hierarchy,只能查看向上向下继承关系,而不能看实现了哪些接口. 3,选中右键--Diagram可以查看实现了哪些接口 4 ...
- java基础语法(从0开始到java方法)
文章目录 1.第一个java程序 2.数据的表示详解 2.1 整数在计算机中的存储原理 2.2 字符在计算机中的存储原理 2.3 图片视频声音的存储原理 2.4 数据的其他表示形式 2.5 不同进制在 ...
- 安装了多个python版本指定pip安装目录
#检查库安装的目录import os import numpy as np import pandas as pd print(os.path.dirname(np.__file__)) print( ...
- 关于MNN工程框架编译出来的静态库和动态库的使用
一.MNN.lib文件路径 如果你看过之前的博客内容,应该可以在编译的的工程当中 C:\Users\Administrator\Desktop\MNN\MNN-master\MNN-CPU-OPENC ...
- 使用PYNQ生成PWM波控制舵机/步进电机/机械臂
使用PYNQ生成PWM波控制舵机/步进电机/机械臂 在开始这个工程之前,你需要PYNQ-Z2的板卡文件,约束文件,原理图作为参考,你可以在我上传的资源里下载. 当然,这个工程也适用于PYNQ-Z1,只 ...
- 接口测试中如何保持session鉴权/会话
当接口使用token鉴权时,可以直接在响应数据中提取token的值,关联到其他接口使用 如果接口使用的是session鉴权,可以使用session=resquests.Session()方法,创建一个 ...