su - to root
su - username to switch users and the environment are all switched
su -c "touch /tmp/test.txt"
If the user if there is no home directory, then you can copy the directory / etc / skel / modify a file named username and change the owner and group belongs to the directories and files in the directory
visudo change /etc/sudoers.tmp file, not recommended to change with no syntax errors directly vi prompt
visudo setting does not need to enter a password
Set Cmnd_Alias, will be replaced by a name a few commands:
Some root privileges can be assigned to a group, wheel sets in the figure below, all have root privileges, you can define your own set of definitions and certain commands
Limit the root user remote login
df -h
displays the partition and mount the system in which band tmpfs temporary file system, not all the data after the restart of; / dev / shm memory means (half the capacity of physical memory), data is written in this which quickly; / and / boot is built when installing the system.
df -i to see inode number
du -sh / root view the file, directory taking up much space
fdisk partition
fdisk -l