Autoexec.bat is a legacy file in Windows which is executed every time you start Windows. Autoexec.bat �� ��� ����� �� ������ ���� ���� �� �� ��� ���� ���� ����� ������. Commands you want to run with startup of windows, and applicable to all users, are added to autoexec.bat. ������� ���� ���� �� ��� ����� ������ � ������ ��� ���� ���������� � ����� ��� autoexec.bat. Let's see how you can do the same with Linux. ����� ��� ��� ����� �� ���� ��� ����� �� �����.

First of all Linux provides a powerful mechanism to create startup scripts which can be used for complex purposes. ���� ���� �� ��� ����� ���� ���� ���� ��� �������� ���� ���� �� ������ ������ �����. For simple scripts to be included during startup like using autoexec.bat on windows, you have a simple alternative: ���� ����� ����� �������� ����� ��� ������� ��� ������ ��� ������� autoexec.bat � ���� ���� ���� :

Include your scripts in /etc/rc.local file. ����� �������� ������ �� �� / ��� / rc.local �����.

For example to add a default load balancing route for our outgoing traffic using our dual internet connections (ADSL broadband connections from BSNL & Tata Indicom) here are the lines I included in rc.local file: ���� ���� ������ ������ ���������� ����� ������ �������� ������ ����� ������ ����� ������ �������� ������� �������� (�� ������� ������ ��� �������� ������ ������ ��������� �� bsnl & ���� indicom) ��� �� ���� ����� rc.local ������� �� ����� :

ip route add 192.168.1.0/24 dev eth1 src 192.168.1.10 table bsnl ������ ������� ������� ����� 192.168.1.0/24 ��� eth1 src 192.168.1.10 ������ bsnl
ip route add default via 192.168.1.1 table bsnl ������ ������� ������� �� ���� ����� ��������� 192.168.1.1 ������ bsnl
ip route add 192.168.0.0/24 dev eth2 src 192.168.0.10 table tata ������ ������� ������� ����� 192.168.0.0/24 ��� eth2 src 192.168.0.10 ������ ����
ip route add default via 192.168.0.1 table tata ������ ������� ������� �� ���� ����� ��������� 192.168.0.1 ������ ����
ip rule add from 192.168.1.10 table bsnl ������� ������� �� ������� ����� 192.168.1.10 ������ bsnl
ip rule add from 192.168.0.10 table tata ������� ������� �� ������� ����� 192.168.0.10 ������ ����
ip route add default scope global nexthop via 192.168.1.1 dev eth1 weight 1 nexthop via 192.168.0.1 dev eth2 weight 4 ������ ������� ������� ����� ���������� nexthop ���� ����� ��� 192.168.1.1 ��� eth1 ����� 1 nexthop ��� 192.168.0.1 ��� eth2 ����� 4