LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 07-15-2017, 12:29 PM   #1
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: Centos 7 , Linux Mint 18.1 Under VMware in Win7
Posts: 515

Rep: Reputation: 34
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
 
Old 07-15-2017, 12:55 PM   #2
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware, OpenBSD
Posts: 3,946
Blog Entries: 11

Rep: Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176Reputation: 2176
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.
Old 07-15-2017, 03:03 PM   #3
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Rep: Reputation: 142Reputation: 142
hazel is correct.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help Understanding find Syntax linux4evr5581 Linux - Newbie 9 12-29-2016 12:11 AM
[SOLVED] Understanding Linux partitions and partitioning commands.. anup1304 Linux - Newbie 11 02-28-2013 07:45 PM
LXer: Understanding Nmap Commands: In depth Tutorial Part II LXer Syndicated Linux News 0 09-20-2011 12:30 AM
LXer: Understanding Nmap Commands: In depth Tutorial with examples LXer Syndicated Linux News 0 09-17-2011 09:51 PM
what is syntax of linux commands apexofhorizon Linux - General 3 07-16-2007 06:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration