�������: ������ (���� | �����������) ��RU opennet.me  
The OpenNET Project / Index page

[ ������� /+++ | ����� | ���� | ]

������� ������������ / ������ "������������ ��� Linux" / ���������� ���������
next up previous contents index
Next: ������ � ������� Up: ��������� �������� Previous: ���������� �������� � ����   Contents   Index

���������� �������� ��������

� ����� �������� �������� ���������� ��� ������ ��������� ������������, ���������� �������, �� ������ ��������� ��������� ������������. �� ������ ����� ���������� � ��� �������, ������� ����� ��������� ��� �����������, ���������� ������ ��� ������� ����� ����� ��������. ��� ��� ����� ��������� � ����� ���� ��������������� ����� ��������� ����������.

����� �� ������� ���������������� � �������, bash ��������� ������� ����� `/etc/profile', � ���� �� ����������, �������� ��������� ����������� � ��� �������. ��� �������� �����, ������������� ���� �������, ������� ����������� ��� ���� �������������; ���� ��������� ������������� ����� �������� ��� ����������.

����� bash ��������� � ��������� ������� � ����� `.bash_profile', ``�������'' ����� � ����� �������� ��������. ���� �� ������, ����� ������� ����������� ��� ������ ����� ����������� � �������, �������� �� � ���� ����.

���� �� �������� ����� ����� �������� (����� ���, � ������� �� ������ ����� �����������), bash ��������� � ��������� ������� � ����� `.bashrc' ������ ��������� ��������. ������� � ���� ����� ����������� ��� ���� �����, ����� ���, ������� ���������� ��� ����������� ������������.

��������� ����� ������������ ��� ��������� ����� �������� � ��������� ����� ����� ��� ����, ����� ���������� � `.bash_profile' ������������ �� ���������� �� ����� ����� ������ ������ ������������ � �������. ����� �������� ���������� ����� � ��� �� ������ � ������ ������ ��������, �������� � ����� ����� `.bash_profile' ��������� ������:

if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

��� �������� � ������� ����� `.bashrc' �� ������ ��������� �������� ��� ����������� � �������. ����� �������, �� ������ ��������� ��� ��������� � ���� `.bashrc', � �� ����� ����������� � ����� ������. ����� ��������� � ����� `.bash_profile' �� ���� ������ ����� �������� ������ ��� ��������� �����������.

� �������, ���������� ���� `.bash_profile' ����� ��������� ��������� �������:

# ������������ �������� �������� ���������� � #.
# ��� ������ �� ����������� bash, � ������ ��� ����������������.

# ������ ������ �� .bashrc
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

���������� ���� .bashrc ����� ��������� ���:

# ������������� ����� ���������� ��������� � �����.
alias ls="ls --color=auto"

# ����� "l" ������ ��������� ������� ��������.
alias l="ls -l"

# ��������� ����������� ���� ������.
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:~/bin:."

# �������� ����������� ��������.
PS1="[\w] $ "

# ������� ���� ������� ������ �������.
HISTSIZE=20000
HISTFILESIZE=20000

# ������� ����������, ����� ������� �� ����������
# ���� ����������, ������������ �����.
export HISTSIZE HISTFILESIZE PATH PS1

���� `.bashrc' ������������� ��������� �������� ����������� ������ � ���������� ����������� ���� ������ � ����������� �������� ��� ������� �� ����� �����; ��-�� ����������� ����������� `.bash_profile', ���� ���� `.bashrc' ����������� � ��� ����������� � �������.

����� �� ��������� �������, bash ��������� � ��������� ������� � ����� `.bash_logout' � ����� �������� ��������, ���� ���� ���� ����������. ����� ��������� ������� ��� ������ �� �������, ��������� �� � ������ ����.



Alex Otwagin 2002-12-16



������:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
�������:

�������� �� �����
���������� �� ���������
Created 1996-2026 by Maxim Chirkov
��������, ����������, ����������