How to register alias .profile that they are not deleted after closing putty?

Hi, today I learned what alias! Super comfortable, of course, but found that after closing putty they are all erased from memory!

Casual heard that to avoid this - we need to write in .profile ...
5cf90f629f26f980790655.png
But it does not work - do not tell me how? Thank you!
March 23rd 20 at 19:22
2 answers
March 23rd 20 at 19:24
Solution
How do you define what is not working?
After the profile is recovered, there perilaryngeal?

.profile is loaded when you login.
Paralogistic and check again.
Thank you very much. Seems to really work after the "penelopedevine". - alta.Wolff87 commented on March 23rd 20 at 19:27
.profile it's just a bash script that runs at login.
All that he writes will be executed every login, including the implementation of aliases. - Murl_Langosh38 commented on March 23rd 20 at 19:30
@alta.Wolff87, @Murl_Langosh38, well damn :)
source ~/.profile
And all :) - Otto54 commented on March 23rd 20 at 19:33
@Otto54, well person need to login worked, and not a single test
and "all" then
. ~/.profile - Murl_Langosh38 commented on March 23rd 20 at 19:36
@Murl_Langosh38and source are the same, executes the script in the current context and not a separate process, respectively, overwriting the environment variables, and next time you login it's already tightened to the normal way of initialization.
If not ask perhalogenated and immediately give the source that people have not even realized that something there was not, although understanding of the fact that these files progruzhat only when you log in, it is also valuable fur :)

I prefer to give the source for it is a point often overlooked or considered a typo :) - Otto54 commented on March 23rd 20 at 19:39
@Otto54, I hope it's not for me, it was such a detailed explanation =)
I, if anything, courses on bash read =) - Murl_Langosh38 commented on March 23rd 20 at 19:42
@Murl_Langosh38, Oh, where is there in Kiev I will drive a couple of boobies :)
I hope it's not for me, it was such a detailed explanation

The habit is to write as the idea is conceived, without amendment to the professionalism of the interlocutors, all I have a glimmer of hope that when the user say not only HOW to do but also explain WHY this is so, then in the head with something stored, is not working, 10 years is not working, but damn when the world will change :)
And this causes a discussion and maybe find out that I'm wrong and this is good :)

Yes, and there is credit @alta.Wolff87, may absorb :) - Otto54 commented on March 23rd 20 at 19:45
Yes, Yes, thank you - I absorb as I can - I'm every dot and comma of gold )

Yet absorbed that it is necessary to write in .profile and relogin. Then the alias will always be! - alta.Wolff87 commented on March 23rd 20 at 19:48
March 23rd 20 at 19:26
Try to add aliases in .bashrc in the home directory of your user.
like .profile is more likely, because the shell by default can be different =) - Murl_Langosh38 commented on March 23rd 20 at 19:29

Find more questions by tags Linux