We’re rewarding the question askers & reputations are being recalculated! Read more.
10

On some Unix-style systems (BSDs and macOS), CtrlT sends SIGINFO to the running process. Some commands handle this directly; otherwise, it’s handled by the kernel, and that’s what produces the output you’re seeing. SIGINFO on GNU Linux (Arch Linux) missing has more on the topic.


3

Originally the codes came from DEC as part of their VT52/VT100/VT220 series serial display consoles. These were later standardised as part of ECMA and ANSI, and over time extended. You can see one such early ECMA standards document from 1979, specifically page 40 of the document (page 48 of the PDF file) section 7.2.63 SGR. The ESC [ 38 sequence is reserved ...


3

if is a keyword to the shell. You can either complete the syntactical construct, for example by typing then true ; fi, or just type control-c to break back to the normal prompt.


3

If I understand the question correctly, it really boils down to opinion? The following tries to summarize some points worth considering Not all output is to terminals As trivial as it sounds, even if every terminal on the world understands the ANSI sequences correctly (it is not the case as mentioned in the comments, for statements about all it is ...


3

Filenames on Unix can not contain the character / since this is the path separator. The pathname ;nc -e /bin/bash 127.0.0.1 443 would refer to a file called bash 127.0.0.1 443 in the directory bin, which in turn is a subdirectory of ;nc -e (with a space at the end). The / character is one of only two characters that are not allowed in Unix filenames. The ...


3

I think what your looking for is grc, i.e generic colorizer. With it you'll be able to setup regexes thats matches your comman/output to colors. And there is a bunch of predified confuguration too.


2

You've set the login shell to prevent a shell starting. (I'm not sure why you would have run this command if you didn't know what it does. It's pretty specific; did someone trick you into trying this?) Assuming you're on a platform that has /bin/bash you can use this to reset your shell usermod -s /bin/bash ahmad By the way, the passwd -d removed the ...


2

Following the KISS logic that is beloved in Linux and UNIX world, a terminal emulator is a terminal emulator, no more. You mix several things: You want command line program to implement point and click logic... there's already that kind of commands in Linux. For example, Midnight commander is a text-based file manager based on ncurses. Note that (thanks ...


2

The behavior on \e[2J differs across terminals. Some, e.g. Xterm clear the screen as you expect. Some others, e.g. VTE (GNOME Terminal and other frontends) scroll out the contents to the scrollback buffer as you experience it. You could move the cursor home in the first step and then clear with \e[J ("erase below", that is, to the right in the cursor's row, ...


1

'Check the directory that your shell is currently in'...to interpret the question I would interpret it simply as pwd i.e. print working directory. You know cd? and man? This "working", or "current" dir is often displayed in the prompt, together with hostname and/or username. But that's not "checking" ;). If you want to know where a shell "lives" as a ...


1

Does the terminal have its input routed through the bash process into the program currently being run, or is the terminal "disconnected" from the bash process and connected to the new program, preventing bash from intercepting or interfering? Neither. Assuming a simple foreground command with no pipes or redirects... Input from the user and output back to ...


1

Just put the redirection before the command: >filename.txt printf '%s\n' "This is the first line" "This is the second line" 'This line has "double-quotes"' '' 'That fourth line is empty' '"I don'\''t think I can avoid using both types of quotes," she said.' Actually, you can put the redirection anywhere in the command, so the following might seem "more ...


1

If your XServer hangs, you may try using the Magic SysRq key combination to detach keyboard control from X. ALT + SysRq + R If not printed on your Keyboard: SysRq is on the Print Screen button. Then switch to a text terminal: CTRL + ALT + F1 Log in there and kill what must die. By default detaching the keyboard should be available, but some features ...


1

The answer in general is "no", you are providing an end of file (EOF) indication to the program running in the terminal/screen/tmux, but bash for example allows you to say IGNOREEOF=4 and then it takes 4 control-D characters in a row to exit the shell.


1

When you exit the fish shell session, the bash shell that was starting up but that was "put on hold" while fish was running, continues to run. For whatever reason, it leaves the terminal in a confused state (try reset or stty sane to fix that). If you always want to run the fish shell instead of bash, then it would be easier to just change your login shell ...


1

You can run stty sane or reset to get your terminal back to how you expect. Rather than running from the bottom of .bashrc, you can configure your terminal to start fish instead of your login shell.


1

The character is actually not in the font you indicated. You can see this using xfd: xfd -fa inconsolata That shows the last codepoint is U+2423. Reading a little further, it turns out that the character is in the Unicode private use area, and (notwithstanding the fact that some font may provide it) has no standard meaning. Since late 2018, xterm can ...


Only top voted, non community-wiki answers of a minimum length are eligible