linuxterminalutilityxdgutils

What does # enter key do in linux terminal?


I recently used #Enter (# followed by pressing Enter key) to get a newline after opening okular using xdg-open gave a bunch of logs. What processes or services does # enter kill and can it possibly introduce any errors in process running (that of okular)? Thanks a lot!

EDIT

Opening Okular via xdg-open gives a new line with output-

okular(8107)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: okular(8107)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: okular(8107)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: okular(8107)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: okular(8107)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig

Typing # then enter ends the above and starts a new line. Similar happens for firefox, vlc etc.

What actually is # doing in here?


Solution

  • Reading between the lines, I think the key reproduction steps are:

    1. Start from an interactive shell prompt
    2. Run a command that backgrounds itself (or explicitly background it with &)
    3. Output from the background process obscures the following shell prompt
    4. Run a do-nothing command to get the shell to print a fresh prompt.

    If that's the case, then just pressing Enter should be enough.

    This probably should be on unix.stackexchange.com