AXISHK
asked on
set path available to all users in Linux
How to add a path in linux that it can be available for everyone ? Actually, i what any user can access a file under \autossh1.4\autossh
Tks
Tks
ASKER
I want the first one,
ie make available to all user as there is a command there to be used by all..
Tks
ie make available to all user as there is a command there to be used by all..
Tks
Then try what I wrote to add to /etc/profile & /etc/bash.bashrc
ASKER
So, I need to configure both file, correct ?
Can you give me some idea how a command should be written in both file :
ssh -fNg -L 3306:localhost:3306 sciadm@mysqlserver
Can you give me some idea how a command should be written in both file :
ssh -fNg -L 3306:localhost:3306 sciadm@mysqlserver
The above command can be stored in file e.g.
echo 'ssh -fNg -L 3306:localhost:3306 sciadm@mysqlserver' > /autossh1.4/autossh/myauto ssh
make it executable:
chmod +x /autossh1.4/autossh/myauto ssh
Then you can add the path as I mentioned earlier
echo 'ssh -fNg -L 3306:localhost:3306 sciadm@mysqlserver' > /autossh1.4/autossh/myauto
make it executable:
chmod +x /autossh1.4/autossh/myauto
Then you can add the path as I mentioned earlier
ASKER
There are some contents inside the file (eg. if ... fi. ) . Do you mean just add a single line "/autossh1.4/autossh/myaut ossh" at the end of the file /etc/profile ?
I can't find a file named /etc/bash.bashrc. What's the purpose of these two files ? Should I need to add both ?
Tks
I can't find a file named /etc/bash.bashrc. What's the purpose of these two files ? Should I need to add both ?
Tks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Tks
Welcome
If it is to add to PATH, then add
PATH=$PATH:/autossh1.4/aut
to
/etc/profile
/etc/bash.bashrc