<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.archlinux.jp/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E3%81%AF%E3%81%A4%E3%81%9B</id>
	<title>ArchWiki - 利用者の投稿記録 [ja]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.archlinux.jp/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E3%81%AF%E3%81%A4%E3%81%9B"/>
	<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php/%E7%89%B9%E5%88%A5:%E6%8A%95%E7%A8%BF%E8%A8%98%E9%8C%B2/%E3%81%AF%E3%81%A4%E3%81%9B"/>
	<updated>2026-04-23T08:46:19Z</updated>
	<subtitle>利用者の投稿記録</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3812</id>
		<title>Fish</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3812"/>
		<updated>2015-10-25T07:51:26Z</updated>

		<summary type="html">&lt;p&gt;はつせ: /* 設定 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase title}}&lt;br /&gt;
[[Category:コマンドシェル]]&lt;br /&gt;
[[de:Fish]]&lt;br /&gt;
[[en:Fish]]&lt;br /&gt;
[[ru:Fish]]&lt;br /&gt;
&#039;&#039;&#039;fish&#039;&#039;&#039; (&#039;&#039;&#039;friendly interactive shell&#039;&#039;&#039;) は主に対話的に使用することを意図されたユーザフレンドリーなコマンドラインシェルです。&lt;br /&gt;
&lt;br /&gt;
== インストール ==&lt;br /&gt;
&lt;br /&gt;
[[公式リポジトリ]]より、[http://fishshell.com/ 主流フォーク] の安定版 {{Pkg|fish}} パッケージを[[pacman|インストール]]できます。&lt;br /&gt;
&lt;br /&gt;
最新の開発版は [[AUR]] より {{AUR|fish-shell-git}}{{Broken package link|{{aur-mirror|fish-shell-git}}}} を[[pacman|インストール]]します。 &lt;br /&gt;
&lt;br /&gt;
2011年に [https://github.com/liljencrantz オリジナルの開発者] による [http://www.mail-archive.com/fish-users@lists.sourceforge.net/msg02893.html 開発が中止された] 従来のバージョンは [[AUR]] より {{AUR|fish-git}} を[[pacman|インストール]]します。&lt;br /&gt;
&lt;br /&gt;
fish をデフォルトシェルにするには、{{ic|chsh -s /usr/bin/fish}} を実行します。&lt;br /&gt;
&lt;br /&gt;
== 入出力 ==&lt;br /&gt;
&lt;br /&gt;
=== File descriptors ===&lt;br /&gt;
Like other shells, fish lets you redirect input/output streams. This is useful when using text files to save programs output or errors, or when using text files as input. Most programs use three input/output streams, represented by numbers called file descriptors (FD). These are:&lt;br /&gt;
&lt;br /&gt;
* Standard input (FD 0), used for reading (keyboard by default).&lt;br /&gt;
* Standard output (FD 1), used for writing (screen by default).&lt;br /&gt;
* Standard error (FD 2), used for displaying errors and warnings (screen by default).&lt;br /&gt;
&lt;br /&gt;
=== リダイレクト ===&lt;br /&gt;
Any file descriptor can be directed to other files through a mechanism called redirection:&lt;br /&gt;
&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard input:&#039;&#039;&lt;br /&gt;
$ command &amp;lt; source_file&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard output to an existing file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt;&amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard error:&#039;&#039;&lt;br /&gt;
$ command ^ destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard error to an existing file:&#039;&#039;&lt;br /&gt;
$ command ^^ destination}}&lt;br /&gt;
&lt;br /&gt;
You can use one of the following as {{ic|destination}}:&lt;br /&gt;
&lt;br /&gt;
* A filename (the output will be written to the specified file).&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by the number of another file descriptor. The output will be written to the other file descriptor.&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by a {{ic|-}} sign. The output will not be written anywhere.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard output to a file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting both standard output and standard error to the same file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt ^ &amp;amp;1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Silencing standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; &amp;amp;-}}&lt;br /&gt;
&lt;br /&gt;
=== パイプ ===&lt;br /&gt;
&lt;br /&gt;
You can redirect standard output of one command to standard input of the next command. This is done by separating the commands by the pipe character ({{ic|&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;}}). Example:&lt;br /&gt;
&lt;br /&gt;
 cat example.txt | head&lt;br /&gt;
&lt;br /&gt;
You can redirect other file descriptors to the pipe (besides standard output). The next example shows how to use standard error of one command as standard input of another command, prepending standard error file descriptor&#039;s number and {{ic|&amp;gt;}} to the pipe:&lt;br /&gt;
&lt;br /&gt;
 $ command 2&amp;gt;| less&lt;br /&gt;
&lt;br /&gt;
This will run {{ic|command}} and redirect its standard error to the {{ic|less}} command.&lt;br /&gt;
&lt;br /&gt;
== 設定 ==&lt;br /&gt;
fishのユーザ設定ファイルは {{ic|~/.config/fish/config.fish}} に位置しています。&lt;br /&gt;
&lt;br /&gt;
{{ic|.bashrc}} と同じように、ターミナルが開かれる時に実行/定義されるコマンド、関数を追加します。&lt;br /&gt;
&lt;br /&gt;
=== ウェブインターフェイス ===&lt;br /&gt;
&lt;br /&gt;
fish のプロンプトとターミナルの色はウェブインターフェイスで対話的に設定できます:&lt;br /&gt;
&lt;br /&gt;
 fish_config&lt;br /&gt;
&lt;br /&gt;
選択した設定は、個人用の設定ファイルに書き込まれます。また、定義された関数と履歴を表示することができます&lt;br /&gt;
&lt;br /&gt;
=== プロンプト ===&lt;br /&gt;
&lt;br /&gt;
If you would like fish to display the branch and dirty status when you are in a git directory, you can add the following to your {{ic|~/.config/fish/config.fish}}:&lt;br /&gt;
{{bc|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# fish git prompt&lt;br /&gt;
set __fish_git_prompt_showdirtystate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showstashstate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showupstream &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_color_branch yellow&lt;br /&gt;
&lt;br /&gt;
# Status Chars&lt;br /&gt;
set __fish_git_prompt_char_dirtystate &#039;⚡&#039;&lt;br /&gt;
set __fish_git_prompt_char_stagedstate &#039;→&#039;&lt;br /&gt;
set __fish_git_prompt_char_stashstate &#039;↩&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_ahead &#039;↑&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_behind &#039;↓&#039;&lt;br /&gt;
 &lt;br /&gt;
function fish_prompt&lt;br /&gt;
        set last_status $status&lt;br /&gt;
        set_color $fish_color_cwd&lt;br /&gt;
        printf &#039;%s&#039; (prompt_pwd)&lt;br /&gt;
        set_color normal&lt;br /&gt;
        printf &#039;%s &#039; (__fish_git_prompt)&lt;br /&gt;
       set_color normal&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== コマンド補完 ===&lt;br /&gt;
&lt;br /&gt;
fish は man ページから自動補完を生成できます。{{ic|~/.config/fish/generated_completions/}} に補完が書き込まれており、以下を呼び出すことによって生成することができます:&lt;br /&gt;
&lt;br /&gt;
 fish_update_completions&lt;br /&gt;
&lt;br /&gt;
また、独自の補完を {{ic|~/.config/fish/completions/}} に定義できます。{{ic|/usr/share/fish/completions/}} でいくつかの例を見ることができます。&lt;br /&gt;
&lt;br /&gt;
fish の開発元のポリシーが、上流の tarball に存在する補完を全て含めるというものなので &#039;&#039;pacman&#039;&#039;, &#039;&#039;pacman-key&#039;&#039;, &#039;&#039;makepkg&#039;&#039;, &#039;&#039;cower&#039;&#039;, &#039;&#039;pbget&#039;&#039;, &#039;&#039;pacmatic&#039;&#039; などの Arch Linux 固有のコマンドの文脈に沿った補完も fish に含まれています。メモリ管理が賢いために、リソースに悪影響を与えることはありません。&lt;br /&gt;
&lt;br /&gt;
=== /etc/profile と ~/.profile の互換性 ===&lt;br /&gt;
&lt;br /&gt;
Since standard POSIX {{ic|sh}} syntax is not compatible with fish, fish will not be able to source {{ic|/etc/profile}} (and thus all {{ic|*.sh}} in {{ic|/etc/profile.d}}) and {{ic|~/.profile}}&lt;br /&gt;
&lt;br /&gt;
If you want fish to source those files, install {{Pkg|dash}} and add this line to your {{ic|config.fish}}:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c printenv | sed -e &#039;/PATH/s/:/ /g;s/=/ /;s/^/set -x /&#039; | source&lt;br /&gt;
&lt;br /&gt;
an alternative variant will save you one executable invocation by using a builtin command:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c &#039;export -p&#039; | sed -e &amp;quot;/PATH/s/&#039;//g;/PATH/s/:/ /g;s/=/ /;s/^export/set -x/&amp;quot; | source&lt;br /&gt;
&lt;br /&gt;
==Tips and Tricks==&lt;br /&gt;
===History Substitution===&lt;br /&gt;
Fish does not implement history substitution (e.g. {{ic|sudo !!}}), and the fish developers have said that they [http://fishshell.com/docs/current/faq.html#faq-history do not plan to]. Still, this is an essential piece of many users&#039; workflow. Reddit user, [http://www.reddit.com/u/crossroads1112 crossroads1112], created a function that regains some of the functionality of history substitution and with another syntax. The function is on [https://gist.github.com/crossroads1112/77badb2c3455e23b873b github] and instructions are included as comments in it. There is a [https://gist.github.com/b-/981892a65837ab0a387e forked version] that is closer to the original syntax and allows for {{ic|command !!}} if you specify the command in the helper function.&lt;br /&gt;
&lt;br /&gt;
== トラブルシューティング ==&lt;br /&gt;
&lt;br /&gt;
In Arch, there are a lot of shell scripts written for Bash, and these have not been translated to fish. It is advisable not to set fish as your default shell because of this. The best option is to open your terminal emulator with a command line option that executes fish. For most terminals this is the {{ic|-e}} switch, so for example, to open gnome-terminal using fish, change your shortcut to use:&lt;br /&gt;
&lt;br /&gt;
 gnome-terminal -e fish&lt;br /&gt;
&lt;br /&gt;
With LilyTerm and other light terminal emulators that do not support setting the shell it would look like this:&lt;br /&gt;
&lt;br /&gt;
 SHELL=/usr/bin/fish lilyterm&lt;br /&gt;
&lt;br /&gt;
Another option is to set fish as the default shell for the terminal in the terminal&#039;s configuration or for a terminal profile if your terminal emulator has a profiles feature. This is contrast to changing the default shell for the user which would cause the above mentioned problem.&lt;br /&gt;
&lt;br /&gt;
To set fish as the shell started in tmux, put this into your {{ic|~/.tmux.conf}}:&lt;br /&gt;
&lt;br /&gt;
 set-option -g default-shell &amp;quot;/usr/bin/fish&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Not setting fish as system wide default allows the arch scripts to run on startup, ensure the environment variables are set correctly, and generally reduces the issues associated with using a non-Bash compatible terminal like fish.&lt;br /&gt;
&lt;br /&gt;
If you decide to set fish as your default shell, you may find that you no longer have very much in your path.&lt;br /&gt;
You can add a section to your {{ic|~/.config/fish/config.fish}} file that will set your path correctly on login. This is much like {{ic|.profile}} or {{ic|.bash_profile}} as it is only executed for login shells.&lt;br /&gt;
&lt;br /&gt;
{{bc|&lt;br /&gt;
if status --is-login&lt;br /&gt;
        set PATH $PATH /usr/bin /sbin&lt;br /&gt;
end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that you will need to manually add various other environment variables, such as {{ic|$MOZ_PLUGIN_PATH}}. It is a huge amount of work to get a seamless experience with fish as your default shell.&lt;br /&gt;
&lt;br /&gt;
=== su で bash が起動する ===&lt;br /&gt;
&lt;br /&gt;
su で bash が起動する場合 (Bash がデフォルトシェルのため)、fish に関数を定義してください:&lt;br /&gt;
&lt;br /&gt;
 $ funced su&lt;br /&gt;
 function su&lt;br /&gt;
         /bin/su --shell=/usr/bin/fish $argv&lt;br /&gt;
 end&lt;br /&gt;
 $ funcsave su&lt;br /&gt;
&lt;br /&gt;
=== ログイン時に X を起動 ===&lt;br /&gt;
&lt;br /&gt;
{{ic|~/.config/fish/config.fish}} の一番下に以下を追加します:&lt;br /&gt;
&lt;br /&gt;
{{bc|1=&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# start X at login&lt;br /&gt;
if status --is-login&lt;br /&gt;
    if test -z &amp;quot;$DISPLAY&amp;quot; -a $XDG_VTNR -eq 1&lt;br /&gt;
        exec startx -- -keeptty&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Note|fish 使用時に {{ic|startx}} が {{ic|-keeptty}} フラグを必要とする理由については [https://github.com/fish-shell/fish-shell/issues/1772 この記事] を参照してください。}}&lt;br /&gt;
&lt;br /&gt;
== 参照 ==&lt;br /&gt;
&lt;br /&gt;
* http://fishshell.com/ - ホームページ&lt;br /&gt;
* http://fishshell.com/docs/2.1/index.html - ドキュメント&lt;/div&gt;</summary>
		<author><name>はつせ</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3790</id>
		<title>Fish</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3790"/>
		<updated>2015-10-24T09:41:01Z</updated>

		<summary type="html">&lt;p&gt;はつせ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase title}}&lt;br /&gt;
[[Category:Command shells]]&lt;br /&gt;
[[de:Fish]]&lt;br /&gt;
[[en:Fish]]&lt;br /&gt;
[[ru:Fish]]&lt;br /&gt;
&#039;&#039;&#039;fish&#039;&#039;&#039; (&#039;&#039;&#039;friendly interactive shell&#039;&#039;&#039;)は主に対話的に使用することを意図されたユーザフレンドリーなコマンドラインシェルです。&lt;br /&gt;
&lt;br /&gt;
== インストール ==&lt;br /&gt;
&lt;br /&gt;
[[公式リポジトリ]]より、[http://fishshell.com/ 主流fork]の安定版{{Pkg|fish}}パッケージを[[pacman|インストール]]できます。&lt;br /&gt;
&lt;br /&gt;
最新の開発版は[[AUR]]より  {{AUR|fish-shell-git}}{{Broken package link|{{aur-mirror|fish-shell-git}}}}を[[pacman|インストール]]します。 &lt;br /&gt;
&lt;br /&gt;
2011年に[https://github.com/liljencrantz オリジナルの開発者]によって[http://www.mail-archive.com/fish-users@lists.sourceforge.net/msg02893.html 中止された]従来のバージョンは[[AUR]]より&lt;br /&gt;
{{AUR|fish-git}}を[[pacman|インストール]]します。&lt;br /&gt;
&lt;br /&gt;
fishをデフォルトシェルにするには、{{ic|chsh -s /usr/bin/fish}}を実行します。&lt;br /&gt;
&lt;br /&gt;
== 入出力 ==&lt;br /&gt;
&lt;br /&gt;
=== File descriptors ===&lt;br /&gt;
Like other shells, fish lets you redirect input/output streams. This is useful when using text files to save programs output or errors, or when using text files as input. Most programs use three input/output streams, represented by numbers called file descriptors (FD). These are:&lt;br /&gt;
&lt;br /&gt;
* Standard input (FD 0), used for reading (keyboard by default).&lt;br /&gt;
* Standard output (FD 1), used for writing (screen by default).&lt;br /&gt;
* Standard error (FD 2), used for displaying errors and warnings (screen by default).&lt;br /&gt;
&lt;br /&gt;
=== リダイレクト ===&lt;br /&gt;
Any file descriptor can be directed to other files through a mechanism called redirection:&lt;br /&gt;
&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard input:&#039;&#039;&lt;br /&gt;
$ command &amp;lt; source_file&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard output to an existing file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt;&amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard error:&#039;&#039;&lt;br /&gt;
$ command ^ destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard error to an existing file:&#039;&#039;&lt;br /&gt;
$ command ^^ destination}}&lt;br /&gt;
&lt;br /&gt;
You can use one of the following as {{ic|destination}}:&lt;br /&gt;
&lt;br /&gt;
* A filename (the output will be written to the specified file).&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by the number of another file descriptor. The output will be written to the other file descriptor.&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by a {{ic|-}} sign. The output will not be written anywhere.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard output to a file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting both standard output and standard error to the same file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt ^ &amp;amp;1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Silencing standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; &amp;amp;-}}&lt;br /&gt;
&lt;br /&gt;
=== パイプ ===&lt;br /&gt;
&lt;br /&gt;
You can redirect standard output of one command to standard input of the next command. This is done by separating the commands by the pipe character ({{ic|&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;}}). Example:&lt;br /&gt;
&lt;br /&gt;
 cat example.txt | head&lt;br /&gt;
&lt;br /&gt;
You can redirect other file descriptors to the pipe (besides standard output). The next example shows how to use standard error of one command as standard input of another command, prepending standard error file descriptor&#039;s number and {{ic|&amp;gt;}} to the pipe:&lt;br /&gt;
&lt;br /&gt;
 $ command 2&amp;gt;| less&lt;br /&gt;
&lt;br /&gt;
This will run {{ic|command}} and redirect its standard error to the {{ic|less}} command.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
User configurations for fish are located at {{ic|~/.config/fish/config.fish}}. Adding commands or functions to the file will execute/define them when opening a terminal, similar to {{ic|.bashrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
The fish prompt and terminal colors can be set with the interactive web interface:&lt;br /&gt;
&lt;br /&gt;
 fish_config&lt;br /&gt;
&lt;br /&gt;
Selected settings are written to your personal configuration file. You can also view defined functions and your history.&lt;br /&gt;
&lt;br /&gt;
=== プロンプト ===&lt;br /&gt;
&lt;br /&gt;
If you would like fish to display the branch and dirty status when you are in a git directory, you can add the following to your {{ic|~/.config/fish/config.fish}}:&lt;br /&gt;
{{bc|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# fish git prompt&lt;br /&gt;
set __fish_git_prompt_showdirtystate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showstashstate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showupstream &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_color_branch yellow&lt;br /&gt;
&lt;br /&gt;
# Status Chars&lt;br /&gt;
set __fish_git_prompt_char_dirtystate &#039;⚡&#039;&lt;br /&gt;
set __fish_git_prompt_char_stagedstate &#039;→&#039;&lt;br /&gt;
set __fish_git_prompt_char_stashstate &#039;↩&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_ahead &#039;↑&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_behind &#039;↓&#039;&lt;br /&gt;
 &lt;br /&gt;
function fish_prompt&lt;br /&gt;
        set last_status $status&lt;br /&gt;
        set_color $fish_color_cwd&lt;br /&gt;
        printf &#039;%s&#039; (prompt_pwd)&lt;br /&gt;
        set_color normal&lt;br /&gt;
        printf &#039;%s &#039; (__fish_git_prompt)&lt;br /&gt;
       set_color normal&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== コマンド補完 ===&lt;br /&gt;
&lt;br /&gt;
fishはmanページより自動補完を生成できます。{{ic|~/.config/fish/generated_completions/}} に補完が書き込まれており、以下を呼び出すことによって生成することができます。&lt;br /&gt;
&lt;br /&gt;
 fish_update_completions&lt;br /&gt;
&lt;br /&gt;
また、独自の補完を {{ic|~/.config/fish/completions/}}に定義できます。{{ic|/usr/share/fish/completions/}}でいくつかの例を見ることができる。&lt;br /&gt;
&lt;br /&gt;
fish開発のポリシーが上流のtarball内に存在する補完を全て含んで以来、&#039;&#039;pacman&#039;&#039;, &#039;&#039;pacman-key&#039;&#039;, &#039;&#039;makepkg&#039;&#039;, &#039;&#039;cower&#039;&#039;, &#039;&#039;pbget&#039;&#039;, &#039;&#039;pacmatic&#039;&#039;のようなArch Linux固有のコマンドのための文脈補完がfishに含まれています。メモリ管理は、リソースへの悪影響を回避するのに十分賢いです。&lt;br /&gt;
&lt;br /&gt;
=== /etc/profile and ~/.profile compatibility ===&lt;br /&gt;
&lt;br /&gt;
Since standard POSIX {{ic|sh}} syntax is not compatible with fish, fish will not be able to source {{ic|/etc/profile}} (and thus all {{ic|*.sh}} in {{ic|/etc/profile.d}}) and {{ic|~/.profile}}&lt;br /&gt;
&lt;br /&gt;
If you want fish to source those files, install {{Pkg|dash}} and add this line to your {{ic|config.fish}}:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c printenv | sed -e &#039;/PATH/s/:/ /g;s/=/ /;s/^/set -x /&#039; | source&lt;br /&gt;
&lt;br /&gt;
an alternative variant will save you one executable invocation by using a builtin command:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c &#039;export -p&#039; | sed -e &amp;quot;/PATH/s/&#039;//g;/PATH/s/:/ /g;s/=/ /;s/^export/set -x/&amp;quot; | source&lt;br /&gt;
&lt;br /&gt;
==Tips and Tricks==&lt;br /&gt;
===History Substitution===&lt;br /&gt;
Fish does not implement history substitution (e.g. {{ic|sudo !!}}), and the fish developers have said that they [http://fishshell.com/docs/current/faq.html#faq-history do not plan to]. Still, this is an essential piece of many users&#039; workflow. Reddit user, [http://www.reddit.com/u/crossroads1112 crossroads1112], created a function that regains some of the functionality of history substitution and with another syntax. The function is on [https://gist.github.com/crossroads1112/77badb2c3455e23b873b github] and instructions are included as comments in it. There is a [https://gist.github.com/b-/981892a65837ab0a387e forked version] that is closer to the original syntax and allows for {{ic|command !!}} if you specify the command in the helper function.&lt;br /&gt;
&lt;br /&gt;
== トラブルシューティング ==&lt;br /&gt;
&lt;br /&gt;
{{Accuracy|Changing the default shell should not interfere with the execution of shell scripts, so long as they begin with a proper [https://en.wikipedia.org/wiki/Shebang_%28Unix%29 shebang line].}}&lt;br /&gt;
&lt;br /&gt;
In Arch, there are a lot of shell scripts written for Bash, and these have not been translated to fish. It is advisable not to set fish as your default shell because of this. The best option is to open your terminal emulator with a command line option that executes fish. For most terminals this is the {{ic|-e}} switch, so for example, to open gnome-terminal using fish, change your shortcut to use:&lt;br /&gt;
&lt;br /&gt;
 gnome-terminal -e fish&lt;br /&gt;
&lt;br /&gt;
With LilyTerm and other light terminal emulators that do not support setting the shell it would look like this:&lt;br /&gt;
&lt;br /&gt;
 SHELL=/usr/bin/fish lilyterm&lt;br /&gt;
&lt;br /&gt;
Another option is to set fish as the default shell for the terminal in the terminal&#039;s configuration or for a terminal profile if your terminal emulator has a profiles feature. This is contrast to changing the default shell for the user which would cause the above mentioned problem.&lt;br /&gt;
&lt;br /&gt;
To set fish as the shell started in tmux, put this into your {{ic|~/.tmux.conf}}:&lt;br /&gt;
&lt;br /&gt;
 set-option -g default-shell &amp;quot;/usr/bin/fish&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Not setting fish as system wide default allows the arch scripts to run on startup, ensure the environment variables are set correctly, and generally reduces the issues associated with using a non-Bash compatible terminal like fish.&lt;br /&gt;
&lt;br /&gt;
If you decide to set fish as your default shell, you may find that you no longer have very much in your path.&lt;br /&gt;
You can add a section to your {{ic|~/.config/fish/config.fish}} file that will set your path correctly on login. This is much like {{ic|.profile}} or {{ic|.bash_profile}} as it is only executed for login shells.&lt;br /&gt;
&lt;br /&gt;
{{bc|&lt;br /&gt;
if status --is-login&lt;br /&gt;
        set PATH $PATH /usr/bin /sbin&lt;br /&gt;
end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that you will need to manually add various other environment variables, such as {{ic|$MOZ_PLUGIN_PATH}}. It is a huge amount of work to get a seamless experience with fish as your default shell.&lt;br /&gt;
&lt;br /&gt;
=== suでbashが起動 ===&lt;br /&gt;
&lt;br /&gt;
もし、suでbashが起動する場合(Bashがデフォルトシェルのため), fishに関数を定義します。&lt;br /&gt;
&lt;br /&gt;
 $ funced su&lt;br /&gt;
 function su&lt;br /&gt;
         /bin/su --shell=/usr/bin/fish $argv&lt;br /&gt;
 end&lt;br /&gt;
 $ funcsave su&lt;br /&gt;
&lt;br /&gt;
=== ログイン時にXを起動 ===&lt;br /&gt;
&lt;br /&gt;
{{ic|~/.config/fish/config.fish}}の一番下に以下を追加します。&lt;br /&gt;
&lt;br /&gt;
{{bc|1=&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# start X at login&lt;br /&gt;
if status --is-login&lt;br /&gt;
    if test -z &amp;quot;$DISPLAY&amp;quot; -a $XDG_VTNR -eq 1&lt;br /&gt;
        exec startx -- -keeptty&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Note|fish使用時に{{ic|startx}}が{{ic|-keeptty}}フラグを必要とする理由については[https://github.com/fish-shell/fish-shell/issues/1772 この記事]を参照してください。}}&lt;br /&gt;
&lt;br /&gt;
== 参照 ==&lt;br /&gt;
&lt;br /&gt;
* http://fishshell.com/ - ホームページ&lt;br /&gt;
* http://fishshell.com/docs/2.1/index.html - ドキュメント&lt;/div&gt;</summary>
		<author><name>はつせ</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3789</id>
		<title>Fish</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3789"/>
		<updated>2015-10-24T08:12:18Z</updated>

		<summary type="html">&lt;p&gt;はつせ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase title}}&lt;br /&gt;
[[Category:Command shells]]&lt;br /&gt;
[[de:Fish]]&lt;br /&gt;
[[en:Fish]]&lt;br /&gt;
[[ru:Fish]]&lt;br /&gt;
&#039;&#039;&#039;fish&#039;&#039;&#039; (&#039;&#039;&#039;friendly interactive shell&#039;&#039;&#039;)は主に対話的に使用することを意図されたユーザフレンドリーなコマンドラインシェルです。&lt;br /&gt;
&lt;br /&gt;
== インストール ==&lt;br /&gt;
&lt;br /&gt;
[[公式リポジトリ]]より、[http://fishshell.com/ 主流fork]の安定版{{Pkg|fish}}パッケージを[[pacman|インストール]]できます。&lt;br /&gt;
&lt;br /&gt;
最新の開発版は[[AUR]]より  {{AUR|fish-shell-git}}{{Broken package link|{{aur-mirror|fish-shell-git}}}}を[[pacman|インストール]]します。 &lt;br /&gt;
&lt;br /&gt;
2011年に[https://github.com/liljencrantz オリジナルの開発者]によって[http://www.mail-archive.com/fish-users@lists.sourceforge.net/msg02893.html 中止された]従来のバージョンは[[AUR]]より&lt;br /&gt;
{{AUR|fish-git}}を[[pacman|インストール]]します。&lt;br /&gt;
&lt;br /&gt;
fishをデフォルトシェルにするには、{{ic|chsh -s /usr/bin/fish}}を実行します。&lt;br /&gt;
&lt;br /&gt;
== 入力/出力 ==&lt;br /&gt;
&lt;br /&gt;
=== File descriptors ===&lt;br /&gt;
Like other shells, fish lets you redirect input/output streams. This is useful when using text files to save programs output or errors, or when using text files as input. Most programs use three input/output streams, represented by numbers called file descriptors (FD). These are:&lt;br /&gt;
&lt;br /&gt;
* Standard input (FD 0), used for reading (keyboard by default).&lt;br /&gt;
* Standard output (FD 1), used for writing (screen by default).&lt;br /&gt;
* Standard error (FD 2), used for displaying errors and warnings (screen by default).&lt;br /&gt;
&lt;br /&gt;
=== リダイレクト ===&lt;br /&gt;
Any file descriptor can be directed to other files through a mechanism called redirection:&lt;br /&gt;
&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard input:&#039;&#039;&lt;br /&gt;
$ command &amp;lt; source_file&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard output to an existing file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt;&amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard error:&#039;&#039;&lt;br /&gt;
$ command ^ destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard error to an existing file:&#039;&#039;&lt;br /&gt;
$ command ^^ destination}}&lt;br /&gt;
&lt;br /&gt;
You can use one of the following as {{ic|destination}}:&lt;br /&gt;
&lt;br /&gt;
* A filename (the output will be written to the specified file).&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by the number of another file descriptor. The output will be written to the other file descriptor.&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by a {{ic|-}} sign. The output will not be written anywhere.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard output to a file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting both standard output and standard error to the same file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt ^ &amp;amp;1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Silencing standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; &amp;amp;-}}&lt;br /&gt;
&lt;br /&gt;
=== パイプ ===&lt;br /&gt;
&lt;br /&gt;
You can redirect standard output of one command to standard input of the next command. This is done by separating the commands by the pipe character ({{ic|&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;}}). Example:&lt;br /&gt;
&lt;br /&gt;
 cat example.txt | head&lt;br /&gt;
&lt;br /&gt;
You can redirect other file descriptors to the pipe (besides standard output). The next example shows how to use standard error of one command as standard input of another command, prepending standard error file descriptor&#039;s number and {{ic|&amp;gt;}} to the pipe:&lt;br /&gt;
&lt;br /&gt;
 $ command 2&amp;gt;| less&lt;br /&gt;
&lt;br /&gt;
This will run {{ic|command}} and redirect its standard error to the {{ic|less}} command.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
User configurations for fish are located at {{ic|~/.config/fish/config.fish}}. Adding commands or functions to the file will execute/define them when opening a terminal, similar to {{ic|.bashrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
The fish prompt and terminal colors can be set with the interactive web interface:&lt;br /&gt;
&lt;br /&gt;
 fish_config&lt;br /&gt;
&lt;br /&gt;
Selected settings are written to your personal configuration file. You can also view defined functions and your history.&lt;br /&gt;
&lt;br /&gt;
=== プロンプト ===&lt;br /&gt;
&lt;br /&gt;
If you would like fish to display the branch and dirty status when you are in a git directory, you can add the following to your {{ic|~/.config/fish/config.fish}}:&lt;br /&gt;
{{bc|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# fish git prompt&lt;br /&gt;
set __fish_git_prompt_showdirtystate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showstashstate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showupstream &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_color_branch yellow&lt;br /&gt;
&lt;br /&gt;
# Status Chars&lt;br /&gt;
set __fish_git_prompt_char_dirtystate &#039;⚡&#039;&lt;br /&gt;
set __fish_git_prompt_char_stagedstate &#039;→&#039;&lt;br /&gt;
set __fish_git_prompt_char_stashstate &#039;↩&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_ahead &#039;↑&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_behind &#039;↓&#039;&lt;br /&gt;
 &lt;br /&gt;
function fish_prompt&lt;br /&gt;
        set last_status $status&lt;br /&gt;
        set_color $fish_color_cwd&lt;br /&gt;
        printf &#039;%s&#039; (prompt_pwd)&lt;br /&gt;
        set_color normal&lt;br /&gt;
        printf &#039;%s &#039; (__fish_git_prompt)&lt;br /&gt;
       set_color normal&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Command completion ===&lt;br /&gt;
&lt;br /&gt;
fish can generate autocompletions from man pages. Completions are written to {{ic|~/.config/fish/generated_completions/}} and can be generated by calling:&lt;br /&gt;
&lt;br /&gt;
 fish_update_completions&lt;br /&gt;
&lt;br /&gt;
You can also define your own completions in {{ic|~/.config/fish/completions/}}. See {{ic|/usr/share/fish/completions/}} for a few examples.&lt;br /&gt;
&lt;br /&gt;
Context-aware completions for Arch Linux-specific commands like &#039;&#039;pacman&#039;&#039;, &#039;&#039;pacman-key&#039;&#039;, &#039;&#039;makepkg&#039;&#039;, &#039;&#039;cower&#039;&#039;, &#039;&#039;pbget&#039;&#039;, &#039;&#039;pacmatic&#039;&#039; are built into fish, since the policy of the fish development is to include all the existent completions in the upstream tarball. The memory management is clever enough to avoid any negative impact on resources.&lt;br /&gt;
&lt;br /&gt;
=== /etc/profile and ~/.profile compatibility ===&lt;br /&gt;
&lt;br /&gt;
Since standard POSIX {{ic|sh}} syntax is not compatible with fish, fish will not be able to source {{ic|/etc/profile}} (and thus all {{ic|*.sh}} in {{ic|/etc/profile.d}}) and {{ic|~/.profile}}&lt;br /&gt;
&lt;br /&gt;
If you want fish to source those files, install {{Pkg|dash}} and add this line to your {{ic|config.fish}}:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c printenv | sed -e &#039;/PATH/s/:/ /g;s/=/ /;s/^/set -x /&#039; | source&lt;br /&gt;
&lt;br /&gt;
an alternative variant will save you one executable invocation by using a builtin command:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c &#039;export -p&#039; | sed -e &amp;quot;/PATH/s/&#039;//g;/PATH/s/:/ /g;s/=/ /;s/^export/set -x/&amp;quot; | source&lt;br /&gt;
&lt;br /&gt;
==Tips and Tricks==&lt;br /&gt;
===History Substitution===&lt;br /&gt;
Fish does not implement history substitution (e.g. {{ic|sudo !!}}), and the fish developers have said that they [http://fishshell.com/docs/current/faq.html#faq-history do not plan to]. Still, this is an essential piece of many users&#039; workflow. Reddit user, [http://www.reddit.com/u/crossroads1112 crossroads1112], created a function that regains some of the functionality of history substitution and with another syntax. The function is on [https://gist.github.com/crossroads1112/77badb2c3455e23b873b github] and instructions are included as comments in it. There is a [https://gist.github.com/b-/981892a65837ab0a387e forked version] that is closer to the original syntax and allows for {{ic|command !!}} if you specify the command in the helper function.&lt;br /&gt;
&lt;br /&gt;
== トラブルシューティング ==&lt;br /&gt;
&lt;br /&gt;
{{Accuracy|Changing the default shell should not interfere with the execution of shell scripts, so long as they begin with a proper [https://en.wikipedia.org/wiki/Shebang_%28Unix%29 shebang line].}}&lt;br /&gt;
&lt;br /&gt;
In Arch, there are a lot of shell scripts written for Bash, and these have not been translated to fish. It is advisable not to set fish as your default shell because of this. The best option is to open your terminal emulator with a command line option that executes fish. For most terminals this is the {{ic|-e}} switch, so for example, to open gnome-terminal using fish, change your shortcut to use:&lt;br /&gt;
&lt;br /&gt;
 gnome-terminal -e fish&lt;br /&gt;
&lt;br /&gt;
With LilyTerm and other light terminal emulators that do not support setting the shell it would look like this:&lt;br /&gt;
&lt;br /&gt;
 SHELL=/usr/bin/fish lilyterm&lt;br /&gt;
&lt;br /&gt;
Another option is to set fish as the default shell for the terminal in the terminal&#039;s configuration or for a terminal profile if your terminal emulator has a profiles feature. This is contrast to changing the default shell for the user which would cause the above mentioned problem.&lt;br /&gt;
&lt;br /&gt;
To set fish as the shell started in tmux, put this into your {{ic|~/.tmux.conf}}:&lt;br /&gt;
&lt;br /&gt;
 set-option -g default-shell &amp;quot;/usr/bin/fish&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Not setting fish as system wide default allows the arch scripts to run on startup, ensure the environment variables are set correctly, and generally reduces the issues associated with using a non-Bash compatible terminal like fish.&lt;br /&gt;
&lt;br /&gt;
If you decide to set fish as your default shell, you may find that you no longer have very much in your path.&lt;br /&gt;
You can add a section to your {{ic|~/.config/fish/config.fish}} file that will set your path correctly on login. This is much like {{ic|.profile}} or {{ic|.bash_profile}} as it is only executed for login shells.&lt;br /&gt;
&lt;br /&gt;
{{bc|&lt;br /&gt;
if status --is-login&lt;br /&gt;
        set PATH $PATH /usr/bin /sbin&lt;br /&gt;
end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that you will need to manually add various other environment variables, such as {{ic|$MOZ_PLUGIN_PATH}}. It is a huge amount of work to get a seamless experience with fish as your default shell.&lt;br /&gt;
&lt;br /&gt;
=== suでbashが起動 ===&lt;br /&gt;
&lt;br /&gt;
もし、suでbashが起動する場合(Bashがデフォルトシェルのため), fishに関数を定義します。&lt;br /&gt;
&lt;br /&gt;
 $ funced su&lt;br /&gt;
 function su&lt;br /&gt;
         /bin/su --shell=/usr/bin/fish $argv&lt;br /&gt;
 end&lt;br /&gt;
 $ funcsave su&lt;br /&gt;
&lt;br /&gt;
=== ログイン時にXを起動 ===&lt;br /&gt;
&lt;br /&gt;
{{ic|~/.config/fish/config.fish}}の一番下に以下を追加します。&lt;br /&gt;
&lt;br /&gt;
{{bc|1=&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# start X at login&lt;br /&gt;
if status --is-login&lt;br /&gt;
    if test -z &amp;quot;$DISPLAY&amp;quot; -a $XDG_VTNR -eq 1&lt;br /&gt;
        exec startx -- -keeptty&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Note|fish使用時に{{ic|startx}}が{{ic|-keeptty}}フラグを必要とする理由については[https://github.com/fish-shell/fish-shell/issues/1772 この記事]を参照してください。}}&lt;br /&gt;
&lt;br /&gt;
== 参照 ==&lt;br /&gt;
&lt;br /&gt;
* http://fishshell.com/ - ホームページ&lt;br /&gt;
* http://fishshell.com/docs/2.1/index.html - ドキュメント&lt;/div&gt;</summary>
		<author><name>はつせ</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3788</id>
		<title>Fish</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3788"/>
		<updated>2015-10-24T08:11:50Z</updated>

		<summary type="html">&lt;p&gt;はつせ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase title}}&lt;br /&gt;
[[Category:Command shells]]&lt;br /&gt;
[[de:Fish]]&lt;br /&gt;
[[en:Fish]]&lt;br /&gt;
[[ru:Fish]]&lt;br /&gt;
&#039;&#039;&#039;fish&#039;&#039;&#039; (&#039;&#039;&#039;friendly interactive shell&#039;&#039;&#039;)は主に対話的に使用することを意図されたユーザフレンドリーなコマンドラインシェルです。&lt;br /&gt;
&lt;br /&gt;
== インストール ==&lt;br /&gt;
&lt;br /&gt;
[[公式リポジトリ]]より、[http://fishshell.com/ 主流fork]の安定版{{Pkg|fish}}パッケージを[[pacman|インストール]]できます。&lt;br /&gt;
&lt;br /&gt;
最新の開発版は[[AUR]]より  {{AUR|fish-shell-git}}{{Broken package link|{{aur-mirror|fish-shell-git}}}} を[[pacman|インストール]]します。 &lt;br /&gt;
&lt;br /&gt;
2011年に[https://github.com/liljencrantz オリジナルの開発者]によって[http://www.mail-archive.com/fish-users@lists.sourceforge.net/msg02893.html 中止された]従来のバージョンは[[AUR]]より&lt;br /&gt;
 {{AUR|fish-git}}を[[pacman|インストール]]します。&lt;br /&gt;
&lt;br /&gt;
fishをデフォルトシェルにするには、{{ic|chsh -s /usr/bin/fish}}を実行します。&lt;br /&gt;
&lt;br /&gt;
== 入力/出力 ==&lt;br /&gt;
&lt;br /&gt;
=== File descriptors ===&lt;br /&gt;
Like other shells, fish lets you redirect input/output streams. This is useful when using text files to save programs output or errors, or when using text files as input. Most programs use three input/output streams, represented by numbers called file descriptors (FD). These are:&lt;br /&gt;
&lt;br /&gt;
* Standard input (FD 0), used for reading (keyboard by default).&lt;br /&gt;
* Standard output (FD 1), used for writing (screen by default).&lt;br /&gt;
* Standard error (FD 2), used for displaying errors and warnings (screen by default).&lt;br /&gt;
&lt;br /&gt;
=== リダイレクト ===&lt;br /&gt;
Any file descriptor can be directed to other files through a mechanism called redirection:&lt;br /&gt;
&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard input:&#039;&#039;&lt;br /&gt;
$ command &amp;lt; source_file&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard output to an existing file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt;&amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard error:&#039;&#039;&lt;br /&gt;
$ command ^ destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard error to an existing file:&#039;&#039;&lt;br /&gt;
$ command ^^ destination}}&lt;br /&gt;
&lt;br /&gt;
You can use one of the following as {{ic|destination}}:&lt;br /&gt;
&lt;br /&gt;
* A filename (the output will be written to the specified file).&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by the number of another file descriptor. The output will be written to the other file descriptor.&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by a {{ic|-}} sign. The output will not be written anywhere.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard output to a file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting both standard output and standard error to the same file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt ^ &amp;amp;1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Silencing standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; &amp;amp;-}}&lt;br /&gt;
&lt;br /&gt;
=== パイプ ===&lt;br /&gt;
&lt;br /&gt;
You can redirect standard output of one command to standard input of the next command. This is done by separating the commands by the pipe character ({{ic|&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;}}). Example:&lt;br /&gt;
&lt;br /&gt;
 cat example.txt | head&lt;br /&gt;
&lt;br /&gt;
You can redirect other file descriptors to the pipe (besides standard output). The next example shows how to use standard error of one command as standard input of another command, prepending standard error file descriptor&#039;s number and {{ic|&amp;gt;}} to the pipe:&lt;br /&gt;
&lt;br /&gt;
 $ command 2&amp;gt;| less&lt;br /&gt;
&lt;br /&gt;
This will run {{ic|command}} and redirect its standard error to the {{ic|less}} command.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
User configurations for fish are located at {{ic|~/.config/fish/config.fish}}. Adding commands or functions to the file will execute/define them when opening a terminal, similar to {{ic|.bashrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
The fish prompt and terminal colors can be set with the interactive web interface:&lt;br /&gt;
&lt;br /&gt;
 fish_config&lt;br /&gt;
&lt;br /&gt;
Selected settings are written to your personal configuration file. You can also view defined functions and your history.&lt;br /&gt;
&lt;br /&gt;
=== プロンプト ===&lt;br /&gt;
&lt;br /&gt;
If you would like fish to display the branch and dirty status when you are in a git directory, you can add the following to your {{ic|~/.config/fish/config.fish}}:&lt;br /&gt;
{{bc|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# fish git prompt&lt;br /&gt;
set __fish_git_prompt_showdirtystate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showstashstate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showupstream &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_color_branch yellow&lt;br /&gt;
&lt;br /&gt;
# Status Chars&lt;br /&gt;
set __fish_git_prompt_char_dirtystate &#039;⚡&#039;&lt;br /&gt;
set __fish_git_prompt_char_stagedstate &#039;→&#039;&lt;br /&gt;
set __fish_git_prompt_char_stashstate &#039;↩&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_ahead &#039;↑&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_behind &#039;↓&#039;&lt;br /&gt;
 &lt;br /&gt;
function fish_prompt&lt;br /&gt;
        set last_status $status&lt;br /&gt;
        set_color $fish_color_cwd&lt;br /&gt;
        printf &#039;%s&#039; (prompt_pwd)&lt;br /&gt;
        set_color normal&lt;br /&gt;
        printf &#039;%s &#039; (__fish_git_prompt)&lt;br /&gt;
       set_color normal&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Command completion ===&lt;br /&gt;
&lt;br /&gt;
fish can generate autocompletions from man pages. Completions are written to {{ic|~/.config/fish/generated_completions/}} and can be generated by calling:&lt;br /&gt;
&lt;br /&gt;
 fish_update_completions&lt;br /&gt;
&lt;br /&gt;
You can also define your own completions in {{ic|~/.config/fish/completions/}}. See {{ic|/usr/share/fish/completions/}} for a few examples.&lt;br /&gt;
&lt;br /&gt;
Context-aware completions for Arch Linux-specific commands like &#039;&#039;pacman&#039;&#039;, &#039;&#039;pacman-key&#039;&#039;, &#039;&#039;makepkg&#039;&#039;, &#039;&#039;cower&#039;&#039;, &#039;&#039;pbget&#039;&#039;, &#039;&#039;pacmatic&#039;&#039; are built into fish, since the policy of the fish development is to include all the existent completions in the upstream tarball. The memory management is clever enough to avoid any negative impact on resources.&lt;br /&gt;
&lt;br /&gt;
=== /etc/profile and ~/.profile compatibility ===&lt;br /&gt;
&lt;br /&gt;
Since standard POSIX {{ic|sh}} syntax is not compatible with fish, fish will not be able to source {{ic|/etc/profile}} (and thus all {{ic|*.sh}} in {{ic|/etc/profile.d}}) and {{ic|~/.profile}}&lt;br /&gt;
&lt;br /&gt;
If you want fish to source those files, install {{Pkg|dash}} and add this line to your {{ic|config.fish}}:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c printenv | sed -e &#039;/PATH/s/:/ /g;s/=/ /;s/^/set -x /&#039; | source&lt;br /&gt;
&lt;br /&gt;
an alternative variant will save you one executable invocation by using a builtin command:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c &#039;export -p&#039; | sed -e &amp;quot;/PATH/s/&#039;//g;/PATH/s/:/ /g;s/=/ /;s/^export/set -x/&amp;quot; | source&lt;br /&gt;
&lt;br /&gt;
==Tips and Tricks==&lt;br /&gt;
===History Substitution===&lt;br /&gt;
Fish does not implement history substitution (e.g. {{ic|sudo !!}}), and the fish developers have said that they [http://fishshell.com/docs/current/faq.html#faq-history do not plan to]. Still, this is an essential piece of many users&#039; workflow. Reddit user, [http://www.reddit.com/u/crossroads1112 crossroads1112], created a function that regains some of the functionality of history substitution and with another syntax. The function is on [https://gist.github.com/crossroads1112/77badb2c3455e23b873b github] and instructions are included as comments in it. There is a [https://gist.github.com/b-/981892a65837ab0a387e forked version] that is closer to the original syntax and allows for {{ic|command !!}} if you specify the command in the helper function.&lt;br /&gt;
&lt;br /&gt;
== トラブルシューティング ==&lt;br /&gt;
&lt;br /&gt;
{{Accuracy|Changing the default shell should not interfere with the execution of shell scripts, so long as they begin with a proper [https://en.wikipedia.org/wiki/Shebang_%28Unix%29 shebang line].}}&lt;br /&gt;
&lt;br /&gt;
In Arch, there are a lot of shell scripts written for Bash, and these have not been translated to fish. It is advisable not to set fish as your default shell because of this. The best option is to open your terminal emulator with a command line option that executes fish. For most terminals this is the {{ic|-e}} switch, so for example, to open gnome-terminal using fish, change your shortcut to use:&lt;br /&gt;
&lt;br /&gt;
 gnome-terminal -e fish&lt;br /&gt;
&lt;br /&gt;
With LilyTerm and other light terminal emulators that do not support setting the shell it would look like this:&lt;br /&gt;
&lt;br /&gt;
 SHELL=/usr/bin/fish lilyterm&lt;br /&gt;
&lt;br /&gt;
Another option is to set fish as the default shell for the terminal in the terminal&#039;s configuration or for a terminal profile if your terminal emulator has a profiles feature. This is contrast to changing the default shell for the user which would cause the above mentioned problem.&lt;br /&gt;
&lt;br /&gt;
To set fish as the shell started in tmux, put this into your {{ic|~/.tmux.conf}}:&lt;br /&gt;
&lt;br /&gt;
 set-option -g default-shell &amp;quot;/usr/bin/fish&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Not setting fish as system wide default allows the arch scripts to run on startup, ensure the environment variables are set correctly, and generally reduces the issues associated with using a non-Bash compatible terminal like fish.&lt;br /&gt;
&lt;br /&gt;
If you decide to set fish as your default shell, you may find that you no longer have very much in your path.&lt;br /&gt;
You can add a section to your {{ic|~/.config/fish/config.fish}} file that will set your path correctly on login. This is much like {{ic|.profile}} or {{ic|.bash_profile}} as it is only executed for login shells.&lt;br /&gt;
&lt;br /&gt;
{{bc|&lt;br /&gt;
if status --is-login&lt;br /&gt;
        set PATH $PATH /usr/bin /sbin&lt;br /&gt;
end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that you will need to manually add various other environment variables, such as {{ic|$MOZ_PLUGIN_PATH}}. It is a huge amount of work to get a seamless experience with fish as your default shell.&lt;br /&gt;
&lt;br /&gt;
=== suでbashが起動 ===&lt;br /&gt;
&lt;br /&gt;
もし、suでbashが起動する場合(Bashがデフォルトシェルのため), fishに関数を定義します。&lt;br /&gt;
&lt;br /&gt;
 $ funced su&lt;br /&gt;
 function su&lt;br /&gt;
         /bin/su --shell=/usr/bin/fish $argv&lt;br /&gt;
 end&lt;br /&gt;
 $ funcsave su&lt;br /&gt;
&lt;br /&gt;
=== ログイン時にXを起動 ===&lt;br /&gt;
&lt;br /&gt;
{{ic|~/.config/fish/config.fish}}の一番下に以下を追加します。&lt;br /&gt;
&lt;br /&gt;
{{bc|1=&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# start X at login&lt;br /&gt;
if status --is-login&lt;br /&gt;
    if test -z &amp;quot;$DISPLAY&amp;quot; -a $XDG_VTNR -eq 1&lt;br /&gt;
        exec startx -- -keeptty&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Note|fish使用時に{{ic|startx}}が{{ic|-keeptty}}フラグを必要とする理由については[https://github.com/fish-shell/fish-shell/issues/1772 この記事]を参照してください。}}&lt;br /&gt;
&lt;br /&gt;
== 参照 ==&lt;br /&gt;
&lt;br /&gt;
* http://fishshell.com/ - ホームページ&lt;br /&gt;
* http://fishshell.com/docs/2.1/index.html - ドキュメント&lt;/div&gt;</summary>
		<author><name>はつせ</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3787</id>
		<title>Fish</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3787"/>
		<updated>2015-10-24T07:36:30Z</updated>

		<summary type="html">&lt;p&gt;はつせ: /* suがbashで起動 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase title}}&lt;br /&gt;
[[Category:Command shells]]&lt;br /&gt;
[[de:Fish]]&lt;br /&gt;
[[en:Fish]]&lt;br /&gt;
[[ru:Fish]]&lt;br /&gt;
&#039;&#039;&#039;fish&#039;&#039;&#039; (&#039;&#039;&#039;friendly interactive shell&#039;&#039;&#039;)は主に対話的に使用することを意図されたユーザフレンドリーなコマンドラインシェルです。&lt;br /&gt;
&lt;br /&gt;
== インストール ==&lt;br /&gt;
&lt;br /&gt;
[[pacman|Install]] the {{Pkg|fish}} package from the [[official repositories]] for the stable version of the [http://fishshell.com/ mainstream fork] of the project.&lt;br /&gt;
&lt;br /&gt;
[[pacman|Install]] {{AUR|fish-shell-git}}{{Broken package link|{{aur-mirror|fish-shell-git}}}} from the [[AUR]] for the latest development version.&lt;br /&gt;
&lt;br /&gt;
[[pacman|Install]] {{AUR|fish-git}} from the [[AUR]] for the legacy version that was [http://www.mail-archive.com/fish-users@lists.sourceforge.net/msg02893.html discontinued] by its [https://github.com/liljencrantz original developer] in 2011.&lt;br /&gt;
&lt;br /&gt;
To make fish the default shell, run {{ic|chsh -s /usr/bin/fish}}.&lt;br /&gt;
&lt;br /&gt;
== 入力/出力 ==&lt;br /&gt;
&lt;br /&gt;
=== File descriptors ===&lt;br /&gt;
Like other shells, fish lets you redirect input/output streams. This is useful when using text files to save programs output or errors, or when using text files as input. Most programs use three input/output streams, represented by numbers called file descriptors (FD). These are:&lt;br /&gt;
&lt;br /&gt;
* Standard input (FD 0), used for reading (keyboard by default).&lt;br /&gt;
* Standard output (FD 1), used for writing (screen by default).&lt;br /&gt;
* Standard error (FD 2), used for displaying errors and warnings (screen by default).&lt;br /&gt;
&lt;br /&gt;
=== リダイレクト ===&lt;br /&gt;
Any file descriptor can be directed to other files through a mechanism called redirection:&lt;br /&gt;
&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard input:&#039;&#039;&lt;br /&gt;
$ command &amp;lt; source_file&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard output to an existing file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt;&amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard error:&#039;&#039;&lt;br /&gt;
$ command ^ destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard error to an existing file:&#039;&#039;&lt;br /&gt;
$ command ^^ destination}}&lt;br /&gt;
&lt;br /&gt;
You can use one of the following as {{ic|destination}}:&lt;br /&gt;
&lt;br /&gt;
* A filename (the output will be written to the specified file).&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by the number of another file descriptor. The output will be written to the other file descriptor.&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by a {{ic|-}} sign. The output will not be written anywhere.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard output to a file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting both standard output and standard error to the same file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt ^ &amp;amp;1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Silencing standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; &amp;amp;-}}&lt;br /&gt;
&lt;br /&gt;
=== パイプ ===&lt;br /&gt;
&lt;br /&gt;
You can redirect standard output of one command to standard input of the next command. This is done by separating the commands by the pipe character ({{ic|&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;}}). Example:&lt;br /&gt;
&lt;br /&gt;
 cat example.txt | head&lt;br /&gt;
&lt;br /&gt;
You can redirect other file descriptors to the pipe (besides standard output). The next example shows how to use standard error of one command as standard input of another command, prepending standard error file descriptor&#039;s number and {{ic|&amp;gt;}} to the pipe:&lt;br /&gt;
&lt;br /&gt;
 $ command 2&amp;gt;| less&lt;br /&gt;
&lt;br /&gt;
This will run {{ic|command}} and redirect its standard error to the {{ic|less}} command.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
User configurations for fish are located at {{ic|~/.config/fish/config.fish}}. Adding commands or functions to the file will execute/define them when opening a terminal, similar to {{ic|.bashrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
The fish prompt and terminal colors can be set with the interactive web interface:&lt;br /&gt;
&lt;br /&gt;
 fish_config&lt;br /&gt;
&lt;br /&gt;
Selected settings are written to your personal configuration file. You can also view defined functions and your history.&lt;br /&gt;
&lt;br /&gt;
=== プロンプト ===&lt;br /&gt;
&lt;br /&gt;
If you would like fish to display the branch and dirty status when you are in a git directory, you can add the following to your {{ic|~/.config/fish/config.fish}}:&lt;br /&gt;
{{bc|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# fish git prompt&lt;br /&gt;
set __fish_git_prompt_showdirtystate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showstashstate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showupstream &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_color_branch yellow&lt;br /&gt;
&lt;br /&gt;
# Status Chars&lt;br /&gt;
set __fish_git_prompt_char_dirtystate &#039;⚡&#039;&lt;br /&gt;
set __fish_git_prompt_char_stagedstate &#039;→&#039;&lt;br /&gt;
set __fish_git_prompt_char_stashstate &#039;↩&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_ahead &#039;↑&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_behind &#039;↓&#039;&lt;br /&gt;
 &lt;br /&gt;
function fish_prompt&lt;br /&gt;
        set last_status $status&lt;br /&gt;
        set_color $fish_color_cwd&lt;br /&gt;
        printf &#039;%s&#039; (prompt_pwd)&lt;br /&gt;
        set_color normal&lt;br /&gt;
        printf &#039;%s &#039; (__fish_git_prompt)&lt;br /&gt;
       set_color normal&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Command completion ===&lt;br /&gt;
&lt;br /&gt;
fish can generate autocompletions from man pages. Completions are written to {{ic|~/.config/fish/generated_completions/}} and can be generated by calling:&lt;br /&gt;
&lt;br /&gt;
 fish_update_completions&lt;br /&gt;
&lt;br /&gt;
You can also define your own completions in {{ic|~/.config/fish/completions/}}. See {{ic|/usr/share/fish/completions/}} for a few examples.&lt;br /&gt;
&lt;br /&gt;
Context-aware completions for Arch Linux-specific commands like &#039;&#039;pacman&#039;&#039;, &#039;&#039;pacman-key&#039;&#039;, &#039;&#039;makepkg&#039;&#039;, &#039;&#039;cower&#039;&#039;, &#039;&#039;pbget&#039;&#039;, &#039;&#039;pacmatic&#039;&#039; are built into fish, since the policy of the fish development is to include all the existent completions in the upstream tarball. The memory management is clever enough to avoid any negative impact on resources.&lt;br /&gt;
&lt;br /&gt;
=== /etc/profile and ~/.profile compatibility ===&lt;br /&gt;
&lt;br /&gt;
Since standard POSIX {{ic|sh}} syntax is not compatible with fish, fish will not be able to source {{ic|/etc/profile}} (and thus all {{ic|*.sh}} in {{ic|/etc/profile.d}}) and {{ic|~/.profile}}&lt;br /&gt;
&lt;br /&gt;
If you want fish to source those files, install {{Pkg|dash}} and add this line to your {{ic|config.fish}}:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c printenv | sed -e &#039;/PATH/s/:/ /g;s/=/ /;s/^/set -x /&#039; | source&lt;br /&gt;
&lt;br /&gt;
an alternative variant will save you one executable invocation by using a builtin command:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c &#039;export -p&#039; | sed -e &amp;quot;/PATH/s/&#039;//g;/PATH/s/:/ /g;s/=/ /;s/^export/set -x/&amp;quot; | source&lt;br /&gt;
&lt;br /&gt;
==Tips and Tricks==&lt;br /&gt;
===History Substitution===&lt;br /&gt;
Fish does not implement history substitution (e.g. {{ic|sudo !!}}), and the fish developers have said that they [http://fishshell.com/docs/current/faq.html#faq-history do not plan to]. Still, this is an essential piece of many users&#039; workflow. Reddit user, [http://www.reddit.com/u/crossroads1112 crossroads1112], created a function that regains some of the functionality of history substitution and with another syntax. The function is on [https://gist.github.com/crossroads1112/77badb2c3455e23b873b github] and instructions are included as comments in it. There is a [https://gist.github.com/b-/981892a65837ab0a387e forked version] that is closer to the original syntax and allows for {{ic|command !!}} if you specify the command in the helper function.&lt;br /&gt;
&lt;br /&gt;
== トラブルシューティング ==&lt;br /&gt;
&lt;br /&gt;
{{Accuracy|Changing the default shell should not interfere with the execution of shell scripts, so long as they begin with a proper [https://en.wikipedia.org/wiki/Shebang_%28Unix%29 shebang line].}}&lt;br /&gt;
&lt;br /&gt;
In Arch, there are a lot of shell scripts written for Bash, and these have not been translated to fish. It is advisable not to set fish as your default shell because of this. The best option is to open your terminal emulator with a command line option that executes fish. For most terminals this is the {{ic|-e}} switch, so for example, to open gnome-terminal using fish, change your shortcut to use:&lt;br /&gt;
&lt;br /&gt;
 gnome-terminal -e fish&lt;br /&gt;
&lt;br /&gt;
With LilyTerm and other light terminal emulators that do not support setting the shell it would look like this:&lt;br /&gt;
&lt;br /&gt;
 SHELL=/usr/bin/fish lilyterm&lt;br /&gt;
&lt;br /&gt;
Another option is to set fish as the default shell for the terminal in the terminal&#039;s configuration or for a terminal profile if your terminal emulator has a profiles feature. This is contrast to changing the default shell for the user which would cause the above mentioned problem.&lt;br /&gt;
&lt;br /&gt;
To set fish as the shell started in tmux, put this into your {{ic|~/.tmux.conf}}:&lt;br /&gt;
&lt;br /&gt;
 set-option -g default-shell &amp;quot;/usr/bin/fish&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Not setting fish as system wide default allows the arch scripts to run on startup, ensure the environment variables are set correctly, and generally reduces the issues associated with using a non-Bash compatible terminal like fish.&lt;br /&gt;
&lt;br /&gt;
If you decide to set fish as your default shell, you may find that you no longer have very much in your path.&lt;br /&gt;
You can add a section to your {{ic|~/.config/fish/config.fish}} file that will set your path correctly on login. This is much like {{ic|.profile}} or {{ic|.bash_profile}} as it is only executed for login shells.&lt;br /&gt;
&lt;br /&gt;
{{bc|&lt;br /&gt;
if status --is-login&lt;br /&gt;
        set PATH $PATH /usr/bin /sbin&lt;br /&gt;
end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that you will need to manually add various other environment variables, such as {{ic|$MOZ_PLUGIN_PATH}}. It is a huge amount of work to get a seamless experience with fish as your default shell.&lt;br /&gt;
&lt;br /&gt;
=== suでbashが起動 ===&lt;br /&gt;
&lt;br /&gt;
もし、suでbashが起動する場合(Bashがデフォルトシェルのため), fishに関数を定義します。&lt;br /&gt;
&lt;br /&gt;
 $ funced su&lt;br /&gt;
 function su&lt;br /&gt;
         /bin/su --shell=/usr/bin/fish $argv&lt;br /&gt;
 end&lt;br /&gt;
 $ funcsave su&lt;br /&gt;
&lt;br /&gt;
=== ログイン時にXを起動 ===&lt;br /&gt;
&lt;br /&gt;
{{ic|~/.config/fish/config.fish}}の一番下に以下を追加します。&lt;br /&gt;
&lt;br /&gt;
{{bc|1=&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# start X at login&lt;br /&gt;
if status --is-login&lt;br /&gt;
    if test -z &amp;quot;$DISPLAY&amp;quot; -a $XDG_VTNR -eq 1&lt;br /&gt;
        exec startx -- -keeptty&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Note|fish使用時に{{ic|startx}}が{{ic|-keeptty}}フラグを必要とする理由については[https://github.com/fish-shell/fish-shell/issues/1772 この記事]を参照してください。}}&lt;br /&gt;
&lt;br /&gt;
== 参照 ==&lt;br /&gt;
&lt;br /&gt;
* http://fishshell.com/ - ホームページ&lt;br /&gt;
* http://fishshell.com/docs/2.1/index.html - ドキュメント&lt;/div&gt;</summary>
		<author><name>はつせ</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3786</id>
		<title>Fish</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3786"/>
		<updated>2015-10-24T07:35:19Z</updated>

		<summary type="html">&lt;p&gt;はつせ: /* suでbash起動 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase title}}&lt;br /&gt;
[[Category:Command shells]]&lt;br /&gt;
[[de:Fish]]&lt;br /&gt;
[[en:Fish]]&lt;br /&gt;
[[ru:Fish]]&lt;br /&gt;
&#039;&#039;&#039;fish&#039;&#039;&#039; (&#039;&#039;&#039;friendly interactive shell&#039;&#039;&#039;)は主に対話的に使用することを意図されたユーザフレンドリーなコマンドラインシェルです。&lt;br /&gt;
&lt;br /&gt;
== インストール ==&lt;br /&gt;
&lt;br /&gt;
[[pacman|Install]] the {{Pkg|fish}} package from the [[official repositories]] for the stable version of the [http://fishshell.com/ mainstream fork] of the project.&lt;br /&gt;
&lt;br /&gt;
[[pacman|Install]] {{AUR|fish-shell-git}}{{Broken package link|{{aur-mirror|fish-shell-git}}}} from the [[AUR]] for the latest development version.&lt;br /&gt;
&lt;br /&gt;
[[pacman|Install]] {{AUR|fish-git}} from the [[AUR]] for the legacy version that was [http://www.mail-archive.com/fish-users@lists.sourceforge.net/msg02893.html discontinued] by its [https://github.com/liljencrantz original developer] in 2011.&lt;br /&gt;
&lt;br /&gt;
To make fish the default shell, run {{ic|chsh -s /usr/bin/fish}}.&lt;br /&gt;
&lt;br /&gt;
== 入力/出力 ==&lt;br /&gt;
&lt;br /&gt;
=== File descriptors ===&lt;br /&gt;
Like other shells, fish lets you redirect input/output streams. This is useful when using text files to save programs output or errors, or when using text files as input. Most programs use three input/output streams, represented by numbers called file descriptors (FD). These are:&lt;br /&gt;
&lt;br /&gt;
* Standard input (FD 0), used for reading (keyboard by default).&lt;br /&gt;
* Standard output (FD 1), used for writing (screen by default).&lt;br /&gt;
* Standard error (FD 2), used for displaying errors and warnings (screen by default).&lt;br /&gt;
&lt;br /&gt;
=== リダイレクト ===&lt;br /&gt;
Any file descriptor can be directed to other files through a mechanism called redirection:&lt;br /&gt;
&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard input:&#039;&#039;&lt;br /&gt;
$ command &amp;lt; source_file&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard output to an existing file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt;&amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard error:&#039;&#039;&lt;br /&gt;
$ command ^ destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard error to an existing file:&#039;&#039;&lt;br /&gt;
$ command ^^ destination}}&lt;br /&gt;
&lt;br /&gt;
You can use one of the following as {{ic|destination}}:&lt;br /&gt;
&lt;br /&gt;
* A filename (the output will be written to the specified file).&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by the number of another file descriptor. The output will be written to the other file descriptor.&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by a {{ic|-}} sign. The output will not be written anywhere.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard output to a file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting both standard output and standard error to the same file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt ^ &amp;amp;1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Silencing standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; &amp;amp;-}}&lt;br /&gt;
&lt;br /&gt;
=== パイプ ===&lt;br /&gt;
&lt;br /&gt;
You can redirect standard output of one command to standard input of the next command. This is done by separating the commands by the pipe character ({{ic|&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;}}). Example:&lt;br /&gt;
&lt;br /&gt;
 cat example.txt | head&lt;br /&gt;
&lt;br /&gt;
You can redirect other file descriptors to the pipe (besides standard output). The next example shows how to use standard error of one command as standard input of another command, prepending standard error file descriptor&#039;s number and {{ic|&amp;gt;}} to the pipe:&lt;br /&gt;
&lt;br /&gt;
 $ command 2&amp;gt;| less&lt;br /&gt;
&lt;br /&gt;
This will run {{ic|command}} and redirect its standard error to the {{ic|less}} command.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
User configurations for fish are located at {{ic|~/.config/fish/config.fish}}. Adding commands or functions to the file will execute/define them when opening a terminal, similar to {{ic|.bashrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
The fish prompt and terminal colors can be set with the interactive web interface:&lt;br /&gt;
&lt;br /&gt;
 fish_config&lt;br /&gt;
&lt;br /&gt;
Selected settings are written to your personal configuration file. You can also view defined functions and your history.&lt;br /&gt;
&lt;br /&gt;
=== プロンプト ===&lt;br /&gt;
&lt;br /&gt;
If you would like fish to display the branch and dirty status when you are in a git directory, you can add the following to your {{ic|~/.config/fish/config.fish}}:&lt;br /&gt;
{{bc|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# fish git prompt&lt;br /&gt;
set __fish_git_prompt_showdirtystate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showstashstate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showupstream &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_color_branch yellow&lt;br /&gt;
&lt;br /&gt;
# Status Chars&lt;br /&gt;
set __fish_git_prompt_char_dirtystate &#039;⚡&#039;&lt;br /&gt;
set __fish_git_prompt_char_stagedstate &#039;→&#039;&lt;br /&gt;
set __fish_git_prompt_char_stashstate &#039;↩&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_ahead &#039;↑&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_behind &#039;↓&#039;&lt;br /&gt;
 &lt;br /&gt;
function fish_prompt&lt;br /&gt;
        set last_status $status&lt;br /&gt;
        set_color $fish_color_cwd&lt;br /&gt;
        printf &#039;%s&#039; (prompt_pwd)&lt;br /&gt;
        set_color normal&lt;br /&gt;
        printf &#039;%s &#039; (__fish_git_prompt)&lt;br /&gt;
       set_color normal&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Command completion ===&lt;br /&gt;
&lt;br /&gt;
fish can generate autocompletions from man pages. Completions are written to {{ic|~/.config/fish/generated_completions/}} and can be generated by calling:&lt;br /&gt;
&lt;br /&gt;
 fish_update_completions&lt;br /&gt;
&lt;br /&gt;
You can also define your own completions in {{ic|~/.config/fish/completions/}}. See {{ic|/usr/share/fish/completions/}} for a few examples.&lt;br /&gt;
&lt;br /&gt;
Context-aware completions for Arch Linux-specific commands like &#039;&#039;pacman&#039;&#039;, &#039;&#039;pacman-key&#039;&#039;, &#039;&#039;makepkg&#039;&#039;, &#039;&#039;cower&#039;&#039;, &#039;&#039;pbget&#039;&#039;, &#039;&#039;pacmatic&#039;&#039; are built into fish, since the policy of the fish development is to include all the existent completions in the upstream tarball. The memory management is clever enough to avoid any negative impact on resources.&lt;br /&gt;
&lt;br /&gt;
=== /etc/profile and ~/.profile compatibility ===&lt;br /&gt;
&lt;br /&gt;
Since standard POSIX {{ic|sh}} syntax is not compatible with fish, fish will not be able to source {{ic|/etc/profile}} (and thus all {{ic|*.sh}} in {{ic|/etc/profile.d}}) and {{ic|~/.profile}}&lt;br /&gt;
&lt;br /&gt;
If you want fish to source those files, install {{Pkg|dash}} and add this line to your {{ic|config.fish}}:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c printenv | sed -e &#039;/PATH/s/:/ /g;s/=/ /;s/^/set -x /&#039; | source&lt;br /&gt;
&lt;br /&gt;
an alternative variant will save you one executable invocation by using a builtin command:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c &#039;export -p&#039; | sed -e &amp;quot;/PATH/s/&#039;//g;/PATH/s/:/ /g;s/=/ /;s/^export/set -x/&amp;quot; | source&lt;br /&gt;
&lt;br /&gt;
==Tips and Tricks==&lt;br /&gt;
===History Substitution===&lt;br /&gt;
Fish does not implement history substitution (e.g. {{ic|sudo !!}}), and the fish developers have said that they [http://fishshell.com/docs/current/faq.html#faq-history do not plan to]. Still, this is an essential piece of many users&#039; workflow. Reddit user, [http://www.reddit.com/u/crossroads1112 crossroads1112], created a function that regains some of the functionality of history substitution and with another syntax. The function is on [https://gist.github.com/crossroads1112/77badb2c3455e23b873b github] and instructions are included as comments in it. There is a [https://gist.github.com/b-/981892a65837ab0a387e forked version] that is closer to the original syntax and allows for {{ic|command !!}} if you specify the command in the helper function.&lt;br /&gt;
&lt;br /&gt;
== トラブルシューティング ==&lt;br /&gt;
&lt;br /&gt;
{{Accuracy|Changing the default shell should not interfere with the execution of shell scripts, so long as they begin with a proper [https://en.wikipedia.org/wiki/Shebang_%28Unix%29 shebang line].}}&lt;br /&gt;
&lt;br /&gt;
In Arch, there are a lot of shell scripts written for Bash, and these have not been translated to fish. It is advisable not to set fish as your default shell because of this. The best option is to open your terminal emulator with a command line option that executes fish. For most terminals this is the {{ic|-e}} switch, so for example, to open gnome-terminal using fish, change your shortcut to use:&lt;br /&gt;
&lt;br /&gt;
 gnome-terminal -e fish&lt;br /&gt;
&lt;br /&gt;
With LilyTerm and other light terminal emulators that do not support setting the shell it would look like this:&lt;br /&gt;
&lt;br /&gt;
 SHELL=/usr/bin/fish lilyterm&lt;br /&gt;
&lt;br /&gt;
Another option is to set fish as the default shell for the terminal in the terminal&#039;s configuration or for a terminal profile if your terminal emulator has a profiles feature. This is contrast to changing the default shell for the user which would cause the above mentioned problem.&lt;br /&gt;
&lt;br /&gt;
To set fish as the shell started in tmux, put this into your {{ic|~/.tmux.conf}}:&lt;br /&gt;
&lt;br /&gt;
 set-option -g default-shell &amp;quot;/usr/bin/fish&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Not setting fish as system wide default allows the arch scripts to run on startup, ensure the environment variables are set correctly, and generally reduces the issues associated with using a non-Bash compatible terminal like fish.&lt;br /&gt;
&lt;br /&gt;
If you decide to set fish as your default shell, you may find that you no longer have very much in your path.&lt;br /&gt;
You can add a section to your {{ic|~/.config/fish/config.fish}} file that will set your path correctly on login. This is much like {{ic|.profile}} or {{ic|.bash_profile}} as it is only executed for login shells.&lt;br /&gt;
&lt;br /&gt;
{{bc|&lt;br /&gt;
if status --is-login&lt;br /&gt;
        set PATH $PATH /usr/bin /sbin&lt;br /&gt;
end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that you will need to manually add various other environment variables, such as {{ic|$MOZ_PLUGIN_PATH}}. It is a huge amount of work to get a seamless experience with fish as your default shell.&lt;br /&gt;
&lt;br /&gt;
=== suがbashで起動 ===&lt;br /&gt;
&lt;br /&gt;
もし、suをbashで始める場合(Bashがデフォルトシェルのため), fishに関数を定義します。&lt;br /&gt;
&lt;br /&gt;
 $ funced su&lt;br /&gt;
 function su&lt;br /&gt;
         /bin/su --shell=/usr/bin/fish $argv&lt;br /&gt;
 end&lt;br /&gt;
 $ funcsave su&lt;br /&gt;
&lt;br /&gt;
=== ログイン時にXを起動 ===&lt;br /&gt;
&lt;br /&gt;
{{ic|~/.config/fish/config.fish}}の一番下に以下を追加します。&lt;br /&gt;
&lt;br /&gt;
{{bc|1=&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# start X at login&lt;br /&gt;
if status --is-login&lt;br /&gt;
    if test -z &amp;quot;$DISPLAY&amp;quot; -a $XDG_VTNR -eq 1&lt;br /&gt;
        exec startx -- -keeptty&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Note|fish使用時に{{ic|startx}}が{{ic|-keeptty}}フラグを必要とする理由については[https://github.com/fish-shell/fish-shell/issues/1772 この記事]を参照してください。}}&lt;br /&gt;
&lt;br /&gt;
== 参照 ==&lt;br /&gt;
&lt;br /&gt;
* http://fishshell.com/ - ホームページ&lt;br /&gt;
* http://fishshell.com/docs/2.1/index.html - ドキュメント&lt;/div&gt;</summary>
		<author><name>はつせ</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3785</id>
		<title>Fish</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Fish&amp;diff=3785"/>
		<updated>2015-10-24T07:26:23Z</updated>

		<summary type="html">&lt;p&gt;はつせ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase title}}&lt;br /&gt;
[[Category:Command shells]]&lt;br /&gt;
[[de:Fish]]&lt;br /&gt;
[[en:Fish]]&lt;br /&gt;
[[ru:Fish]]&lt;br /&gt;
&#039;&#039;&#039;fish&#039;&#039;&#039; (&#039;&#039;&#039;friendly interactive shell&#039;&#039;&#039;)は主に対話的に使用することを意図されたユーザフレンドリーなコマンドラインシェルです。&lt;br /&gt;
&lt;br /&gt;
== インストール ==&lt;br /&gt;
&lt;br /&gt;
[[pacman|Install]] the {{Pkg|fish}} package from the [[official repositories]] for the stable version of the [http://fishshell.com/ mainstream fork] of the project.&lt;br /&gt;
&lt;br /&gt;
[[pacman|Install]] {{AUR|fish-shell-git}}{{Broken package link|{{aur-mirror|fish-shell-git}}}} from the [[AUR]] for the latest development version.&lt;br /&gt;
&lt;br /&gt;
[[pacman|Install]] {{AUR|fish-git}} from the [[AUR]] for the legacy version that was [http://www.mail-archive.com/fish-users@lists.sourceforge.net/msg02893.html discontinued] by its [https://github.com/liljencrantz original developer] in 2011.&lt;br /&gt;
&lt;br /&gt;
To make fish the default shell, run {{ic|chsh -s /usr/bin/fish}}.&lt;br /&gt;
&lt;br /&gt;
== 入力/出力 ==&lt;br /&gt;
&lt;br /&gt;
=== File descriptors ===&lt;br /&gt;
Like other shells, fish lets you redirect input/output streams. This is useful when using text files to save programs output or errors, or when using text files as input. Most programs use three input/output streams, represented by numbers called file descriptors (FD). These are:&lt;br /&gt;
&lt;br /&gt;
* Standard input (FD 0), used for reading (keyboard by default).&lt;br /&gt;
* Standard output (FD 1), used for writing (screen by default).&lt;br /&gt;
* Standard error (FD 2), used for displaying errors and warnings (screen by default).&lt;br /&gt;
&lt;br /&gt;
=== リダイレクト ===&lt;br /&gt;
Any file descriptor can be directed to other files through a mechanism called redirection:&lt;br /&gt;
&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard input:&#039;&#039;&lt;br /&gt;
$ command &amp;lt; source_file&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard output to an existing file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt;&amp;gt; destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting standard error:&#039;&#039;&lt;br /&gt;
$ command ^ destination&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Appending standard error to an existing file:&#039;&#039;&lt;br /&gt;
$ command ^^ destination}}&lt;br /&gt;
&lt;br /&gt;
You can use one of the following as {{ic|destination}}:&lt;br /&gt;
&lt;br /&gt;
* A filename (the output will be written to the specified file).&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by the number of another file descriptor. The output will be written to the other file descriptor.&lt;br /&gt;
* An {{ic|&amp;amp;}} followed by a {{ic|-}} sign. The output will not be written anywhere.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
{{bc|&#039;&#039;Redirecting standard output to a file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Redirecting both standard output and standard error to the same file:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; destination_file.txt ^ &amp;amp;1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Silencing standard output:&#039;&#039;&lt;br /&gt;
$ command &amp;gt; &amp;amp;-}}&lt;br /&gt;
&lt;br /&gt;
=== パイプ ===&lt;br /&gt;
&lt;br /&gt;
You can redirect standard output of one command to standard input of the next command. This is done by separating the commands by the pipe character ({{ic|&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;}}). Example:&lt;br /&gt;
&lt;br /&gt;
 cat example.txt | head&lt;br /&gt;
&lt;br /&gt;
You can redirect other file descriptors to the pipe (besides standard output). The next example shows how to use standard error of one command as standard input of another command, prepending standard error file descriptor&#039;s number and {{ic|&amp;gt;}} to the pipe:&lt;br /&gt;
&lt;br /&gt;
 $ command 2&amp;gt;| less&lt;br /&gt;
&lt;br /&gt;
This will run {{ic|command}} and redirect its standard error to the {{ic|less}} command.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
User configurations for fish are located at {{ic|~/.config/fish/config.fish}}. Adding commands or functions to the file will execute/define them when opening a terminal, similar to {{ic|.bashrc}}.&lt;br /&gt;
&lt;br /&gt;
=== Web interface ===&lt;br /&gt;
&lt;br /&gt;
The fish prompt and terminal colors can be set with the interactive web interface:&lt;br /&gt;
&lt;br /&gt;
 fish_config&lt;br /&gt;
&lt;br /&gt;
Selected settings are written to your personal configuration file. You can also view defined functions and your history.&lt;br /&gt;
&lt;br /&gt;
=== プロンプト ===&lt;br /&gt;
&lt;br /&gt;
If you would like fish to display the branch and dirty status when you are in a git directory, you can add the following to your {{ic|~/.config/fish/config.fish}}:&lt;br /&gt;
{{bc|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# fish git prompt&lt;br /&gt;
set __fish_git_prompt_showdirtystate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showstashstate &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_showupstream &#039;yes&#039;&lt;br /&gt;
set __fish_git_prompt_color_branch yellow&lt;br /&gt;
&lt;br /&gt;
# Status Chars&lt;br /&gt;
set __fish_git_prompt_char_dirtystate &#039;⚡&#039;&lt;br /&gt;
set __fish_git_prompt_char_stagedstate &#039;→&#039;&lt;br /&gt;
set __fish_git_prompt_char_stashstate &#039;↩&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_ahead &#039;↑&#039;&lt;br /&gt;
set __fish_git_prompt_char_upstream_behind &#039;↓&#039;&lt;br /&gt;
 &lt;br /&gt;
function fish_prompt&lt;br /&gt;
        set last_status $status&lt;br /&gt;
        set_color $fish_color_cwd&lt;br /&gt;
        printf &#039;%s&#039; (prompt_pwd)&lt;br /&gt;
        set_color normal&lt;br /&gt;
        printf &#039;%s &#039; (__fish_git_prompt)&lt;br /&gt;
       set_color normal&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Command completion ===&lt;br /&gt;
&lt;br /&gt;
fish can generate autocompletions from man pages. Completions are written to {{ic|~/.config/fish/generated_completions/}} and can be generated by calling:&lt;br /&gt;
&lt;br /&gt;
 fish_update_completions&lt;br /&gt;
&lt;br /&gt;
You can also define your own completions in {{ic|~/.config/fish/completions/}}. See {{ic|/usr/share/fish/completions/}} for a few examples.&lt;br /&gt;
&lt;br /&gt;
Context-aware completions for Arch Linux-specific commands like &#039;&#039;pacman&#039;&#039;, &#039;&#039;pacman-key&#039;&#039;, &#039;&#039;makepkg&#039;&#039;, &#039;&#039;cower&#039;&#039;, &#039;&#039;pbget&#039;&#039;, &#039;&#039;pacmatic&#039;&#039; are built into fish, since the policy of the fish development is to include all the existent completions in the upstream tarball. The memory management is clever enough to avoid any negative impact on resources.&lt;br /&gt;
&lt;br /&gt;
=== /etc/profile and ~/.profile compatibility ===&lt;br /&gt;
&lt;br /&gt;
Since standard POSIX {{ic|sh}} syntax is not compatible with fish, fish will not be able to source {{ic|/etc/profile}} (and thus all {{ic|*.sh}} in {{ic|/etc/profile.d}}) and {{ic|~/.profile}}&lt;br /&gt;
&lt;br /&gt;
If you want fish to source those files, install {{Pkg|dash}} and add this line to your {{ic|config.fish}}:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c printenv | sed -e &#039;/PATH/s/:/ /g;s/=/ /;s/^/set -x /&#039; | source&lt;br /&gt;
&lt;br /&gt;
an alternative variant will save you one executable invocation by using a builtin command:&lt;br /&gt;
 env -i HOME=$HOME dash -l -c &#039;export -p&#039; | sed -e &amp;quot;/PATH/s/&#039;//g;/PATH/s/:/ /g;s/=/ /;s/^export/set -x/&amp;quot; | source&lt;br /&gt;
&lt;br /&gt;
==Tips and Tricks==&lt;br /&gt;
===History Substitution===&lt;br /&gt;
Fish does not implement history substitution (e.g. {{ic|sudo !!}}), and the fish developers have said that they [http://fishshell.com/docs/current/faq.html#faq-history do not plan to]. Still, this is an essential piece of many users&#039; workflow. Reddit user, [http://www.reddit.com/u/crossroads1112 crossroads1112], created a function that regains some of the functionality of history substitution and with another syntax. The function is on [https://gist.github.com/crossroads1112/77badb2c3455e23b873b github] and instructions are included as comments in it. There is a [https://gist.github.com/b-/981892a65837ab0a387e forked version] that is closer to the original syntax and allows for {{ic|command !!}} if you specify the command in the helper function.&lt;br /&gt;
&lt;br /&gt;
== トラブルシューティング ==&lt;br /&gt;
&lt;br /&gt;
{{Accuracy|Changing the default shell should not interfere with the execution of shell scripts, so long as they begin with a proper [https://en.wikipedia.org/wiki/Shebang_%28Unix%29 shebang line].}}&lt;br /&gt;
&lt;br /&gt;
In Arch, there are a lot of shell scripts written for Bash, and these have not been translated to fish. It is advisable not to set fish as your default shell because of this. The best option is to open your terminal emulator with a command line option that executes fish. For most terminals this is the {{ic|-e}} switch, so for example, to open gnome-terminal using fish, change your shortcut to use:&lt;br /&gt;
&lt;br /&gt;
 gnome-terminal -e fish&lt;br /&gt;
&lt;br /&gt;
With LilyTerm and other light terminal emulators that do not support setting the shell it would look like this:&lt;br /&gt;
&lt;br /&gt;
 SHELL=/usr/bin/fish lilyterm&lt;br /&gt;
&lt;br /&gt;
Another option is to set fish as the default shell for the terminal in the terminal&#039;s configuration or for a terminal profile if your terminal emulator has a profiles feature. This is contrast to changing the default shell for the user which would cause the above mentioned problem.&lt;br /&gt;
&lt;br /&gt;
To set fish as the shell started in tmux, put this into your {{ic|~/.tmux.conf}}:&lt;br /&gt;
&lt;br /&gt;
 set-option -g default-shell &amp;quot;/usr/bin/fish&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Not setting fish as system wide default allows the arch scripts to run on startup, ensure the environment variables are set correctly, and generally reduces the issues associated with using a non-Bash compatible terminal like fish.&lt;br /&gt;
&lt;br /&gt;
If you decide to set fish as your default shell, you may find that you no longer have very much in your path.&lt;br /&gt;
You can add a section to your {{ic|~/.config/fish/config.fish}} file that will set your path correctly on login. This is much like {{ic|.profile}} or {{ic|.bash_profile}} as it is only executed for login shells.&lt;br /&gt;
&lt;br /&gt;
{{bc|&lt;br /&gt;
if status --is-login&lt;br /&gt;
        set PATH $PATH /usr/bin /sbin&lt;br /&gt;
end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that you will need to manually add various other environment variables, such as {{ic|$MOZ_PLUGIN_PATH}}. It is a huge amount of work to get a seamless experience with fish as your default shell.&lt;br /&gt;
&lt;br /&gt;
=== suでbash起動 ===&lt;br /&gt;
&lt;br /&gt;
もし、suでbashが始まる場合(Bashがデフォルトシェルのため), fishに関数を定義します。&lt;br /&gt;
&lt;br /&gt;
 $ funced su&lt;br /&gt;
 function su&lt;br /&gt;
         /bin/su --shell=/usr/bin/fish $argv&lt;br /&gt;
 end&lt;br /&gt;
 $ funcsave su&lt;br /&gt;
&lt;br /&gt;
=== ログイン時にXを起動 ===&lt;br /&gt;
&lt;br /&gt;
{{ic|~/.config/fish/config.fish}}の一番下に以下を追加します。&lt;br /&gt;
&lt;br /&gt;
{{bc|1=&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# start X at login&lt;br /&gt;
if status --is-login&lt;br /&gt;
    if test -z &amp;quot;$DISPLAY&amp;quot; -a $XDG_VTNR -eq 1&lt;br /&gt;
        exec startx -- -keeptty&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Note|fish使用時に{{ic|startx}}が{{ic|-keeptty}}フラグを必要とする理由については[https://github.com/fish-shell/fish-shell/issues/1772 この記事]を参照してください。}}&lt;br /&gt;
&lt;br /&gt;
== 参照 ==&lt;br /&gt;
&lt;br /&gt;
* http://fishshell.com/ - ホームページ&lt;br /&gt;
* http://fishshell.com/docs/2.1/index.html - ドキュメント&lt;/div&gt;</summary>
		<author><name>はつせ</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Arch_%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0%E9%9A%8E%E5%B1%A4&amp;diff=3617</id>
		<title>Arch ファイルシステム階層</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Arch_%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0%E9%9A%8E%E5%B1%A4&amp;diff=3617"/>
		<updated>2015-08-29T06:46:00Z</updated>

		<summary type="html">&lt;p&gt;はつせ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ファイルシステム]]&lt;br /&gt;
[[en:Arch filesystem hierarchy]]&lt;br /&gt;
[[it:Filesystem Hierarchy Standard]]&lt;br /&gt;
[[ru:Filesystem Hierarchy Standard]]&lt;br /&gt;
[[zh-CN:Arch filesystem hierarchy]]&lt;br /&gt;
Arch Linux は他の多数のディストリビューションと同じようにファイルシステム階層標準に従っています。それぞれのディレクトリについてその目的を説明するのに加えて、この記事では Arch 固有の事情についても説明しています。&lt;br /&gt;
&lt;br /&gt;
== ファイルシステム階層標準 ==&lt;br /&gt;
[http://www.pathname.com/fhs Filesystem Hierarchy Standard (FHS) のホームページ] より:&lt;br /&gt;
:&amp;quot;&#039;&#039;ファイルシステムスタンダードは Unix ディストリビューションの開発者やパッケージの開発者、そしてシステムの実装者によって使われることを想定して策定されました。ただし、この標準はあくまでリファレンスであり、Unix のファイルシステムやディレクトリ階層を管理する方法のチュートリアルではありません。&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===共有可能ファイルと共有不能ファイル===&lt;br /&gt;
&#039;&#039;&#039;共有可能&#039;&#039;&#039;ファイルとはあるホストで保存されていながら他者からも利用できるファイルです。&#039;&#039;&#039;共有不能&#039;&#039;&#039;ファイルは共有できないファイルのことです。例えば、ユーザーのホームディレクトリ内のファイルは共有可能であり、デバイスのロックファイルは共有不能です。&lt;br /&gt;
&lt;br /&gt;
===静的ファイルと可変ファイル===&lt;br /&gt;
&#039;&#039;&#039;静的&#039;&#039;&#039;ファイルとは例えば、バイナリやライブラリ、ドキュメントなどのシステムの管理者以外からは変更を加えられることがないファイルを意味します。&#039;&#039;&#039;可変&#039;&#039;&#039;ファイルは静的ファイルでないファイルとして定義されます。&lt;br /&gt;
&lt;br /&gt;
== ディレクトリ ==&lt;br /&gt;
===root ファイルシステム===&lt;br /&gt;
root ファイルシステム (スラッシュ記号 (&#039;&#039;&#039;/&#039;&#039;&#039;) で表されます) は他の全てのファイルシステムの根幹となるファイルシステムです。階層の一番上に位置します。たとえファイルやディレクトリが別の物理デバイスに保存されていたとしても、全てのファイルとディレクトリは root ディレクトリ &amp;quot;/&amp;quot; 下に配置されます。root ファイルシステムの中身だけでシステムを起動・復旧・修復できるようになっている必要があります。&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;strike&amp;gt;/bin: 重要なコマンドラインバイナリ&amp;lt;/strike&amp;gt; (廃止)===&lt;br /&gt;
シングルユーザーモードで、全てのユーザーから利用できるバイナリを置くための伝統的なディレクトリです (例: cat, ls, cp)。/bin のプログラムはたとえ / を含むパーティションしかマウントされてないときも利用することができます。実際には、Arch では必要なライブラリは全て /usr/lib に存在しています。2013年6月から、[https://www.archlinux.org/news/binaries-move-to-usrbin-requiring-update-intervention/ /bin は /usr/bin に統合されました]。{{Pkg|filesystem}} パッケージには /bin から /usr/bin へのシンボリックリンクが含まれており、全てのパッケージは /usr/bin にインストールされるようになっています。&lt;br /&gt;
&lt;br /&gt;
===/boot: ブートローダーの静的なファイル===&lt;br /&gt;
共有不能の、静的なディレクトリです。ブートローダーの設定ファイルやブートローダーのステージだけでなく、カーネルや ramdisk イメージも含みます。/boot にはカーネルがユーザー空間のプログラムを実行する前に使用されるデータも保存されます。マスターブートセクタやセクターマップファイルなどです。&lt;br /&gt;
&lt;br /&gt;
===/dev: デバイスファイル===&lt;br /&gt;
Essential device nodes created by udev during the boot process and as machine hardware is discovered by events. This directory highlights one important aspect of the UNIX filesystem - everything is a file or a directory. Exploring this directory will reveal many files, each representing a hardware component of the system. The majority of devices are either block or character devices; however other types of devices exist and can be created. In general, &#039;block devices&#039; are devices that store or hold data, whereas &#039;character devices&#039; can be thought of as devices that transmit or transfer data. For example, hard disk drives and optical drives are categorized as block devices while serial ports, mice and USB ports are all character devices.&lt;br /&gt;
&lt;br /&gt;
===/etc: ホスト固有の設定===&lt;br /&gt;
Host-specific, unsharable configuration files shall be placed in the /etc directory. If more than one configuration file is required for an application, it is customary to use a subdirectory in order to keep the /etc/ area as clean as possible. It is considered good practice to make frequent backups of this directory as it contains all system related configuration files. &lt;br /&gt;
&lt;br /&gt;
====/etc/X11====&lt;br /&gt;
X Window System の設定ファイル。&lt;br /&gt;
&lt;br /&gt;
=====/etc/X11/xinit=====&lt;br /&gt;
xinit configuration files. &#039;xinit&#039; is a configuration method of starting up an X session that is designed to be used as part of a script. &lt;br /&gt;
&lt;br /&gt;
=====/etc/X11/xinit/xinitrc=====&lt;br /&gt;
Global xinitrc file, used by all X sessions started by xinit (startx). Its usage is of course overridden by a .xinitrc file located in the home directory of a user.&lt;br /&gt;
&lt;br /&gt;
===/home: ユーザーディレクトリ===&lt;br /&gt;
UNIX is a multi-user environment. Therefore, each user is also assigned a specific directory that is accessible only to them and to the root user. These are the user home directories, which can be found under &#039;/home/$USER&#039; (~/). Within their home directory, a user can write files, delete them, install programs, etc. Users&#039; home directories contain their data and personal configuration files, the so-called &#039;dot files&#039; (their name is preceded by a dot), which are &#039;hidden&#039;. To view dotfiles, enable the appropriate option in your file manager or run ls with the -a switch. If there is a conflict between personal and system wide configuration files, the settings in the personal file will prevail. Dotfiles most likely to be altered by the end user include .xinitrc and .bashrc files. The configuration files for xinit and Bash respectively. They allow the user the ability to change the window manager to be started upon login and also aliases, user-specified commands and environment variables respectively. When a user is created, their dotfiles shall be taken from the /etc/skel directory where system sample files reside. &lt;br /&gt;
&lt;br /&gt;
Directory /home can become quite large as it is typically used for storing downloads, compiling, installing and running programs, mail, collections of multimedia files etc.&lt;br /&gt;
&lt;br /&gt;
===/lost+found: ファイルシステム固有の復元可能なデータ===&lt;br /&gt;
UNIX-like operating systems must execute a proper shutdown sequence. At times, a system might crash or a power failure might take the machine down. Either way, at the next boot, a filesystem check using the &#039;&#039;fsck&#039;&#039; program shall be performed. &#039;&#039;Fsck&#039;&#039; will go through the system and try to recover any corrupt files that it finds. The result of this recovery operation will be placed in this directory. The files recovered are not likely to be complete or make much sense but there always is a chance that something worthwhile is recovered.&lt;br /&gt;
&lt;br /&gt;
===/mnt: 一時的なマウントポイント===&lt;br /&gt;
This is a generic mount point for temporary filesystems or devices. Mounting is the process of making a filesystem available to the system. After mounting, files will be accessible under the mount-point. Additional mount-points (subdirectories) may be created under /mnt/. There is no limitation to creating a mount-point anywhere on the system, but by convention and for practicality, littering a file system with mount-points should be avoided.&lt;br /&gt;
&lt;br /&gt;
===/opt: 問題のあるパッケージ===&lt;br /&gt;
Packages and large static files that do not fit cleanly into the above GNU filesystem layout can be placed in /opt. FHS 2.3 denotes /opt as reserved for the installation of add-on application software packages. A package placing files in the /opt/ directory creates a directory bearing the same name as the package. This directory in turn holds files that otherwise would be scattered throughout the file system.&lt;br /&gt;
For example, the acrobat package has Browser, Reader, and Resource&lt;br /&gt;
directories sitting at the same level as the bin directory. This&lt;br /&gt;
doesn&#039;t fit into a normal GNU filesystem layout, so Arch places all the&lt;br /&gt;
files in a subdirectory of /opt.&lt;br /&gt;
&lt;br /&gt;
===/proc: プロセス情報===&lt;br /&gt;
Directory /proc is very special in that it is also a virtual filesystem. It is sometimes referred to as the &#039;&#039;process information pseudo-file system&#039;&#039;. It doesn&#039;t contain &#039;real&#039; files, but rather, runtime system information (e.g. system memory, devices mounted, hardware configuration, etc). For this reason it can be regarded as a control and information center for the kernel. In fact, quite a lot of system utilities are simply calls to files in this directory. For example, &#039;lsmod&#039; is the same as &#039;cat /proc/modules&#039; while &#039;lspci&#039; is a synonym for &#039;cat /proc/pci&#039;. By altering files located in this directory, kernel parameters may be read/changed (sysctl) while the system is running.&lt;br /&gt;
&lt;br /&gt;
The most distinctive facet about files in this directory is the fact that all of them have a file size of 0, with the exception of &#039;&#039;&#039;kcore, mounts&#039;&#039;&#039; and &#039;&#039;&#039;self&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===/root: 管理者ディレクトリ===&lt;br /&gt;
Home directory of the System Administrator, &#039;root&#039;. This may be somewhat confusing, (&#039;/root under root&#039;) but historically, &#039;/&#039; was root&#039;s home directory (hence the name of the Administrator account). To keep things tidier, &#039;root&#039; eventually got its own home directory. Why not &#039;/home/root&#039;? Because &#039;/home&#039; is often located on a different partition or even on another system and would thus be inaccessible to &#039;root&#039; when - for whatever reason - only &#039;/&#039; is mounted.&lt;br /&gt;
&lt;br /&gt;
=== /run: 一時的な実行時データ===&lt;br /&gt;
The /run mountpoint is supposed to be a tmpfs mounted during early boot, available and writable to for all tools at any time during bootup. [[systemd]], [[udev]] or mdadm that are required early in the boot process require this directory, because /var can be implemented as a separate file system to be mounted at a later stage in the start-up process. It replaces /var/run/, which becomes a symlink of /run.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;strike&amp;gt;/sbin: システムバイナリ&amp;lt;/strike&amp;gt; (廃止)===&lt;br /&gt;
Traditionally UNIX discriminates between &#039;normal&#039; executables and those used for system maintenance and/or administrative tasks. The latter were supposed to reside either here or - the less important ones - in /usr/sbin. Programs executed after /usr is known to be mounted (when there are no problems) are generally placed into /usr/sbin. In practice, programs in /sbin require /usr to be mounted as all the necessary libraries are in /usr/lib. As of June 2013, [https://www.archlinux.org/news/binaries-move-to-usrbin-requiring-update-intervention/ /sbin and /usr/sbin were merged into /usr/bin]. The {{Pkg|filesystem}} package provides symlinks from /sbin and /usr/sbin to /usr/bin, and all packages should be updated to explicitly install to /usr/bin.&lt;br /&gt;
&lt;br /&gt;
===/srv: サービスデータ===&lt;br /&gt;
Site-specific data which is served by the system. The main purpose of specifying this is so that users may find the location of the data files for a particular service, and so that services which require a single tree for read-only data, writable data and scripts (such as CGI scripts) can be reasonably placed. Data of interest to a specific user shall be placed in that user&#039;s home directory.&lt;br /&gt;
&lt;br /&gt;
===/sys: 仮想ファイルシステム===&lt;br /&gt;
Virtual file system provided by the Linux kernel. By using virtual files, sysfs exports information about various kernel subsystems, hardware devices and associated device drivers from the kernel&#039;s device model to user space. In addition to providing information about various devices and kernel subsystems, exported virtual files are also used for their configuring.&lt;br /&gt;
&lt;br /&gt;
===/tmp: 一時的なファイル===&lt;br /&gt;
This directory contains files that are required temporarily. Many programs use this to create lock files and for temporary storage of data. Do not remove files from this directory unless you know exactly what you are doing! Many of these files are important for currently running programs and deleting them may result in a system crash. On most systems, old files in this directory are cleared out at boot or at daily intervals.&lt;br /&gt;
&lt;br /&gt;
===/usr: 共有可能な、読み取り専用データ=== &lt;br /&gt;
While root is the primary filesystem, /usr is the secondary hierarchy, for user data, containing the majority of (multi-)user utilities and applications. /usr is shareable, read-only data. This means that /usr shall be shareable between various hosts and must not be written to, except by the package manager (installation, update, upgrade). Any information that is host-specific or varies with time is stored elsewhere. &lt;br /&gt;
&lt;br /&gt;
Aside from /home, /usr usually contains by far the largest share of data on a system. Hence, this is one of the most important directories in the system as it contains all the user binaries, their documentation, libraries, header files, etc. X and its supporting libraries can be found here. User programs like telnet, ftp, etc., are also placed here. In the original UNIX implementations, /usr (for &#039;&#039;user&#039;&#039;), was where the home directories of the system&#039;s users were placed (that is to say, /usr/&#039;&#039;username&#039;&#039; was then the directory now known as /home/&#039;&#039;username&#039;&#039;). Over time, /usr has become where userspace programs and data (as opposed to &#039;kernelspace&#039; programs and data) reside. The name has not changed, but its meaning has narrowed and lengthened from &#039;&#039;everything user related&#039;&#039; to &#039;&#039;user usable programs and data&#039;&#039;. As such, the backronym &#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser &#039;&#039;&#039;S&#039;&#039;&#039;ystem &#039;&#039;&#039;R&#039;&#039;&#039;esources&#039; was created.&lt;br /&gt;
&lt;br /&gt;
====/usr/bin: バイナリ====&lt;br /&gt;
コマンドバイナリ。このディレクトリにはシステム上のバイナリ (アプリケーション) のほとんどが含まれます。このディレクトリ内の実行ファイルは様々です。例えば vim や gcc、gnome-session などがここに置かれます。昔は、このディレクトリには root 権限を必要としない、そしてシングルユーザーモードで必要ないバイナリだけを置くことになっていました。しかしながら、この決まりごとは既に強制ではなくなっており、Arch の開発陣は &amp;lt;strike&amp;gt;全てのバイナリをこのディレクトリに移動することを計画&amp;lt;/strike&amp;gt; 全てのバイナリをこのディレクトリに移動しています。&lt;br /&gt;
&lt;br /&gt;
====/usr/include: ヘッダーファイル====&lt;br /&gt;
ユーザー空間のソースコードをコンパイルするのに必要なヘッダーファイル。&lt;br /&gt;
&lt;br /&gt;
====/usr/lib: ライブラリ====&lt;br /&gt;
{{Note|The {{ic|/lib}} directory becomes a symlink to {{ic|/usr/lib}}. [https://www.archlinux.org/news/the-lib-directory-becomes-a-symlink/ Here] is the news. If you encounter error during this update. Please see [[DeveloperWiki:usrlib]] for solution.}}&lt;br /&gt;
Contains application private data (kernel modules, systemd services, udev rules, etc) and shared library images (the C programming code library). Libraries are collections of frequently used program routines and are readily identifiable through their filename extension of *.so. They are essential for basic system functionality. Kernel modules (drivers) are in the subdirectory /lib/modules/&amp;lt;kernel-version&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;strike&amp;gt;/usr/sbin: システムバイナリ&amp;lt;/strike&amp;gt; (廃止)====&lt;br /&gt;
Non-essential system binaries of use to the system administrator. As of June 2013, [https://www.archlinux.org/news/binaries-move-to-usrbin-requiring-update-intervention/ /usr/sbin was merged into /usr/bin]. The {{Pkg|filesystem}} package provides symlinks from /usr/sbin to /usr/bin, and all packages should now explicitly install to /usr/bin.&lt;br /&gt;
&lt;br /&gt;
====/usr/share: アーキテクチャに依存しないデータ====&lt;br /&gt;
This directory contains &#039;shareable&#039;, architecture-independent files (docs, icons, fonts etc). Note, however, that /usr/share is generally not intended to be shared by different operating systems or by different releases of the same operating system. Any program or package which contains or requires data that do not need to be modified should store these data in /usr/share (or /usr/local/share, if manually installed - see below). It is recommended that a subdirectory be used in /usr/share for this purpose.&lt;br /&gt;
&lt;br /&gt;
====/usr/src: ソースコード====&lt;br /&gt;
&amp;lt;!-- The &#039;linux&#039; sub-directory holds the Linux kernel sources, and header-files. --&amp;gt;&lt;br /&gt;
&#039;linux&#039;のサブディレクトリは、Linuxのカーネルのソースコードとヘッダファイルを格納しています。&lt;br /&gt;
&lt;br /&gt;
====/usr/local: ローカル階層====&lt;br /&gt;
Optional tertiary hierarchy for local data. The original idea behind /usr/local was to have a separate (&#039;local&#039;) &#039;/usr&#039; directory on every machine besides /usr itself, which might be mounted read-only from somewhere else. It copies the structure of /usr. These days, /usr/local is widely regarded as a good place in which to keep self-compiled or third-party programs. This directory is empty by default in Arch Linux. It may be used for manually compiled software installations if desired. [[pacman]] installs to /usr, therefore, manually compiled/installed software installed to /usr/local may peacefully co-exist with pacman-tracked system software.&lt;br /&gt;
&lt;br /&gt;
===/var: 可変ファイル===&lt;br /&gt;
Variable files, such as logs, spool files, and temporary e-mail files. On Arch, the [[ABS]] tree and pacman cache also reside here. Why not put the variable and transient data into /usr/? Because there might be circumstances when /usr/ is mounted as read-only, e.g. if it is on a CD or on another computer. &#039;/var/&#039; contains variable data, i.e. files and directories the system must be able to write to during operation, whereas /usr/ shall only contain static data.&lt;br /&gt;
Some directories can be put onto separate partitions or systems, e.g. for easier backups, due to network topology or security concerns. Other directories have to be on the root partition, because they are vital for the boot process. &#039;Mountable&#039; directories are: &#039;/home&#039;, &#039;/mnt&#039;, &#039;/tmp&#039; and &#039;/var&#039;. Essential for booting are: &#039;/bin&#039;, &#039;/boot&#039;, &#039;/dev&#039;, &#039;/etc&#039;, &#039;/lib&#039;, &#039;/proc&#039;, &#039;/sbin&#039; and &#039;/usr&#039;. &lt;br /&gt;
&lt;br /&gt;
====/var/abs====&lt;br /&gt;
&amp;lt;!-- The [[ABS]] tree. A ports-like package build system hierarchy containing build scripts within subdirectories corresponding to all installable Arch software. --&amp;gt;&lt;br /&gt;
[[ABS]]ツリー。インストール可能な全てのArch softwareに対応するサブディレクトリ内のビルドスクリプトを含んでいる&#039;&#039;ports&#039;&#039;のようなパッケージビルドシステム階層構造です。&lt;br /&gt;
&lt;br /&gt;
====/var/cache/pacman/pkg====&lt;br /&gt;
pacman のパッケージキャッシュ。&lt;br /&gt;
&lt;br /&gt;
====/var/lib: 状態情報====&lt;br /&gt;
&amp;lt;!-- Persistent data modified by programs as they run (e.g. databases, packaging system metadata etc.). --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
プログラムが実行すると変更される永続データです。(例: データベース、パッケージシステムのメタデータなど)&lt;br /&gt;
&lt;br /&gt;
====/var/log: ログファイル====&lt;br /&gt;
ログファイル。&lt;br /&gt;
&lt;br /&gt;
====/var/mail: ユーザのメール====&lt;br /&gt;
&amp;lt;!-- Deprecated location for users&#039; mailboxes. --&amp;gt;&lt;br /&gt;
ユーザのメールボックスに推奨されていない場所です。&lt;br /&gt;
&lt;br /&gt;
====/var/spool: キュー====&lt;br /&gt;
&amp;lt;!-- Spool for tasks waiting to be processed (e.g. print queues and unread mail). --&amp;gt;&lt;br /&gt;
処理されるのを待っているタスクのためのスプールです。(例: プリントキュー、未読メール).&lt;br /&gt;
&lt;br /&gt;
=====/var/spool/mail=====&lt;br /&gt;
&amp;lt;!-- Shareable directory for users&#039; mailboxes. --&amp;gt;&lt;br /&gt;
ユーザメールボックスのための共有可能なディレクトリです。&lt;br /&gt;
&lt;br /&gt;
====/var/tmp: 保持される可能性がある一時的なファイル====&lt;br /&gt;
&amp;lt;!-- Temporary files to be preserved between reboots. --&amp;gt;&lt;br /&gt;
再起動の間に一時的なファイルは保持されます。&lt;br /&gt;
&lt;br /&gt;
==参照==&lt;br /&gt;
*[[wikipedia:ja:Filesystem Hierarchy Standard]]&lt;br /&gt;
*[http://www.pathname.com/fhs/ Linux FHS ホームページ]&lt;/div&gt;</summary>
		<author><name>はつせ</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Arch_%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0%E9%9A%8E%E5%B1%A4&amp;diff=3616</id>
		<title>Arch ファイルシステム階層</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Arch_%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0%E9%9A%8E%E5%B1%A4&amp;diff=3616"/>
		<updated>2015-08-29T06:10:44Z</updated>

		<summary type="html">&lt;p&gt;はつせ: /* /var/mail: ユーザーのメール */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ファイルシステム]]&lt;br /&gt;
