我想在每个新用户创建时自动在其家目录下创建一个名为".virtualenvs"的目录。
我正在使用useradd命令来创建新用户。
我正在使用useradd命令来创建新用户。
/etc/skel/.virtualenvs
。 /etc/skel
目录将用作新家目录的模板。/etc/adduser.conf
中定义:# The SKEL variable specifies the directory containing "skeletal" user
# files; in other words, files such as a sample .profile that will be
# copied to the new user's home directory when it is created.
SKEL=/etc/skel
$WORKON_HOME
环境变量添加到/etc/skel/.bashrc
中。 - Stephen Paulger