Linux User Environment variables

Source: Internet
Author: User

The user's environment variable profile does not present a problem

=================================================

Simulation Environment:

[Email Protected]_apache ~]# su-12

[Email Protected]_apache ~]$ ll-a

Total 24

DRWX------. 2 4096 Jul 18 19:58.

Drwxr-xr-x. Root root 4096 Jul 17 19:08.

-RW-------. 1 156 Jul 19:58. bash_history

-rw-r--r--. 1 Jul 19:51. bash_logout

-rw-r--r--. 1 176 Jul 19:51. Bash_profile

-rw-r--r--. 1 124 Jul 19:51. BASHRC


[Email Protected]_apache ~]$ rm-f. *

Rm:cannot remove '. ': is a directory

Rm:cannot remove '.. ': is a directory

[Email Protected]_apache ~]$ ll-a

Total 8

DRWX------. 2 4096 Jul 18 20:00.

Drwxr-xr-x. Root root 4096 Jul 17 19:08.


[Email protected]_apache ~]$ Su-

Password:

[Email Protected]_apache ~]# su-12

-bash-4.1$

-bash-4.1$ =========>>>>> User's environment variable profile does not exist cause

=================================================

Solve:

[Email protected]_apache ~]# cp-a/etc/skel/.*/HOME/12

[Email protected]/]# ll/home/12-a

Total 28

DRWX------. 4 4096 Jul 18 19:43.

Drwxr-xr-x. Root root 4096 Jul 17 19:08.

-rw-r--r--. 1 root root. bash_logout

-rw-r--r--. 1 root root 176 Jul Bash_profile

-rw-r--r--. 1 root root 124 Jul BASHRC

Drwxr-xr-x. 2 4096 Nov gnome2

Drwxr-xr-x. 4 4096 June 00:44 Mozilla

[Email protected]/]# chown-r 12:12/home/12/

[Email protected]/]# su-12

[Email protected] ~]$ =========>>>>>ok!

[Email protected] ~]$ Ls-la

Total 28

DRWX------. 4 4096 Jul 18 19:43.

Drwxr-xr-x. Root root 4096 Jul 17 19:08.

-rw-r--r--. 1 Jul bash_logout

-rw-r--r--. 1 176 Jul Bash_profile

-rw-r--r--. 1 124 Jul BASHRC

Drwxr-xr-x. 2 4096 Nov gnome2

Drwxr-xr-x. 4 4096 June 00:44 Mozilla

=================================================


This article from "zhangyiling" blog, reproduced please contact the author!

Linux User Environment variables

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.