IP-адрес в строке приглашения bash

Открываем для редактирования .profile в корневом каталоге пользователя:

vim ~/.profile

Далее добавим строку

export PS1=`/sbin/ifconfig en0 | /usr/bin/perl -ne 'if ( m/^\s*inet (?:addr:)?([\d.]+).*?cast/ ) { print qq($1\n); exit 0; }'`:$PS1

После этого получим что-то типа этого

Untitled-3Открываем для редактирования .profile в корневом каталоге пользователя:

vim ~/.profile

Далее добавим строку

export PS1=`/sbin/ifconfig eth0 | /usr/bin/perl -ne 'if ( m/^\s*inet (?:addr:)?([\d.]+).*?cast/ ) { print qq($1\n); exit 0; }'`:$PS1

После этого получим что-то типа этого

Untitled-3

71 комментарий к “IP-адрес в строке приглашения bash

  1. This is the right site for anybody who wishes to understand this topic. You realize a whole lot its almost hard to argue with you (not that I actually will need to…HaHa). You definitely put a brand new spin on a subject that’s been written about for years. Great stuff, just wonderful!

  2. Aw, this was an actually great article. In suggestion I would like to place in writing such as this additionally? requiring time as well as real effort to make a great post? but what can I claim? I postpone alot and also by no means seem to get something done.

  3. Aw, this was an actually wonderful post. In idea I want to place in creating such as this furthermore? requiring time as well as real initiative to make a very good post? yet what can I say? I put things off alot and never appear to get something done.

  4. I have to thank you for the efforts you’ve put in writing this site. I am hoping to see the same high-grade blog posts by you in the future as well. In truth, your creative writing abilities has motivated me to get my own, personal site now 😉

  5. Can I simply claim what a relief to discover somebody who in fact knows what theyre talking about on the internet. You absolutely know exactly how to bring a problem to light and make it important. More people need to read this and also comprehend this side of the tale. I angle think youre not extra preferred due to the fact that you certainly have the gift.

  6. Youre so amazing! I do not intend Ive read anything similar to this prior to. So great to locate somebody with some original thoughts on this subject. realy thanks for starting this up. this web site is something that is required online, somebody with a little creativity. useful task for bringing something brand-new to the web!

  7. Aw, this was a truly great article. In suggestion I would like to put in composing like this in addition? requiring time and actual initiative to make an excellent short article? however what can I claim? I put things off alot and by no means appear to get something done.

  8. There are certainly a lot of information like that to take into account. That is a wonderful indicate bring up. I supply the ideas over as basic ideas however clearly there are inquiries like the one you raise where the most important thing will certainly be operating in straightforward good faith. I don?t recognize if ideal practices have actually arised around points like that, but I make sure that your job is plainly recognized as an up for grabs. Both young boys and women really feel the impact of simply a moment?s enjoyment, for the rest of their lives.

  9. Youre so cool! I don’t expect Ive read anything like this prior to. So nice to find someone with some original ideas on this subject. realy thank you for starting this up. this internet site is something that is needed on the web, somebody with a little creativity. helpful task for bringing something brand-new to the internet!

  10. There are definitely a great deal of information like that to take into consideration. That is an excellent point to raise. I offer the ideas above as general inspiration however clearly there are concerns like the one you raise where one of the most vital thing will be operating in straightforward good faith. I don?t know if best practices have actually emerged around points like that, yet I make certain that your job is clearly identified as a fair game. Both children and ladies really feel the effect of simply a moment?s enjoyment, for the rest of their lives.

  11. Hey, I think your blog might be having browser compatibility issues. When I look at your website in Chrome, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, very good blog!

  12. Please let me know if you’re looking for a article writer for your blog. You have some really good posts and I think I would be a good asset. If you ever want to take some of the load off, I’d really like to write some content for your blog in exchange for a link back to mine. Please blast me an email if interested. Regards!

  13. Have you ever considered creating an ebook or guest authoring on other blogs? I have a blog based upon on the same subjects you discuss and would love to have you share some stories/information. I know my viewers would appreciate your work. If you are even remotely interested, feel free to send me an email.

  14. I have to thank you for the efforts you have put in penning this site. I really hope to check out the same high-grade blog posts by you later on as well. In fact, your creative writing abilities has encouraged me to get my very own website now 😉

  15. Heya just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading properly. I’m not sure why but I think its a linking issue. I’ve tried it in two different internet browsers and both show the same outcome.

  16. Considerably, the particular post is truly the greatest with this deserving subject. To be sure together with your results and also can easily thirstily look forward to Your own potential improvements. Simply just declaring thank you will, no doubt not simply just be sufficient, for your wonderful quality within your writing. I will immediately grab your rss to remain up to date with any kind of updates. Real perform as well as much success inside your company dealings!

  17. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

  18. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

  19. I was curious if you ever considered changing the structure of your blog? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having 1 or 2 images. Maybe you could space it out better?

  20. Hello! I just wanted to ask if you ever have any issues with hackers? My last blog (wordpress) was hacked and I ended up losing many months of hard work due to no data backup. Do you have any solutions to prevent hackers?

  21. With havin so much content and articles do you ever run into any problems of plagorism or copyright violation? My site has a lot of exclusive content I’ve either created myself or outsourced but it seems a lot of it is popping it up all over the web without my permission. Do you know any ways to help reduce content from being ripped off? I’d really appreciate it.

  22. Aw, this was a truly nice message. In suggestion I would like to put in writing such as this furthermore? taking some time as well as actual initiative to make a very good article? however what can I say? I postpone alot and also never appear to obtain something done.

  23. I was very pleased to find this web-site. I wished to many thanks for your time for this remarkable read!! I most definitely appreciating every little of it as well as I have you bookmarked to check out new things you post.

  24. I was wondering if you ever considered changing the layout of your site? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having one or two pictures. Maybe you could space it out better?

  25. Hello, i read your blog from time to time and i own a similar one and i was just wondering if you get a lot of spam comments? If so how do you protect against it, any plugin or anything you can recommend? I get so much lately it’s driving me crazy so any support is very much appreciated.

  26. Very good blog you have here but I was curious about if you knew of any user discussion forums that cover the same topics talked about here? I’d really like to be a part of online community where I can get advice from other knowledgeable people that share the same interest. If you have any recommendations, please let me know. Kudos!

  27. Appreciating the persistence you put into your website and detailed information you provide. It’s awesome to come across a blog every once in a while that isn’t the same outdated rehashed information. Wonderful read! I’ve saved your site and I’m including your RSS feeds to my Google account.

  28. Woah! I’m really enjoying the template/theme of this site. It’s simple, yet effective. A lot of times it’s difficult to get that “perfect balance” between user friendliness and visual appearance. I must say you’ve done a excellent job with this. Also, the blog loads very quick for me on Internet explorer. Outstanding Blog!

  29. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You obviously know what youre talking about, why throw away your intelligence on just posting videos to your site when you could be giving us something informative to read?

  30. My programmer is trying to convince me to move to .net from PHP. I have always disliked the idea because of the expenses. But he’s tryiong none the less. I’ve been using WordPress on several websites for about a year and am nervous about switching to another platform. I have heard good things about blogengine.net. Is there a way I can import all my wordpress content into it? Any kind of help would be really appreciated!

  31. I know this if off topic but I’m looking into starting my own blog and was wondering what all is required to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very web smart so I’m not 100 positive. Any recommendations or advice would be greatly appreciated. Kudos

  32. Hey there! I know this is somewhat off-topic but I needed to ask. Does running a well-established blog like yours require a lot of work? I am brand new to running a blog however I do write in my diary everyday. I’d like to start a blog so I can share my own experience and views online. Please let me know if you have any kind of ideas or tips for new aspiring bloggers. Appreciate it!

  33. This design is steller! You definitely know how to keep a reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Wonderful job. I really loved what you had to say, and more than that, how you presented it. Too cool!

  34. Hmm it looks like your website ate my first comment (it was super long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I too am an aspiring blog blogger but I’m still new to the whole thing. Do you have any points for inexperienced blog writers? I’d really appreciate it.

  35. First of all I want to say great blog! I had a quick question which I’d like to ask if you do not mind. I was interested to find out how you center yourself and clear your mind before writing. I’ve had a difficult time clearing my mind in getting my thoughts out. I truly do take pleasure in writing but it just seems like the first 10 to 15 minutes are usually wasted just trying to figure out how to begin. Any recommendations or tips? Many thanks!

  36. Hmm it appears like your website ate my first comment (it was super long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog. I too am an aspiring blog writer but I’m still new to everything. Do you have any recommendations for rookie blog writers? I’d definitely appreciate it.

  37. I know this if off topic but I’m looking into starting my own weblog and was curious what all is needed to get setup? I’m assuming having a blog like yours would cost a pretty penny? I’m not very internet savvy so I’m not 100 sure. Any suggestions or advice would be greatly appreciated. Thank you

  38. Oh my benefits! a remarkable short article guy. Thanks Nonetheless I am experiencing problem with ur rss. Don?t understand why Incapable to sign up for it. Exists any individual getting similar rss issue? Anybody who understands kindly react. Thnkx

  39. Does your website have a contact page? I’m having a tough time locating it but, I’d like to send you an email. I’ve got some ideas for your blog you might be interested in hearing. Either way, great site and I look forward to seeing it expand over time.

  40. Thanks for the marvelous posting! I seriously enjoyed reading it, you will be a great author.I will make sure to bookmark your blog and will eventually come back from now on. I want to encourage one to continue your great writing, have a nice day!

  41. Hey there just wanted to give you a quick heads up and let you know a few of the images aren’t loading correctly. I’m not sure why but I think its a linking issue. I’ve tried it in two different internet browsers and both show the same outcome.

Оставить ответ

Ваш адрес email не будет опубликован. Обязательные поля помечены *