如果您曾经在您的计算机或其他设备上遇到一条消息,告诉您需要更高的权限,那么您就遇到了“root 访问”的需求。
操作系统必须在让用户做他们需要做的事情和不让他们弄乱整个系统之间取得平衡。无论好坏,当您拥有计算机的“root 访问权限”时,您就拥有了通往王国的钥匙。
操作系统就像洋葱
操作系统 ( OS(OSes) ) 有层,就像洋葱一样。然而,与洋葱不同,操作系统有内核。
内核是操作系统的最低核心层。操作系统的这一部分直接与计算机的硬件对话。内核是计算机加载操作系统时首先加载的东西。内核始终保留在RAM中。如果内核出错,计算机就会崩溃。它是操作系统中最关键的部分。
围绕内核的是各种操作系统组件,例如文件系统、设备驱动程序、应用程序编程接口(Application Programming Interfaces)( API(APIs) ) 和用户界面(User Interface)(UI)。UI 是将您(用户)与所有在后台工作的操作系统组件连接起来的部分。
大多数用户只需要访问某些操作系统组件,而且只是在不同程度上,这就是操作系统具有“特权”级别的原因。
操作系统特权的基础知识
就像在现实生活中一样,在操作系统中拥有某些特权意味着可以访问具有较低特权的用户无法访问的东西。可以通过多种方式限制访问。一个常见的限制是文件系统访问。当涉及到特定数据时,您可能只有“读取”权限,这意味着您可以打开这些文件并读取它们,但不能以任何方式更改它们。为此,您需要“写入”权限。
某些类型的数据可能根本没有给您“读取”权限。例如,您不希望公共计算机允许用户访问只有员工才能看到的数据。
其他常见限制与计算机设置和软件安装有关。使用不同的权限级别,可以防止用户安装或删除应用程序以及更改系统壁纸等内容。
拥有root权限(Root Access)是最高(Highest)权限
拥有“root 访问权限”意味着在计算机上拥有最高权限。没有文件或数据对您隐藏。根用户可以更改操作系统的任何方面。
root 用户以相同权限运行的任何应用程序都可以执行 root 用户可以执行的任何操作。根访问对于解决许多问题和一般计算机维护至关重要。
root 用户的另一个术语是“管理员”,尽管在某些情况下,管理员帐户的权限可能略低于 root 帐户,具体取决于操作系统和具体配置方式。在大多数情况下,管理员权限和 root 权限是可以互换的术语。
Linux 用户权限级别
Linux 和其他“类 Unix(Unix-like) ”操作系统对 root 帐户有特定的方法。Linux中始终至少有一个 root 帐户,它是在您第一次安装操作系统时创建的。默认情况下,此帐户不是用于日常使用的用户帐户。相反,每当普通用户需要执行需要 root 访问权限的操作时,他们必须提供用户名和密码,这会暂时提升权限以完成任务,然后降回正常用户权限级别。
使用基于文本的界面Linus 终端(Linus Terminal),用户可以使用命令“sudo”,它是“superuser do”的缩写。” sudo 之后的任何(” Any)命令都以 root 权限执行,您必须再次提供密码。
Windows 和 macOS用户权限级别(User Privilege Levels)
多年来,Microsoft Windows对 root 权限的态度更为悠闲。主要用户帐户也是管理员帐户,这意味着如果您想要与Linux方法相同级别的固有安全性,则必须手动更改内容。
在现代版本的Microsoft Windows中,需要管理员权限的操作将触发Windows 用户帐户控制(Windows User Account Control)( UAC ) 提示,并且您必须提供管理员密码。您还可以使用管理员权限启动特定应用程序。例如,您可以使用管理员权限启动命令提示符(Command Prompt)或Windows 终端(Windows Terminal),而无需在会话期间重复提供密码。
Apple 的 macOS 与Linux一样,是一个类似 Unix 的操作系统,每当您尝试执行常规使用之外的操作时,都需要每次操作权限提升。在 macOS 中,您会注意到小锁图标,它可以让您使用 root 用户密码解锁系统设置,然后在完成后再次锁定它们。
默认情况下,macOS 在权限方面比Windows更具侵略性。例如,如果应用程序需要访问可移动驱动器上的数据,macOS 会在第一次询问您是否可以。
Android 手机上的 Root 访问权限
大多数不是系统管理员的人首先在Android智能手机和平板电脑的上下文中遇到了“root 访问”或“root”的概念。虽然Android是一个开源操作系统,但几乎所有Android手机制造商(如三星(Samsung)和OnePlus )都不会让他们的客户对他们的手机进行 root 访问。相反,他们拥有特殊的用户帐户,无法获得对手机硬件的低级访问权限。因此,与 PC 不同的是,您无法更改Android手机上的操作系统或进行手机制造商未明确允许的系统更改。
在许多手机上,可以通过运行 root 应用程序来获得 root 访问权限,但有些设备需要使用计算机和Android 调试桥(Android Debug Bridge)( ADB ) 进行一定程度的 root 过程。通过使用各种一键式 root 方法或教程之一来 root Android设备,您可以获得对手机的 root 访问权限。
从这里,您几乎可以更改设备的任何方面,包括删除提供商的臃肿软件以及禁用或启用手机制造商希望让您无法触及的东西。如果您想完全更换操作系统, root Android手机也是第一步。这可以包括最新版本的Android、自定义ROM(ROMs),甚至没有制造商特定界面的库存Android(如Google Nexus手机)。(Google Nexus)您可以通过生根设备并解锁其引导加载程序来打开替代固件的世界。
流行的应用程序包括SuperSu和Magisk,使用风险自负。或者,花一些时间在Android论坛上,阅读有关您手机型号的其他所有者如何处理生根的信息。
“越狱”iOS设备
虽然Android手机没有开箱即用的 root 访问权限,但Android通常比 iOS 的限制要少得多,即使没有 root 权限也是如此。例如,在Android手机上,您可以轻松地从第三方应用商店安装应用程序并安装您喜欢的任何东西,即使它不在Google Play 商店(Google Play Store)中。
在 iOS 上,任何苹果(Apple)不认可的应用都是遥不可及的,“越狱(jailbreaking)”的做法就进来了。越狱的结果和安卓(Android)手机上的 root 差不多,但区别在于 iOS 的安全性必须利用漏洞来破坏措施。
根访问的危险
对于 iPhone 和Android智能手机等设备,生根时要考虑的一个关键问题是它可能会使您的保修失效。这尤其令人担忧,因为出错的生根或越狱可能会使您的设备永久变砖,制造商可能不愿意修复,即使您付费也是如此。
在个人计算机上,问题是不同的。您不想意外授予错误的用户或应用程序 root 访问权限。无论(Whether)是在手机还是计算机上,您也有可能授予恶意软件 root 访问权限,这可能是一场灾难,并将您的系统文件置于危险之中。这就是为什么在有根设备上使用防病毒包至关重要的原因。
假设(Suppose)您获得了 root 访问权限并开始安装自定义ROM(ROMs)。在这种情况下,您可能无法访问设备的特殊功能,并且会看到更差的热管理或电池寿命,因为许多优化在具有自定义ROM(ROMs)的根设备上不存在。一些用户在他们的根设备上执行超频,其中CPU和GPU超出了制造商的规格,可能会损坏手机。
取消您的设备的根目录
如果您想卸载您的根访问权限怎么办?假设您的设备仍然可以工作,您可以“取消root”或“取消越狱”并将其恢复到原始状态,其中包括将OEM ROM刷回设备上。您希望在出售或赠送您的设备之前执行此操作,并且如果可能的话,您希望在尝试进行保修退货之前执行此操作。
拥有一部有根手机可以赋予权力和解放,但它也伴随着一长串风险和警告,因此请仔细考虑是否值得。
What Does “Root Access” Mean on PCs and Smartphones?
If you’ve ever run into a meѕsage on your computer or other dеνice telling you that you need higher privileges, you’ve encountered the need for “root access.”
Operating systems have to strike a balance between letting users do what they need to but without letting them mess up the entire system. For better or worse, when you have “root access” to a computer, you have the keys to the kingdom.
Operating Systems Are Like Onions
Operating systems (OSes) have layers, just like an onion. However, unlike an onion, operating systems have kernels.
The kernel is the lowest core layer of the OS. This part of the operating system talks directly to the computer’s hardware. The kernel is the first thing that loads when your computer loads the operating system. The kernel always remains in RAM. If the kernel goes wrong, the computer will crash. It’s the most critical part of the operating system.
Around the kernel are various OS components such as the file system, device drivers, Application Programming Interfaces (APIs), and User Interface (UI). The UI is the bit that connects you, the user, to all of those OS components working in the background.
Most users only need access to some of the OS components, and only to varying extents, which is why operating systems have “privilege” levels.
The Basics of OS Privileges
Just as in real life, having certain privileges in an operating system means getting access to things that users with lower privileges don’t. Access can be restricted in several ways. A common restriction is file system access. You may only have “read” privileges when it comes to specific data, which means that you can open those files and read them, but you can’t change them in any way. To do that, you’d need “write” privileges.
Some types of data may give you no “read” privileges at all. For example, you wouldn’t want a public computer to give users access to data that only staff is meant to see.
Other common restrictions relate to computer settings and software installation. Using different privilege levels, users can be prevented from installing or removing applications and changing things like the system wallpaper.
To Have Root Access is the Highest Privilege
Having “root access” means having the highest privilege possible on the computer. No files or data is hidden from you. Root users can change any aspect of the operating system.
Any application that the root user runs with the same privileges can do anything that a root user can. Root access is essential to fixing many problems and general computer maintenance.
Another term for a root user is “administrator,” although in some cases, an administrator account can have slightly lower privileges than the root account, depending on the operating system and how things are specifically configured. In most cases, admin privileges and root privileges are interchangeable terms.
Linux User Privilege Levels
Linux and other “Unix-like” operating systems have a specific approach to root accounts. There is always at least one root account in Linux, created when you first install the operating system. By default, this account is not a user account meant for daily use. Instead, whenever a regular user needs to do something that requires root access, they have to provide a username and password, which temporarily elevates privileges to accomplish the task and then drops back down to normal user privilege levels.
Using the Linus Terminal, a text-based interface, users can use the command “sudo,” which is short for “superuser do.” Any command that follows sudo executes with root privileges, and you’ll have to provide a password once again.
Windows and macOS User Privilege Levels
For years Microsoft Windows had a more laid-back attitude to root privileges. The primary user account was also the administrator account, meaning you had to manually change things if you wanted the same level of inherent safety from the Linux approach.
In modern versions of Microsoft Windows, actions that require admin privileges will trigger a Windows User Account Control (UAC) prompt, and you’ll have to provide the administrator password. You can also launch specific applications with administrator privileges. For example, you can launch the Command Prompt or Windows Terminal with admin privileges and won’t have to provide a password for the length of the session repeatedly.
Apple’s macOS is, like Linux, a Unix-like operating system and requires a per-operation privilege elevation whenever you try to do something outside of regular use. In macOS, you’ll notice little lock icons, which let you unlock system settings with the root user password and then lock them again once you’re done.
By default, macOS is a little more aggressive with permissions than Windows. For example, if an app needs to access data on a removable drive, macOS will ask you if that’s okay the first time.
Root Access on Android Phones
Most people who aren’t system administrators first encountered the idea of “root access” or “rooting” in the context of Android smartphones and tablets. While Android is an open-source operating system, almost all Android phone manufacturers like Samsung and OnePlus don’t give their customers root access to their phones. Instead, they have special user accounts that can’t get low-level access to the phone’s hardware. So unlike a PC, you can’t change the operating system on your Android phone or make system changes that aren’t explicitly allowed by the phone manufacturer.
On many phones, root access can be gained by running a rooting app, but some devices require a somewhat involved rooting process using a computer and the Android Debug Bridge (ADB). By using one of the various one-click root methods or tutorials to root Android devices, you can get root access to your phone.
From here, you can change virtually any aspect of the device, including removing provider bloatware and disabling or enabling things the phone manufacturer wanted to keep out of your reach. Rooting an Android phone is also the first step if you want to replace the operating system completely. This can include the latest version of Android, custom ROMs, and even stock Android (like a Google Nexus phone) without the manufacturer-specific interfaces. You open up a world of alternative firmware by rooting your device and unlocking its bootloader.
Popular apps include SuperSu and Magisk, which you use at your own risk. Alternatively, spend some time on Android forums, reading about how other owners of your phone model have fared with rooting.
“Jailbreaking” iOS Devices
While Android phones don’t give you root access out of the box, Android is generally much less restrictive than iOS, even without root permissions. For example, on an Android phone, you can easily enable the installation of applications from third-party app stores and install whatever you like, even if it’s not in the Google Play Store.
On iOS, any app that Apple doesn’t approve of is simply out of reach, where the practice of “jailbreaking” comes in. The result of jailbreaking is much the same as rooting on an Android phone, but the difference is that iOS security measures must be broken using exploits.
The Dangers of Root Access
When it comes to devices like iPhones and Android smartphones, one crucial issue to consider when rooting is that it may invalidate your warranty. This is particularly worrying since a rooting or jailbreak that goes wrong can permanently brick your device, something the manufacturer may be unwilling to fix, even if you pay them.
On personal computers, the issues are different. You don’t want to give the wrong users or applications root access accidentally. Whether on a phone or computer, there’s also a chance that you may give malware root access, and that can be a catastrophe and places your system files in danger. This is why using an antivirus package is crucial on a rooted device.
Suppose you gain root access and start installing custom ROMs. In that case, you may lose access to special features of your device and see worse thermal management or battery life, as many of the optimizations aren’t present on rooted devices with custom ROMs. Some users perform overclocking on their rooted device, where the CPU and GPU are pushed beyond the manufacturer’s specifications, potentially damaging the phone.
Unrooting Your Device
What if you want to uninstall your root access? Assuming that your device still works, you can “unroot” or “un-jailbreak” it and return it to its original state, which includes flashing the OEM ROM back onto the device. You’d want to do this before selling or giving away your device, and you want to do it before trying to do a warranty return, if at all possible.
Having a rooted phone can be empowering and liberating, but it also comes with a long list of risks and caveats, so think carefully about whether it’s worth it.