LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Understanding Syntax for 2 Linux commands. (https://www.linuxquestions.org/questions/linux-newbie-8/understanding-syntax-for-2-linux-commands-4175609912/)

swamprat 07-15-2017 12:29 PM

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

hazel 07-15-2017 12:55 PM

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.

Laserbeak 07-15-2017 03:03 PM

hazel is correct.


All times are GMT -5. The time now is 01:37 PM.