FISH\_GREETING(1) fish-shell FISH\_GREETING(1)

# [NAME](#NAME)

fish\_greeting - display a welcome message in interactive shells

# [SYNOPSIS](#SYNOPSIS)

```
fish_greeting
```

```
function fish_greeting


    ...
end
```

# [DESCRIPTION](#DESCRIPTION)

When an interactive fish starts, it executes fish\_greeting and displays its output.

The default fish\_greeting is a function that prints a variable of the same name (**$fish\_greeting**), so you can also just change that if you just want to change the text.

If **SHELL\_WELCOME** &lt;#envvar-SHELL\_WELCOME&gt; is set, it is displayed after the greeting. This is a standard environment variable that may be set by tools like systemd's **run0** to display session information.

While you could also just put **echo** calls into config.fish, fish\_greeting takes care of only being used in interactive shells, so it won't be used e.g. with **scp** (which executes a shell), which prevents some errors.

# [EXAMPLE](#EXAMPLE)

To just empty the text, with the default greeting function:

```
set -U fish_greeting
```

or **set -g fish\_greeting** in config.fish &lt;#configuration&gt;.

A simple greeting:

```
function fish_greeting


    echo Hello friend!


    echo The time is (set_color yellow)(date +%T)(set_color --reset) and this machine is called $hostname
end
```

# [Copyright](#Copyright)

fish-shell developers

October 10, 2026 4.9

---

Document: fish_greeting(1) from fish 4.9.3-r1 (Chainguard OS)
Source: https://github.com/fish-shell/fish-shell
