LinuxQuestions.org
Review your favorite Linux distribution.
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, 11:29 AM   #1
swamprat
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: 558

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, 11:55 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,675
Blog Entries: 19

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

Rep: Reputation: 143Reputation: 143
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-28-2016 11:11 PM
[SOLVED] Understanding Linux partitions and partitioning commands.. anup1304 Linux - Newbie 11 02-28-2013 06:45 PM
LXer: Understanding Nmap Commands: In depth Tutorial Part II LXer Syndicated Linux News 0 09-19-2011 11:30 PM
LXer: Understanding Nmap Commands: In depth Tutorial with examples LXer Syndicated Linux News 0 09-17-2011 08:51 PM
what is syntax of linux commands apexofhorizon Linux - General 3 07-16-2007 05:21 PM

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

All times are GMT -5. The time now is 06:31 AM.

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
Open Source Consulting | Domain Registration