查看像“/sbin/init”这样的系统文件安全吗?

use*_*059 3 init files

如果我在/sbin/init没有编辑的情况下查看 Ubuntu 的安装,例如在 gedit 中,我是否有破坏 Ubuntu 安装的风险?(我正在参加一个在线 Linux 课程,他们提到了这一点,我想看看它是什么样子。)

xyz*_*xyz 8

Yes. It's safe to view any system file(s), especially if you don't use sudo or root.

prakhar@aS4v4g3wOrld:~$ ll /sbin/init
-rwxr-xr-x 1 root root 265848 Jul 18 15:16 /sbin/init*
Run Code Online (Sandbox Code Playgroud)

The owner of /sbin/init is root. The only way you can modify this file is either via logging as root ($ sudo -s) or by giving an editor superuser permissions using sudo.

Besides, /sbin/init is a binary file, not meant for reading. If you still want to view this, use a hex editor like

$ sudo apt-get install ghex
$ ghex /sbin/init
Run Code Online (Sandbox Code Playgroud)