The default location of bitcoin.conf depends on your operating system:
| OS |
Path |
| Windows XP |
C:\Documents and Settings\<username>\Application Data\Bitcoin\bitcoin.conf |
| Windows Vista, 7, 10 |
C:\Users\<username>\AppData\Roaming\Bitcoin |
| Linux |
/home/<username>/.bitcoin/bitcoin.conf |
| Mac OSX |
/Users/<username>/Library/Application Support/Bitcoin/bitcoin.conf |
Source
Not directly related to this question, but if you cannot find the configuration file at the above path: note that the configuration file is not necessary to run Bitcoin-Qt. If it is not yet present, you can simply create it with any text editor.