New User Git
Add user #sudo useradd-m-s/bin/bash-g Group LoginName -M to create the home directory (without this to manually add the directory, otherwise no directory,logging in with H ome=/) -s/bin/bash use Bash (default to/bin/sh Use default does not appear in front of the $ [email protected])- g Group and then use passwd to change the user password
Su git then becomes:
bash-4.1$
Internet search solves the problem as follows.
If the user environment profile is missing, then why do you need such a file, which is related to the Linux mechanism, because every time you create a new user through Useradd in Linux, all the configuration files are copied from/etc/skel to the new user's home directory. The general default is the new user home directory under Home, and about/etc/skel This directory is mainly used by Useradd.
With the above resolution, it is not difficult to find out how to resolve the command after the user switch to the bash format, you need to copy the/etc/skel user environment profile to the specified default directory, as follows:
Workaround: cp-a/etc/skel/. /home/git
Linux problem: Switch users and then become-bash-4.1$