Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-15-2017, 11:29 AM
|
#1
|
Member
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 571
Rep:
|
Understanding Syntax for 2 Linux commands.
I don't understand how this vi command is working. This is the part that I can't see to understand "~/".
vi ~/.vimrc
And what is happening here?
source /etc/profile # reload
Any help understanding these commands will be appreciated.
Thanks
|
|
|
07-15-2017, 11:55 AM
|
#2
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,423
|
The tilde sign (~) is bash's standard abbreviation for your home directory. It is exactly equivalent to the environmental variable $HOME. The slash is the normal path delimiter (like the backslash in Windows). So ~/.vimrc means the file called .vimrc (your personal vim configuration file) in your home directory. Files whose names begin with a dot are hidden files (usually config files of some kind). They do not show up in listings unless you specifically ask for them.
Source is an internal bash command which runs another bash script within the current one, in this case the default bash profile stored in /etc. The # sign simply makes what follows into a comment.
|
|
3 members found this post helpful.
|
07-15-2017, 02:03 PM
|
#3
|
Member
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508
Rep: 
|
hazel is correct.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 09:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|