• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Can Not Find .Profile File OS X : Fix and Set

By Abhishek Ghosh November 28, 2013 7:30 am Updated on November 28, 2013

Can Not Find .Profile File OS X : Fix and Set

Advertisement

Can Not Find .Profile File in OS X? Woo. You have to read and work a lot, otherwise you might end up setting a wrong profile file messing up the GUI too! Why this situation happens and do you really need to get in hand is important to understand. Unless you really need it (like your GUI is working fine, suddenly you developed and etching for getting the .Profile file). This typical situation, I Can Not Find .Profile File in OS X happens to the new OS X or rather pure UNIX users – either migrated from Linux or never used any *.nix system. Our polite advice will be – unless really you need the .Profile file and have done lot of customizations like Customizing iTerm2 with Color Schemes, Syntax Highlighting etc.

Be very honest! Either still now or once in remote past, you had less knowledge about UNIX. The question, Can Not Find .Profile File in OS X, is for the protective mechanism by UNIX for the new, enthusiastic users !

 

Can Not Find .Profile File OS X : Understanding the Issue

 

 

OS X runs path_helper which is where your default path get set. Read the article Mac OS X Change $PATH Variable Guide to understand this “path”. After that, it runs /etc/bashrc which does not do much work. Once the default configuration is set, it moves on to the user login scripts. Bash looks in your home directory for .bash_profile, .bash_login, and .profile in that order. bash will run the first of these that it finds and stop looking.

Advertisement

---

Also, some variables come from launchd (e.g. TMPDIR, SHELL, HOME, USER, LOGNAME, SSH_AUTH_SOCK, DISPLAY, Apple_PubSub_Socket_Render), Terminal (e.g. TERM, TERM_PROGRAM, TERM_PROGRAM_VERSION, COMMAND_MODE) and bash itself (PWD, SHLVL). Usually those files should reside in your /etc directory. In case when you don’t have your local copy of say .profile then the system uses /etc/profile. /etc/profile and ~/.profile is read for an interactive login shell, and ~/.bashrc is read for an interactive non-login shell.

By default, usually there is no .Profile file or any such thing, even if you are using iTerm2. We create this .Profile file ourselves manually. Try to understand the amount of possible profiles :

 

Vim
1
https://github.com/mathiasbynens/dotfiles

 

That is why we said to be honest! If you have not created it before customizations, its too lengthy and has enough chance to get wrong if you create one now. You must take a full backup of your everything on the Mac. With wrong configuration, it is unlikely that you can ever login to GUI properly. For more details, you can read this :

Vim
1
http://hayne.net/MacDev/Notes/unixFAQ.html#shellStartup

 

Can Not Find .Profile File OS X : Creating the .Profile File

 

We, normally never need it if once things are set. There is probably no such “automated” way to collect profile settings all from currently associated accounts in working condition and “automatically” create a .Profile file. We are using UNIX in this way for past 40 years! Because, this is a closed source OS, it is not possible or rather its a dangerous hacking to “scrap” (lack of better language) all profiles and dump on .Profile file. We are writing as .Profile for easy readability, it is all small letters – .profile.

In case, you have bought the Mac for the first time, you can run these commands :

Vim
1
2
3
touch ~/.profile
open -e ~/.profile
#TextEdit will open up, simply save it.

TextEdit will open up, simply save it. Close your Terminal or iTerm2 whatever you are using. You have to set those Syntax Highlighting things again.
Some readers got a kind of angry when we published this article. The reason is, the below steps :

Open iTerm2, and type :

Vim
1
2
cd /usr/share/vim
sudo vim vimrc

And copy paste that all text like things from one vim-syntax.txt file. Use i to go in to insert mode to paste them. After pasting press Esc key. Then type :x and hit enter from keyboard.

The above steps are not right way, its a very bad shortcut. In case you have iTerm installed, you will have a .zshrc file at $HOME (=user directory). You can see the hidden files by going to $HOME and running commands in this way :

Can Not Find .Profile File OS X

Vim
1
2
3
cd $HOME
ls -al
open .zshrc

Playing with this file for command line purpose (like decorating…) is better for the newbies.

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Can Not Find .Profile File OS X : Fix and Set

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Change Github’s Default Gist Style With jQuery Plugins

    Yes, There Are jQuery Plugins to Change Github’s Default Gist Style With jQuery Plugins! They can do lot of works than simple changing look.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy