When using the terminal, instead of typing "exit", I accidentally typed "`xit" instead.
Then the terminal entered a weird mode like this, and would't respond to anything I type:
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Your terminal is waiting for input. You can interrupt it with CTRL+C.
`xit. Backticks (
`) are used in bash for command substitutions (like
$()). Because of the leading
`, bash now expects a closing
`, which is not found. This is actually a helpful feature, if you want to distribute commands over several lines, like
cat `find -name "foo*" | > grep .txt` #will output the content of foo.txt
If you now type the missing
`, your bash will execute your command (and probably crash, because of unknown commands). Therefore you should cancel your started command with CTRL+C and type
You can stop every process which is running in the foreground with
ctrl+c which sends a kill (I think).
> is a prompt like your
$ when you start a new terminal (shell), or if you type python there is a
>>> prompt. This one you can exit, by typing
exit or pressing
ctrl+d, which sends a logout.
The prompt means you started a program which has its own prompt, instead of the shell one. I don't know what exactly the ` (backtick) starts, maybe someone can give the answer.
There are tons of those useful shortcuts.
ctrl+c = kill a process
ctrl+d = logout
In Bash the backtick character ("`") is interpreted as the start of a command substitution.
Command substitution allows the output of a command to replace the command itself. Command substitution occurs when a command is enclosed as follows: $(command) or `command`
Bash performs the expansion by executing command and replacing the command substitution with the standard output of the command, with any trailing newlines deleted.
So whatever you type in afterwards is interpreted as part of the command substitution until another backtick is entered.