博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ubuntu linux root password
阅读量:4032 次
发布时间:2019-05-24

本文共 1821 字,大约阅读时间需要 6 分钟。

Ubuntu Linux root Password (Default Password)

Ihave just installed Ubuntu Linux. But, what is the default root password? I can only login as a normal user. How do I login as root user?

This is the mystery for most users – you didn’t set a root password, so what is it? The root user (also known as superuser), is a user on Ubuntu Linux and Unix-like systems with full administrative privileges (full access). So using root account for daily work can be very dangerous and you may damage your working system.

Ubuntu and root account

By default root account is locked under Ubuntu Linux. Therefore, you cannot login as root or use ‘su -‘ command to become a superuser. To run all administrative command use sudo command. sudo allows a permitted user to execute a command as the superuser or another user. Ubuntu setup your default account (the one created during installation) to run all administrative commands.

For example create a new user called bar, you need to type sudo command as follows:
$ sudo adduser bar
Password:

When sudo asks for a password, you need to supply YOUR OWN password. In other words a root password is not needed. Here are few more examples.

Task: Start / stop / restart services stored in /etc/init.d/ directory

$ sudo /etc/init.d/ssh stop
$ sudo /etc/init.d/networking restart

Task: Avoid typing sudo each and every time

Note that this is not recommended until and unless you are an expert and aware of what you are typing:
$ sudo -i

Above command will start /bin/bash as a root shell so that you can enter a root user command without using sudo command.

How do I login as root user?

Open terminal and simply type the following command:
$ sudo bash
OR
$ sudo -s
Supply your password and you will become a root user.

转载地址:http://wuebi.baihongyu.com/

你可能感兴趣的文章
mysql:sql alter table 修改列属性的字符集
查看>>
mysql:sql drop table (删除表)
查看>>
mysql:sql truncate (清除表数据)
查看>>
scrapy:xpath string(.)非常注意问题
查看>>
yuv to rgb 转换失败呀。天呀。谁来帮帮我呀。
查看>>
yuv420 format
查看>>
YUV420只绘制Y通道
查看>>
yuv420 还原为RGB图像
查看>>
LED恒流驱动芯片
查看>>
驱动TFT要SDRAM做为显示缓存
查看>>
使用file查看可执行文件的平台性,x86 or arm ?
查看>>
qt5 everywhere 编译summary
查看>>
qt5 everywhere编译完成后,找不到qmake
查看>>
arm-linux开机读取硬件时钟,设置系统时钟。
查看>>
交叉编译在x86上调试好的qt程序
查看>>
/dev/input/event0 键盘输入
查看>>
qt 创建异形窗体
查看>>
可重入函数与不可重入函数
查看>>
简单Linux C线程池
查看>>
内存池
查看>>