I am absolutely new to PuTTY on Windows. I would like to know if I can make some commands/functions available across all the PuTTY sessions.

Suppose I want a function:

greatFunction() {
# highly complicated things

I want this to be there regardless of which server I am logging in any PuTTY session. Is it possible?



1 Answer 1


Essentially, no.

The closest you can come is that you can create a .bashrc file in your home directory on each server you log into, and define the function in there.

There is no way to automatically define shell functions on all hosts you log into with putty by just doing something on your workstation. The functions have to be defined in each shell, on the hosts you log into.

There are lots of places this might be done; /etc/profile.d is another option. But they’ll all be on the target hosts, not on your workstation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .