設定ファイル(せっていふぁいる、英語: configuration file)とは、コンピュータにおいて、動作するプログラムや、オペレーティングシステム (OS) 等の、様々な設定上の条件を記述したファイルである。 ウェブブラウザの文字の色やサイズ、DVDプレーヤーなら音量など、プログラムの動作はエンドユーザーの手によってある程度設定できる。その設定はプログラムの初期設定値ではないため、次回使用するときにも反映させるにはファイルとして保存する必要がある。そのためのファイルを設定ファイルという。初期設定ファイル、またはプログラムを作業環境に見立て、その設定を保存したファイルということで環境設定ファイルともいう。 これらの設定ファイルは、多くの場合プレーンテキスト形式で記述されているが、コンピュータプログラムがそれと判るように、特定のファイル名が用いられている。DOSやWindowsには「CONFIG.SYS」や「SYSTEM.INI」といった設定ファイルがあり、マイクロソフトがMicrosoft Windows 3.xで採用した形式では設定ファイルの拡張子としてINIが使用されている。Mac OSでは「QuickTime 初期設定」や「QuickTime Preference」、macOSでは「com.apple.QuickTime.plist」のようなファイル名が用いられ、プロパティリストと呼ばれる。 コンピュータに様々な動作を指定するために、これら設定ファイルにはデータやプログラムの読み込み手順が記載されており、この内容を書き換えることで、設定を切り替え、更には利便性を向上させるための各種機能を呼び出すことができる。しかしこれらは正確に記述しないと、プログラムの誤動作や動作不良を招くため扱いには注意が必要で、まして誤って消してしまった場合などは、致命的な結果を招くことも多い。 現代のOSでは、設定ファイルを自動的に作り出すプログラムも数多く存在しており、専門知識が無くても、必要な機能を選んで行くだけで、自動的に設定ファイルが変更される。またそのような自動的な機能をOS側が持っている場合もあるため、最近ではこれら設定ファイルの存在を意識しなくても、コンピュータを利用することができる。 Unix系OSには、何百もの設定ファイル形式がある。個々のアプリケーションやサービスが固有のファイル形式を持つことがありうる。かつて、Unix系OSの設定は設定ファイルを編集することによってのみ変えられていた。一部のファイル形式では特別な文字を最初に付けることでエントリを無効にすることができる。 Unix系OSでは、設定ファイルを特定のいくつかのディレクトリに置くことで、管理性を高めている。特に設定ファイルだけをバックアップするような状況では非常に効率が良い。また、Unix系OSはマルチユーザーのOSであるため、ユーザアプリケーションはしばしば起動時にユーザのホームディレクトリ内にファイルやディレクトリを作成し、そこに個人ごとの設定を保存する。ホームディレクトリの中身を一覧表示する際に、そのようなファイルやディレクトリが表示されないようにするため、ファイルやディレクトリの名前の前にピリオドが付けられる。そのため、そのようなファイルやディレクトリに対して「ドットファイル」という異名が生まれた。サーバプロセスはしばしば /etc 内に保存された設定ファイルを使うが、インストールディレクトリ、ルートディレクトリやシステム管理者によって定義された場所を使うこともある。Unix系OSといっても各OS毎にディレクトリ構成はそれぞれ違うため、使用しているOSでどのような構成になっているのかを確認する必要がある。また、設定ファイルに一定の拡張子の規則は無い。ただ、config、init、rc等の文字列が含まれていることが多い。ソフト名のディレクトリ内に拡張子無しのconfigという名称のファイルを置く場合もある。 WindowsではApplication Data (AppData) ディレクトリ下などにアプリケーション毎にディレクトリを作り、そこに設定ファイルを置くことが推奨されている。Windows Vistaで導入されたユーザーアカウント制御では適切な権限無しにプログラムファイルディレクトリ (%PROGRAMFILES%) を変更しようとすると、ファイルの書き込みはシステムによりトラップされ、ヴァーチャルストアと呼ばれるディレクトリに保存される。このような処置はマルウェア対策やマルチユーザー対応のためのものだが、現状ではまだまだ実行ファイルと同じディレクトリに設定ファイルを置くソフトウェア(特にフリーソフト)が多い。 Windowsではレジストリなどと呼ばれるデータベースファイルで設定の一括管理を行っている。アプリケーションソフトウェアやツールソフトウェアの多くが、このレジストリファイルに依存して、ユーザーの設定や過去の使用状況を記憶し、ユーザーの利便性向上に貢献している。
概要
設定ファイルの管理
Unix系
Microsoft Windows
関連項目
ソフトウェア
TOML
.mw-parser-output .asbox{position:relative;overflow:hidden}.mw-parser-output .asbox table{background:transparent}.mw-parser-output .asbox p{margin:0}.mw-parser-output .asbox p+p{margin-top:0.25em}.mw-parser-output .asbox{font-size:90%}.mw-parser-output .asbox-note{font-size:90%}.mw-parser-output .asbox .navbar{position:absolute;top:-0.90em;right:1em;display:none}
.mw-parser-output .hlist ul,.mw-parser-output .hlist ol{padding-left:0}.mw-parser-output .hlist li,.mw-parser-output .hlist dd,.mw-parser-output .hlist dt{margin-right:0;display:inline-block;white-space:nowrap}.mw-parser-output .hlist dt:after,.mw-parser-output .hlist dd:after,.mw-parser-output .hlist li:after{white-space:normal}.mw-parser-output .hlist li:after,.mw-parser-output .hlist dd:after{content:" ・\a0 ";font-weight:bold}.mw-parser-output .hlist dt:after{content:": "}.mw-parser-output .hlist-pipe dd:after,.mw-parser-output .hlist-pipe li:after{content:" |\a0 ";font-weight:normal}.mw-parser-output .hlist-hyphen dd:after,.mw-parser-output .hlist-hyphen li:after{content:" -\a0 ";font-weight:normal}.mw-parser-output .hlist-comma dd:after,.mw-parser-output .hlist-comma li:after{content:"、";font-weight:normal}.mw-parser-output .hlist-slash dd:after,.mw-parser-output .hlist-slash li:after{content:" /\a0 ";font-weight:normal}.mw-parser-output .hlist dd:last-child:after,.mw-parser-output .hlist dt:last-child:after,.mw-parser-output .hlist li:last-child:after{content:none}.mw-parser-output .hlist dd dd:first-child:before,.mw-parser-output .hlist dd dt:first-child:before,.mw-parser-output .hlist dd li:first-child:before,.mw-parser-output .hlist dt dd:first-child:before,.mw-parser-output .hlist dt dt:first-child:before,.mw-parser-output .hlist dt li:first-child:before,.mw-parser-output .hlist li dd:first-child:before,.mw-parser-output .hlist li dt:first-child:before,.mw-parser-output .hlist li li:first-child:before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child:after,.mw-parser-output .hlist dd dt:last-child:after,.mw-parser-output .hlist dd li:last-child:after,.mw-parser-output .hlist dt dd:last-child:after,.mw-parser-output .hlist dt dt:last-child:after,.mw-parser-output .hlist dt li:last-child:after,.mw-parser-output .hlist li dd:last-child:after,.mw-parser-output .hlist li dt:last-child:after,.mw-parser-output .hlist li li:last-child:after{content:")\a0 ";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li:before{content:" "counter(listitem)" ";white-space:nowrap}.mw-parser-output .hlist dd ol>li:first-child:before,.mw-parser-output .hlist dt ol>li:first-child:before,.mw-parser-output .hlist li ol>li:first-child:before{content:" ("counter(listitem)" "}.mw-parser-output .navbar{display:inline;font-size:75%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}.mw-parser-output .infobox .navbar{font-size:88%}.mw-parser-output .navbox .navbar{display:block;font-size:88%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}
表示
編集