[[en:Arch filesystem hierarchy]]&lt;br /&gt;
[[it:Filesystem Hierarchy Standard]]&lt;br /&gt;
[[ru:Filesystem Hierarchy Standard]]&lt;br /&gt;
[[zh-CN:Arch filesystem hierarchy]]&lt;br /&gt;
Arch Linux は他の多数のディストリビューションと同じようにファイルシステム階層標準に従っています。それぞれのディレクトリについてその目的を説明するのに加えて、この記事では Arch 固有の事情についても説明しています。&lt;br /&gt;
&lt;br /&gt;
== ファイルシステム階層標準 ==&lt;br /&gt;
[http://www.pathname.com/fhs Filesystem Hierarchy Standard (FHS) のホームページ] より:&lt;br /&gt;
:&amp;quot;&#039;&#039;ファイルシステムスタンダードは Unix ディストリビューションの開発者やパッケージの開発者、そしてシステムの実装者によって使われることを想定して策定されました。ただし、この標準はあくまでリファレンスであり、Unix のファイルシステムやディレクトリ階層を管理する方法のチュートリアルではありません。&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===共有可能ファイルと共有不能ファイル===&lt;br /&gt;
&#039;&#039;&#039;共有可能&#039;&#039;&#039;ファイルとはあるホストで保存されていながら他者からも利用できるファイルです。&#039;&#039;&#039;共有不能&#039;&#039;&#039;ファイルは共有できないファイルのことです。例えば、ユーザーのホームディレクトリ内のファイルは共有可能であり、デバイスのロックファイルは共有不能です。&lt;br /&gt;
&lt;br /&gt;
===静的ファイルと可変ファイル===&lt;br /&gt;
&#039;&#039;&#039;静的&#039;&#039;&#039;ファイルとは例えば、バイナリやライブラリ、ドキュメントなどのシステムの管理者以外からは変更を加えられることがないファイルを意味します。&#039;&#039;&#039;可変&#039;&#039;&#039;ファイルは静的ファイルでないファイルとして定義されます。&lt;br /&gt;
&lt;br /&gt;
== ディレクトリ ==&lt;br /&gt;
===root ファイルシステム===&lt;br /&gt;
root ファイルシステム (スラッシュ記号 (&#039;&#039;&#039;/&#039;&#039;&#039;) で表されます) は他の全てのファイルシステムの根幹となるファイルシステムです。階層の一番上に位置します。たとえファイルやディレクトリが別の物理デバイスに保存されていたとしても、全てのファイルとディレクトリは root ディレクトリ &amp;quot;/&amp;quot; 下に配置されます。root ファイルシステムの中身だけでシステムを起動・復旧・修復できるようになっている必要があります。&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;strike&amp;gt;/bin: 重要なコマンドラインバイナリ&amp;lt;/strike&amp;gt; (廃止)===&lt;br /&gt;
シングルユーザーモードで、全てのユーザーから利用できるバイナリを置くための伝統的なディレクトリです (例: cat, ls, cp)。/bin のプログラムはたとえ / を含むパーティションしかマウントされてないときも利用することができます。実際には、Arch では必要なライブラリは全て /usr/lib に存在しています。2013年6月から、[https://www.archlinux.org/news/binaries-move-to-usrbin-requiring-update-intervention/ /bin は /usr/bin に統合されました]。{{Pkg|filesystem}} パッケージには /bin から /usr/bin へのシンボリックリンクが含まれており、全てのパッケージは /usr/bin にインストールされるようになっています。&lt;br /&gt;
&lt;br /&gt;
===/boot: ブートローダーの静的なファイル===&lt;br /&gt;
共有不能の、静的なディレクトリです。ブートローダーの設定ファイルやブートローダーのステージだけでなく、カーネルや ramdisk イメージも含みます。/boot にはカーネルがユーザー空間のプログラムを実行する前に使用されるデータも保存されます。マスターブートセクタやセクターマップファイルなどです。&lt;br /&gt;
&lt;br /&gt;
===/dev: デバイスファイル===&lt;br /&gt;
Essential device nodes created by udev during the boot process and as machine hardware is discovered by events. This directory highlights one important aspect of the UNIX filesystem - everything is a file or a directory. Exploring this directory will reveal many files, each representing a hardware component of the system. The majority of devices are either block or character devices; however other types of devices exist and can be created. In general, &#039;block devices&#039; are devices that store or hold data, whereas &#039;character devices&#039; can be thought of as devices that transmit or transfer data. For example, hard disk drives and optical drives are categorized as block devices while serial ports, mice and USB ports are all character devices.&lt;br /&gt;
&lt;br /&gt;
===/etc: ホスト固有の設定===&lt;br /&gt;
Host-specific, unsharable configuration files shall be placed in the /etc directory. If more than one configuration file is required for an application, it is customary to use a subdirectory in order to keep the /etc/ area as clean as possible. It is considered good practice to make frequent backups of this directory as it contains all system related configuration files. &lt;br /&gt;
&lt;br /&gt;
====/etc/X11====&lt;br /&gt;
X Window System の設定ファイル。&lt;br /&gt;
&lt;br /&gt;
=====/etc/X11/xinit=====&lt;br /&gt;
xinit configuration files. &#039;xinit&#039; is a configuration method of starting up an X session that is designed to be used as part of a script. &lt;br /&gt;
&lt;br /&gt;
=====/etc/X11/xinit/xinitrc=====&lt;br /&gt;
Global xinitrc file, used by all X sessions started by xinit (startx). Its usage is of course overridden by a .xinitrc file located in the home directory of a user.&lt;br /&gt;
&lt;br /&gt;
===/home: ユーザーディレクトリ===&lt;br /&gt;
UNIX is a multi-user environment. Therefore, each user is also assigned a specific directory that is accessible only to them and to the root user. These are the user home directories, which can be found under &#039;/home/$USER&#039; (~/). Within their home directory, a user can write files, delete them, install programs, etc. Users&#039; home directories contain their data and personal configuration files, the so-called &#039;dot files&#039; (their name is preceded by a dot), which are &#039;hidden&#039;. To view dotfiles, enable the appropriate option in your file manager or run ls with the -a switch. If there is a conflict between personal and system wide configuration files, the settings in the personal file will prevail. Dotfiles most likely to be altered by the end user include .xinitrc and .bashrc files. The configuration files for xinit and Bash respectively. They allow the user the ability to change the window manager to be started upon login and also aliases, user-specified commands and environment variables respectively. When a user is created, their dotfiles shall be taken from the /etc/skel directory where system sample files reside. &lt;br /&gt;
&lt;br /&gt;
Directory /home can become quite large as it is typically used for storing downloads, compiling, installing and running programs, mail, collections of multimedia files etc.&lt;br /&gt;
&lt;br /&gt;
===/lost+found: ファイルシステム固有の復元可能なデータ===&lt;br /&gt;
UNIX-like operating systems must execute a proper shutdown sequence. At times, a system might crash or a power failure might take the machine down. Either way, at the next boot, a filesystem check using the &#039;&#039;fsck&#039;&#039; program shall be performed. &#039;&#039;Fsck&#039;&#039; will go through the system and try to recover any corrupt files that it finds. The result of this recovery operation will be placed in this directory. The files recovered are not likely to be complete or make much sense but there always is a chance that something worthwhile is recovered.&lt;br /&gt;
&lt;br /&gt;
===/mnt: 一時的なマウントポイント===&lt;br /&gt;
This is a generic mount point for temporary filesystems or devices. Mounting is the process of making a filesystem available to the system. After mounting, files will be accessible under the mount-point. Additional mount-points (subdirectories) may be created under /mnt/. There is no limitation to creating a mount-point anywhere on the system, but by convention and for practicality, littering a file system with mount-points should be avoided.&lt;br /&gt;
&lt;br /&gt;
===/opt: 問題のあるパッケージ===&lt;br /&gt;
Packages and large static files that do not fit cleanly into the above GNU filesystem layout can be placed in /opt. FHS 2.3 denotes /opt as reserved for the installation of add-on application software packages. A package placing files in the /opt/ directory creates a directory bearing the same name as the package. This directory in turn holds files that otherwise would be scattered throughout the file system.&lt;br /&gt;
For example, the acrobat package has Browser, Reader, and Resource&lt;br /&gt;
directories sitting at the same level as the bin directory. This&lt;br /&gt;
doesn&#039;t fit into a normal GNU filesystem layout, so Arch places all the&lt;br /&gt;
files in a subdirectory of /opt.&lt;br /&gt;
&lt;br /&gt;
===/proc: プロセス情報===&lt;br /&gt;
Directory /proc is very special in that it is also a virtual filesystem. It is sometimes referred to as the &#039;&#039;process information pseudo-file system&#039;&#039;. It doesn&#039;t contain &#039;real&#039; files, but rather, runtime system information (e.g. system memory, devices mounted, hardware configuration, etc). For this reason it can be regarded as a control and information center for the kernel. In fact, quite a lot of system utilities are simply calls to files in this directory. For example, &#039;lsmod&#039; is the same as &#039;cat /proc/modules&#039; while &#039;lspci&#039; is a synonym for &#039;cat /proc/pci&#039;. By altering files located in this directory, kernel parameters may be read/changed (sysctl) while the system is running.&lt;br /&gt;
&lt;br /&gt;
The most distinctive facet about files in this directory is the fact that all of them have a file size of 0, with the exception of &#039;&#039;&#039;kcore, mounts&#039;&#039;&#039; and &#039;&#039;&#039;self&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===/root: 管理者ディレクトリ===&lt;br /&gt;
Home directory of the System Administrator, &#039;root&#039;. This may be somewhat confusing, (&#039;/root under root&#039;) but historically, &#039;/&#039; was root&#039;s home directory (hence the name of the Administrator account). To keep things tidier, &#039;root&#039; eventually got its own home directory. Why not &#039;/home/root&#039;? Because &#039;/home&#039; is often located on a different partition or even on another system and would thus be inaccessible to &#039;root&#039; when - for whatever reason - only &#039;/&#039; is mounted.&lt;br /&gt;
&lt;br /&gt;
=== /run: 一時的な実行時データ===&lt;br /&gt;
The /run mountpoint is supposed to be a tmpfs mounted during early boot, available and writable to for all tools at any time during bootup. [[systemd]], [[udev]] or mdadm that are required early in the boot process require this directory, because /var can be implemented as a separate file system to be mounted at a later stage in the start-up process. It replaces /var/run/, which becomes a symlink of /run.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;strike&amp;gt;/sbin: システムバイナリ&amp;lt;/strike&amp;gt; (廃止)===&lt;br /&gt;
Traditionally UNIX discriminates between &#039;normal&#039; executables and those used for system maintenance and/or administrative tasks. The latter were supposed to reside either here or - the less important ones - in /usr/sbin. Programs executed after /usr is known to be mounted (when there are no problems) are generally placed into /usr/sbin. In practice, programs in /sbin require /usr to be mounted as all the necessary libraries are in /usr/lib. As of June 2013, [https://www.archlinux.org/news/binaries-move-to-usrbin-requiring-update-intervention/ /sbin and /usr/sbin were merged into /usr/bin]. The {{Pkg|filesystem}} package provides symlinks from /sbin and /usr/sbin to /usr/bin, and all packages should be updated to explicitly install to /usr/bin.&lt;br /&gt;
&lt;br /&gt;
===/srv: サービスデータ===&lt;br /&gt;
Site-specific data which is served by the system. The main purpose of specifying this is so that users may find the location of the data files for a particular service, and so that services which require a single tree for read-only data, writable data and scripts (such as CGI scripts) can be reasonably placed. Data of interest to a specific user shall be placed in that user&#039;s home directory.&lt;br /&gt;
&lt;br /&gt;
===/sys: 仮想ファイルシステム===&lt;br /&gt;
Virtual file system provided by the Linux kernel. By using virtual files, sysfs exports information about various kernel subsystems, hardware devices and associated device drivers from the kernel&#039;s device model to user space. In addition to providing information about various devices and kernel subsystems, exported virtual files are also used for their configuring.&lt;br /&gt;
&lt;br /&gt;
===/tmp: 一時的なファイル===&lt;br /&gt;
This directory contains files that are required temporarily. Many programs use this to create lock files and for temporary storage of data. Do not remove files from this directory unless you know exactly what you are doing! Many of these files are important for currently running programs and deleting them may result in a system crash. On most systems, old files in this directory are cleared out at boot or at daily intervals.&lt;br /&gt;
&lt;br /&gt;
===/usr: 共有可能な、読み取り専用データ=== &lt;br /&gt;
While root is the primary filesystem, /usr is the secondary hierarchy, for user data, containing the majority of (multi-)user utilities and applications. /usr is shareable, read-only data. This means that /usr shall be shareable between various hosts and must not be written to, except by the package manager (installation, update, upgrade). Any information that is host-specific or varies with time is stored elsewhere. &lt;br /&gt;
&lt;br /&gt;
Aside from /home, /usr usually contains by far the largest share of data on a system. Hence, this is one of the most important directories in the system as it contains all the user binaries, their documentation, libraries, header files, etc. X and its supporting libraries can be found here. User programs like telnet, ftp, etc., are also placed here. In the original UNIX implementations, /usr (for &#039;&#039;user&#039;&#039;), was where the home directories of the system&#039;s users were placed (that is to say, /usr/&#039;&#039;username&#039;&#039; was then the directory now known as /home/&#039;&#039;username&#039;&#039;). Over time, /usr has become where userspace programs and data (as opposed to &#039;kernelspace&#039; programs and data) reside. The name has not changed, but its meaning has narrowed and lengthened from &#039;&#039;everything user related&#039;&#039; to &#039;&#039;user usable programs and data&#039;&#039;. As such, the backronym &#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser &#039;&#039;&#039;S&#039;&#039;&#039;ystem &#039;&#039;&#039;R&#039;&#039;&#039;esources&#039; was created.&lt;br /&gt;
&lt;br /&gt;
====/usr/bin: バイナリ====&lt;br /&gt;
コマンドバイナリ。このディレクトリにはシステム上のバイナリ (アプリケーション) のほとんどが含まれます。このディレクトリ内の実行ファイルは様々です。例えば vim や gcc、gnome-session などがここに置かれます。昔は、このディレクトリには root 権限を必要としない、そしてシングルユーザーモードで必要ないバイナリだけを置くことになっていました。しかしながら、この決まりごとは既に強制ではなくなっており、Arch の開発陣は &amp;lt;strike&amp;gt;全てのバイナリをこのディレクトリに移動することを計画&amp;lt;/strike&amp;gt; 全てのバイナリをこのディレクトリに移動しています。&lt;br /&gt;
&lt;br /&gt;
====/usr/include: ヘッダーファイル====&lt;br /&gt;
ユーザー空間のソースコードをコンパイルするのに必要なヘッダーファイル。&lt;br /&gt;
&lt;br /&gt;
====/usr/lib: ライブラリ====&lt;br /&gt;
{{Note|The {{ic|/lib}} directory becomes a symlink to {{ic|/usr/lib}}. [https://www.archlinux.org/news/the-lib-directory-becomes-a-symlink/ Here] is the news. If you encounter error during this update. Please see [[DeveloperWiki:usrlib]] for solution.}}&lt;br /&gt;
Contains application private data (kernel modules, systemd services, udev rules, etc) and shared library images (the C programming code library). Libraries are collections of frequently used program routines and are readily identifiable through their filename extension of *.so. They are essential for basic system functionality. Kernel modules (drivers) are in the subdirectory /lib/modules/&amp;lt;kernel-version&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;strike&amp;gt;/usr/sbin: システムバイナリ&amp;lt;/strike&amp;gt; (廃止)====&lt;br /&gt;
Non-essential system binaries of use to the system administrator. As of June 2013, [https://www.archlinux.org/news/binaries-move-to-usrbin-requiring-update-intervention/ /usr/sbin was merged into /usr/bin]. The {{Pkg|filesystem}} package provides symlinks from /usr/sbin to /usr/bin, and all packages should now explicitly install to /usr/bin.&lt;br /&gt;
&lt;br /&gt;
====/usr/share: アーキテクチャに依存しないデータ====&lt;br /&gt;
This directory contains &#039;shareable&#039;, architecture-independent files (docs, icons, fonts etc). Note, however, that /usr/share is generally not intended to be shared by different operating systems or by different releases of the same operating system. Any program or package which contains or requires data that do not need to be modified should store these data in /usr/share (or /usr/local/share, if manually installed - see below). It is recommended that a subdirectory be used in /usr/share for this purpose.&lt;br /&gt;
&lt;br /&gt;
====/usr/src: ソースコード====&lt;br /&gt;
&amp;lt;!-- The &#039;linux&#039; sub-directory holds the Linux kernel sources, and header-files. --&amp;gt;&lt;br /&gt;
&#039;linux&#039;のサブディレクトリは、Linuxのカーネルのソースとヘッダファイルを格納しています。&lt;br /&gt;
&lt;br /&gt;
====/usr/local: ローカル階層====&lt;br /&gt;
Optional tertiary hierarchy for local data. The original idea behind /usr/local was to have a separate (&#039;local&#039;) &#039;/usr&#039; directory on every machine besides /usr itself, which might be mounted read-only from somewhere else. It copies the structure of /usr. These days, /usr/local is widely regarded as a good place in which to keep self-compiled or third-party programs. This directory is empty by default in Arch Linux. It may be used for manually compiled software installations if desired. [[pacman]] installs to /usr, therefore, manually compiled/installed software installed to /usr/local may peacefully co-exist with pacman-tracked system software.&lt;br /&gt;
&lt;br /&gt;
===/var: 可変ファイル===&lt;br /&gt;
Variable files, such as logs, spool files, and temporary e-mail files. On Arch, the [[ABS]] tree and pacman cache also reside here. Why not put the variable and transient data into /usr/? Because there might be circumstances when /usr/ is mounted as read-only, e.g. if it is on a CD or on another computer. &#039;/var/&#039; contains variable data, i.e. files and directories the system must be able to write to during operation, whereas /usr/ shall only contain static data.&lt;br /&gt;
Some directories can be put onto separate partitions or systems, e.g. for easier backups, due to network topology or security concerns. Other directories have to be on the root partition, because they are vital for the boot process. &#039;Mountable&#039; directories are: &#039;/home&#039;, &#039;/mnt&#039;, &#039;/tmp&#039; and &#039;/var&#039;. Essential for booting are: &#039;/bin&#039;, &#039;/boot&#039;, &#039;/dev&#039;, &#039;/etc&#039;, &#039;/lib&#039;, &#039;/proc&#039;, &#039;/sbin&#039; and &#039;/usr&#039;. &lt;br /&gt;
&lt;br /&gt;
====/var/abs====&lt;br /&gt;
The [[ABS]] tree. A ports-like package build system hierarchy containing build scripts within subdirectories corresponding to all installable Arch software.&lt;br /&gt;
&lt;br /&gt;
====/var/cache/pacman/pkg====&lt;br /&gt;
pacman のパッケージキャッシュ。&lt;br /&gt;
&lt;br /&gt;
====/var/lib: 状態情報====&lt;br /&gt;
Persistent data modified by programs as they run (e.g. databases, packaging system metadata etc.).&lt;br /&gt;
&lt;br /&gt;
====/var/log: ログファイル====&lt;br /&gt;
ログファイル。&lt;br /&gt;
&lt;br /&gt;
====/var/mail: ユーザーのメール====&lt;br /&gt;
&amp;lt;!-- Deprecated location for users&#039; mailboxes. --&amp;gt;&lt;br /&gt;
ユーザのメールボックスに推奨されていない場所です。&lt;br /&gt;
&lt;br /&gt;
====/var/spool: キュー====&lt;br /&gt;
Spool for tasks waiting to be processed (e.g. print queues and unread mail).&lt;br /&gt;
&lt;br /&gt;
=====/var/spool/mail=====&lt;br /&gt;
Shareable directory for users&#039; mailboxes.&lt;br /&gt;
&lt;br /&gt;
====/var/tmp: 保持される可能性がある一時的なファイル====&lt;br /&gt;
Temporary files to be preserved between reboots.&lt;br /&gt;
&lt;br /&gt;
==参照==&lt;br /&gt;
*[[wikipedia:ja:Filesystem Hierarchy Standard]]&lt;br /&gt;
*[http://www.pathname.com/fhs/ Linux FHS ホームページ]&lt;/div&gt;</summary>
		<author><name>はつせ</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Arch_%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0%E9%9A%8E%E5%B1%A4&amp;diff=3615</id>
		<title>Arch ファイルシステム階層</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Arch_%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0%E9%9A%8E%E5%B1%A4&amp;diff=3615"/>
		<updated>2015-08-29T06:08:31Z</updated>

		<summary type="html">&lt;p&gt;はつせ: /* /usr/src: ソースコード */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:ファイルシステム]]&lt;br /&gt;
[[en:Arch filesystem hierarchy]]&lt;br /&gt;
[[it:Filesystem Hierarchy Standard]]&lt;br /&gt;
[[ru:Filesystem Hierarchy Standard]]&lt;br /&gt;
[[zh-CN:Arch filesystem hierarchy]]&lt;br /&gt;
Arch Linux は他の多数のディストリビューションと同じようにファイルシステム階層標準に従っています。それぞれのディレクトリについてその目的を説明するのに加えて、この記事では Arch 固有の事情についても説明しています。&lt;br /&gt;
&lt;br /&gt;
== ファイルシステム階層標準 ==&lt;br /&gt;
[http://www.pathname.com/fhs Filesystem Hierarchy Standard (FHS) のホームページ] より:&lt;br /&gt;
:&amp;quot;&#039;&#039;ファイルシステムスタンダードは Unix ディストリビューションの開発者やパッケージの開発者、そしてシステムの実装者によって使われることを想定して策定されました。ただし、この標準はあくまでリファレンスであり、Unix のファイルシステムやディレクトリ階層を管理する方法のチュートリアルではありません。&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===共有可能ファイルと共有不能ファイル===&lt;br /&gt;
&#039;&#039;&#039;共有可能&#039;&#039;&#039;ファイルとはあるホストで保存されていながら他者からも利用できるファイルです。&#039;&#039;&#039;共有不能&#039;&#039;&#039;ファイルは共有できないファイルのことです。例えば、ユーザーのホームディレクトリ内のファイルは共有可能であり、デバイスのロックファイルは共有不能です。&lt;br /&gt;
&lt;br /&gt;
===静的ファイルと可変ファイル===&lt;br /&gt;
&#039;&#039;&#039;静的&#039;&#039;&#039;ファイルとは例えば、バイナリやライブラリ、ドキュメントなどのシステムの管理者以外からは変更を加えられることがないファイルを意味します。&#039;&#039;&#039;可変&#039;&#039;&#039;ファイルは静的ファイルでないファイルとして定義されます。&lt;br /&gt;
&lt;br /&gt;
== ディレクトリ ==&lt;br /&gt;
===root ファイルシステム===&lt;br /&gt;
root ファイルシステム (スラッシュ記号 (&#039;&#039;&#039;/&#039;&#039;&#039;) で表されます) は他の全てのファイルシステムの根幹となるファイルシステムです。階層の一番上に位置します。たとえファイルやディレクトリが別の物理デバイスに保存されていたとしても、全てのファイルとディレクトリは root ディレクトリ &amp;quot;/&amp;quot; 下に配置されます。root ファイルシステムの中身だけでシステムを起動・復旧・修復できるようになっている必要があります。&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;strike&amp;gt;/bin: 重要なコマンドラインバイナリ&amp;lt;/strike&amp;gt; (廃止)===&lt;br /&gt;
シングルユーザーモードで、全てのユーザーから利用できるバイナリを置くための伝統的なディレクトリです (例: cat, ls, cp)。/bin のプログラムはたとえ / を含むパーティションしかマウントされてないときも利用することができます。実際には、Arch では必要なライブラリは全て /usr/lib に存在しています。2013年6月から、[https://www.archlinux.org/news/binaries-move-to-usrbin-requiring-update-intervention/ /bin は /usr/bin に統合されました]。{{Pkg|filesystem}} パッケージには /bin から /usr/bin へのシンボリックリンクが含まれており、全てのパッケージは /usr/bin にインストールされるようになっています。&lt;br /&gt;
&lt;br /&gt;
===/boot: ブートローダーの静的なファイル===&lt;br /&gt;
共有不能の、静的なディレクトリです。ブートローダーの設定ファイルやブートローダーのステージだけでなく、カーネルや ramdisk イメージも含みます。/boot にはカーネルがユーザー空間のプログラムを実行する前に使用されるデータも保存されます。マスターブートセクタやセクターマップファイルなどです。&lt;br /&gt;
&lt;br /&gt;
===/dev: デバイスファイル===&lt;br /&gt;
Essential device nodes created by udev during the boot process and as machine hardware is discovered by events. This directory highlights one important aspect of the UNIX filesystem - everything is a file or a directory. Exploring this directory will reveal many files, each representing a hardware component of the system. The majority of devices are either block or character devices; however other types of devices exist and can be created. In general, &#039;block devices&#039; are devices that store or hold data, whereas &#039;character devices&#039; can be thought of as devices that transmit or transfer data. For example, hard disk drives and optical drives are categorized as block devices while serial ports, mice and USB ports are all character devices.&lt;br /&gt;
&lt;br /&gt;
===/etc: ホスト固有の設定===&lt;br /&gt;
Host-specific, unsharable configuration files shall be placed in the /etc directory. If more than one configuration file is required for an application, it is customary to use a subdirectory in order to keep the /etc/ area as clean as possible. It is considered good practice to make frequent backups of this directory as it contains all system related configuration files. &lt;br /&gt;
&lt;br /&gt;
====/etc/X11====&lt;br /&gt;
X Window System の設定ファイル。&lt;br /&gt;
&lt;br /&gt;
=====/etc/X11/xinit=====&lt;br /&gt;
xinit configuration files. &#039;xinit&#039; is a configuration method of starting up an X session that is designed to be used as part of a script. &lt;br /&gt;
&lt;br /&gt;
=====/etc/X11/xinit/xinitrc=====&lt;br /&gt;
Global xinitrc file, used by all X sessions started by xinit (startx). Its usage is of course overridden by a .xinitrc file located in the home directory of a user.&lt;br /&gt;
&lt;br /&gt;
===/home: ユーザーディレクトリ===&lt;br /&gt;
UNIX is a multi-user environment. Therefore, each user is also assigned a specific directory that is accessible only to them and to the root user. These are the user home directories, which can be found under &#039;/home/$USER&#039; (~/). Within their home directory, a user can write files, delete them, install programs, etc. Users&#039; home directories contain their data and personal configuration files, the so-called &#039;dot files&#039; (their name is preceded by a dot), which are &#039;hidden&#039;. To view dotfiles, enable the appropriate option in your file manager or run ls with the -a switch. If there is a conflict between personal and system wide configuration files, the settings in the personal file will prevail. Dotfiles most likely to be altered by the end user include .xinitrc and .bashrc files. The configuration files for xinit and Bash respectively. They allow the user the ability to change the window manager to be started upon login and also aliases, user-specified commands and environment variables respectively. When a user is created, their dotfiles shall be taken from the /etc/skel directory where system sample files reside. &lt;br /&gt;
&lt;br /&gt;
Directory /home can become quite large as it is typically used for storing downloads, compiling, installing and running programs, mail, collections of multimedia files etc.&lt;br /&gt;
&lt;br /&gt;
===/lost+found: ファイルシステム固有の復元可能なデータ===&lt;br /&gt;
UNIX-like operating systems must execute a proper shutdown sequence. At times, a system might crash or a power failure might take the machine down. Either way, at the next boot, a filesystem check using the &#039;&#039;fsck&#039;&#039; program shall be performed. &#039;&#039;Fsck&#039;&#039; will go through the system and try to recover any corrupt files that it finds. The result of this recovery operation will be placed in this directory. The files recovered are not likely to be complete or make much sense but there always is a chance that something worthwhile is recovered.&lt;br /&gt;
&lt;br /&gt;
===/mnt: 一時的なマウントポイント===&lt;br /&gt;
This is a generic mount point for temporary filesystems or devices. Mounting is the process of making a filesystem available to the system. After mounting, files will be accessible under the mount-point. Additional mount-points (subdirectories) may be created under /mnt/. There is no limitation to creating a mount-point anywhere on the system, but by convention and for practicality, littering a file system with mount-points should be avoided.&lt;br /&gt;
&lt;br /&gt;
===/opt: 問題のあるパッケージ===&lt;br /&gt;
Packages and large static files that do not fit cleanly into the above GNU filesystem layout can be placed in /opt. FHS 2.3 denotes /opt as reserved for the installation of add-on application software packages. A package placing files in the /opt/ directory creates a directory bearing the same name as the package. This directory in turn holds files that otherwise would be scattered throughout the file system.&lt;br /&gt;
For example, the acrobat package has Browser, Reader, and Resource&lt;br /&gt;
directories sitting at the same level as the bin directory. This&lt;br /&gt;
doesn&#039;t fit into a normal GNU filesystem layout, so Arch places all the&lt;br /&gt;
files in a subdirectory of /opt.&lt;br /&gt;
&lt;br /&gt;
===/proc: プロセス情報===&lt;br /&gt;
Directory /proc is very special in that it is also a virtual filesystem. It is sometimes referred to as the &#039;&#039;process information pseudo-file system&#039;&#039;. It doesn&#039;t contain &#039;real&#039; files, but rather, runtime system information (e.g. system memory, devices mounted, hardware configuration, etc). For this reason it can be regarded as a control and information center for the kernel. In fact, quite a lot of system utilities are simply calls to files in this directory. For example, &#039;lsmod&#039; is the same as &#039;cat /proc/modules&#039; while &#039;lspci&#039; is a synonym for &#039;cat /proc/pci&#039;. By altering files located in this directory, kernel parameters may be read/changed (sysctl) while the system is running.&lt;br /&gt;
&lt;br /&gt;
The most distinctive facet about files in this directory is the fact that all of them have a file size of 0, with the exception of &#039;&#039;&#039;kcore, mounts&#039;&#039;&#039; and &#039;&#039;&#039;self&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===/root: 管理者ディレクトリ===&lt;br /&gt;
Home directory of the System Administrator, &#039;root&#039;. This may be somewhat confusing, (&#039;/root under root&#039;) but historically, &#039;/&#039; was root&#039;s home directory (hence the name of the Administrator account). To keep things tidier, &#039;root&#039; eventually got its own home directory. Why not &#039;/home/root&#039;? Because &#039;/home&#039; is often located on a different partition or even on another system and would thus be inaccessible to &#039;root&#039; when - for whatever reason - only &#039;/&#039; is mounted.&lt;br /&gt;
&lt;br /&gt;
=== /run: 一時的な実行時データ===&lt;br /&gt;
The /run mountpoint is supposed to be a tmpfs mounted during early boot, available and writable to for all tools at any time during bootup. [[systemd]], [[udev]] or mdadm that are required early in the boot process require this directory, because /var can be implemented as a separate file system to be mounted at a later stage in the start-up process. It replaces /var/run/, which becomes a symlink of /run.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;strike&amp;gt;/sbin: システムバイナリ&amp;lt;/strike&amp;gt; (廃止)===&lt;br /&gt;
Traditionally UNIX discriminates between &#039;normal&#039; executables and those used for system maintenance and/or administrative tasks. The latter were supposed to reside either here or - the less important ones - in /usr/sbin. Programs executed after /usr is known to be mounted (when there are no problems) are generally placed into /usr/sbin. In practice, programs in /sbin require /usr to be mounted as all the necessary libraries are in /usr/lib. As of June 2013, [https://www.archlinux.org/news/binaries-move-to-usrbin-requiring-update-intervention/ /sbin and /usr/sbin were merged into /usr/bin]. The {{Pkg|filesystem}} package provides symlinks from /sbin and /usr/sbin to /usr/bin, and all packages should be updated to explicitly install to /usr/bin.&lt;br /&gt;
&lt;br /&gt;
===/srv: サービスデータ===&lt;br /&gt;
Site-specific data which is served by the system. The main purpose of specifying this is so that users may find the location of the data files for a particular service, and so that services which require a single tree for read-only data, writable data and scripts (such as CGI scripts) can be reasonably placed. Data of interest to a specific user shall be placed in that user&#039;s home directory.&lt;br /&gt;
&lt;br /&gt;
===/sys: 仮想ファイルシステム===&lt;br /&gt;
Virtual file system provided by the Linux kernel. By using virtual files, sysfs exports information about various kernel subsystems, hardware devices and associated device drivers from the kernel&#039;s device model to user space. In addition to providing information about various devices and kernel subsystems, exported virtual files are also used for their configuring.&lt;br /&gt;
&lt;br /&gt;
===/tmp: 一時的なファイル===&lt;br /&gt;
This directory contains files that are required temporarily. Many programs use this to create lock files and for temporary storage of data. Do not remove files from this directory unless you know exactly what you are doing! Many of these files are important for currently running programs and deleting them may result in a system crash. On most systems, old files in this directory are cleared out at boot or at daily intervals.&lt;br /&gt;
&lt;br /&gt;
===/usr: 共有可能な、読み取り専用データ=== &lt;br /&gt;
While root is the primary filesystem, /usr is the secondary hierarchy, for user data, containing the majority of (multi-)user utilities and applications. /usr is shareable, read-only data. This means that /usr shall be shareable between various hosts and must not be written to, except by the package manager (installation, update, upgrade). Any information that is host-specific or varies with time is stored elsewhere. &lt;br /&gt;
&lt;br /&gt;
Aside from /home, /usr usually contains by far the largest share of data on a system. Hence, this is one of the most important directories in the system as it contains all the user binaries, their documentation, libraries, header files, etc. X and its supporting libraries can be found here. User programs like telnet, ftp, etc., are also placed here. In the original UNIX implementations, /usr (for &#039;&#039;user&#039;&#039;), was where the home directories of the system&#039;s users were placed (that is to say, /usr/&#039;&#039;username&#039;&#039; was then the directory now known as /home/&#039;&#039;username&#039;&#039;). Over time, /usr has become where userspace programs and data (as opposed to &#039;kernelspace&#039; programs and data) reside. The name has not changed, but its meaning has narrowed and lengthened from &#039;&#039;everything user related&#039;&#039; to &#039;&#039;user usable programs and data&#039;&#039;. As such, the backronym &#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser &#039;&#039;&#039;S&#039;&#039;&#039;ystem &#039;&#039;&#039;R&#039;&#039;&#039;esources&#039; was created.&lt;br /&gt;
&lt;br /&gt;
====/usr/bin: バイナリ====&lt;br /&gt;
コマンドバイナリ。このディレクトリにはシステム上のバイナリ (アプリケーション) のほとんどが含まれます。このディレクトリ内の実行ファイルは様々です。例えば vim や gcc、gnome-session などがここに置かれます。昔は、このディレクトリには root 権限を必要としない、そしてシングルユーザーモードで必要ないバイナリだけを置くことになっていました。しかしながら、この決まりごとは既に強制ではなくなっており、Arch の開発陣は &amp;lt;strike&amp;gt;全てのバイナリをこのディレクトリに移動することを計画&amp;lt;/strike&amp;gt; 全てのバイナリをこのディレクトリに移動しています。&lt;br /&gt;
&lt;br /&gt;
====/usr/include: ヘッダーファイル====&lt;br /&gt;
ユーザー空間のソースコードをコンパイルするのに必要なヘッダーファイル。&lt;br /&gt;
&lt;br /&gt;
====/usr/lib: ライブラリ====&lt;br /&gt;
{{Note|The {{ic|/lib}} directory becomes a symlink to {{ic|/usr/lib}}. [https://www.archlinux.org/news/the-lib-directory-becomes-a-symlink/ Here] is the news. If you encounter error during this update. Please see [[DeveloperWiki:usrlib]] for solution.}}&lt;br /&gt;
Contains application private data (kernel modules, systemd services, udev rules, etc) and shared library images (the C programming code library). Libraries are collections of frequently used program routines and are readily identifiable through their filename extension of *.so. They are essential for basic system functionality. Kernel modules (drivers) are in the subdirectory /lib/modules/&amp;lt;kernel-version&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;strike&amp;gt;/usr/sbin: システムバイナリ&amp;lt;/strike&amp;gt; (廃止)====&lt;br /&gt;
Non-essential system binaries of use to the system administrator. As of June 2013, [https://www.archlinux.org/news/binaries-move-to-usrbin-requiring-update-intervention/ /usr/sbin was merged into /usr/bin]. The {{Pkg|filesystem}} package provides symlinks from /usr/sbin to /usr/bin, and all packages should now explicitly install to /usr/bin.&lt;br /&gt;
&lt;br /&gt;
====/usr/share: アーキテクチャに依存しないデータ====&lt;br /&gt;
This directory contains &#039;shareable&#039;, architecture-independent files (docs, icons, fonts etc). Note, however, that /usr/share is generally not intended to be shared by different operating systems or by different releases of the same operating system. Any program or package which contains or requires data that do not need to be modified should store these data in /usr/share (or /usr/local/share, if manually installed - see below). It is recommended that a subdirectory be used in /usr/share for this purpose.&lt;br /&gt;
&lt;br /&gt;
====/usr/src: ソースコード====&lt;br /&gt;
&amp;lt;!-- The &#039;linux&#039; sub-directory holds the Linux kernel sources, and header-files. --&amp;gt;&lt;br /&gt;
&#039;linux&#039;のサブディレクトリは、Linuxのカーネルのソースとヘッダファイルを格納しています。&lt;br /&gt;
&lt;br /&gt;
====/usr/local: ローカル階層====&lt;br /&gt;
Optional tertiary hierarchy for local data. The original idea behind /usr/local was to have a separate (&#039;local&#039;) &#039;/usr&#039; directory on every machine besides /usr itself, which might be mounted read-only from somewhere else. It copies the structure of /usr. These days, /usr/local is widely regarded as a good place in which to keep self-compiled or third-party programs. This directory is empty by default in Arch Linux. It may be used for manually compiled software installations if desired. [[pacman]] installs to /usr, therefore, manually compiled/installed software installed to /usr/local may peacefully co-exist with pacman-tracked system software.&lt;br /&gt;
&lt;br /&gt;
===/var: 可変ファイル===&lt;br /&gt;
Variable files, such as logs, spool files, and temporary e-mail files. On Arch, the [[ABS]] tree and pacman cache also reside here. Why not put the variable and transient data into /usr/? Because there might be circumstances when /usr/ is mounted as read-only, e.g. if it is on a CD or on another computer. &#039;/var/&#039; contains variable data, i.e. files and directories the system must be able to write to during operation, whereas /usr/ shall only contain static data.&lt;br /&gt;
Some directories can be put onto separate partitions or systems, e.g. for easier backups, due to network topology or security concerns. Other directories have to be on the root partition, because they are vital for the boot process. &#039;Mountable&#039; directories are: &#039;/home&#039;, &#039;/mnt&#039;, &#039;/tmp&#039; and &#039;/var&#039;. Essential for booting are: &#039;/bin&#039;, &#039;/boot&#039;, &#039;/dev&#039;, &#039;/etc&#039;, &#039;/lib&#039;, &#039;/proc&#039;, &#039;/sbin&#039; and &#039;/usr&#039;. &lt;br /&gt;
&lt;br /&gt;
====/var/abs====&lt;br /&gt;
The [[ABS]] tree. A ports-like package build system hierarchy containing build scripts within subdirectories corresponding to all installable Arch software.&lt;br /&gt;
&lt;br /&gt;
====/var/cache/pacman/pkg====&lt;br /&gt;
pacman のパッケージキャッシュ。&lt;br /&gt;
&lt;br /&gt;
====/var/lib: 状態情報====&lt;br /&gt;
Persistent data modified by programs as they run (e.g. databases, packaging system metadata etc.).&lt;br /&gt;
&lt;br /&gt;
====/var/log: ログファイル====&lt;br /&gt;
ログファイル。&lt;br /&gt;
&lt;br /&gt;
====/var/mail: ユーザーのメール====&lt;br /&gt;
Deprecated location for users&#039; mailboxes.&lt;br /&gt;
&lt;br /&gt;
====/var/spool: キュー====&lt;br /&gt;
Spool for tasks waiting to be processed (e.g. print queues and unread mail).&lt;br /&gt;
&lt;br /&gt;
=====/var/spool/mail=====&lt;br /&gt;
Shareable directory for users&#039; mailboxes.&lt;br /&gt;
&lt;br /&gt;
====/var/tmp: 保持される可能性がある一時的なファイル====&lt;br /&gt;
Temporary files to be preserved between reboots.&lt;br /&gt;
&lt;br /&gt;
==参照==&lt;br /&gt;
*[[wikipedia:ja:Filesystem Hierarchy Standard]]&lt;br /&gt;
*[http://www.pathname.com/fhs/ Linux FHS ホームページ]&lt;/div&gt;</summary>
		<author><name>はつせ</name></author>
	</entry>
</feed>