以文本编辑器打开文件:
gedit /etc/profile
新建文件命令:
touch 临时文本.txt
初始化root密码:
shenqh@shenqh-virtual-machine:~$ sudo passwd
[sudo] shenqh 的密码:
输入新的 UNIX 密码:
重新输入新的 UNIX 密码:
passwd:已成功更新密码
shenqh@shenqh-virtual-machine:~$ su root
密码:
root@shenqh-virtual-machine:/home/shenqh#
Ubuntu系统下/etc/profile原始内容:
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "${PS1-}" ]; then
if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
设置屏幕分辨率:
设置->设备->显示->分辨率