• 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.

This Article Has Been Shared 531 Times!

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

  • Customize iTerm2 with Color Schemes, Syntax Highlighting

    Customize iTerm2 with Color Schemes, Syntax Highlighting instead of the usual non transparent background, appealing text color etc. with scripts.Here is how to.

  • Worst Predictions for Technology and Computing : Example and Analysis

    Worst Predictions for Technology and Computing out of the desperate try to branding own company or to show off that the brand is who creates the science.

  • Kensington Security Slot and Lock for Laptops

    Kensington Security Slot and Lock for Laptops are intended to deter or to some extent prevent stealing of Windows based Laptop or MacBook Pro with steel cable.

  • How to Rename a File or Folder in OS X

    How to Rename a File or Folder in OS X ? There is no rename option by default in OS X right click or command click context menu. You can follow any of the methods.

  • Azure IaaS and Impact on Marketshare by Amazon and Rackspace

    Azure IaaS is possibly the most important move on Cloud Computing IaaS market by Microsoft Azure in 2013. Unlike Rackspace, they have kept a free trial tier.

Additionally, 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 (22.1K 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

  • The Cost of Doing Business as a Handyman July 1, 2022
  • Samsung Galaxy S22 Ultra: Long Term Review June 30, 2022
  • How to Make the Most of Your S Pen (S22 Ultra) June 29, 2022
  • Safe Chargers for Samsung Galaxy S22 Ultra June 27, 2022
  • How Telecoms Can Use The Cloud To Power Their 5G Network June 24, 2022

About This Article

Cite this article as: Abhishek Ghosh, "Can Not Find .Profile File OS X : Fix and Set," in The Customize Windows, November 28, 2013, July 1, 2022, https://thecustomizewindows.com/2013/11/can-not-find-profile-file-os-x-fix-and-set/.

Source:The Customize Windows, JiMA.in

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Privacy Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

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

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