Skip to main content
Share Your Experience: Take the 2024 Developer Survey
88 votes

Windows console with ANSI colors handling

None of the answers on this page mention an important aspect of the new support for ANSI Terminal Control which was added to the Windows 10 console host in build 16257 (and later). Namely, it's n̲o̲t̲ ...
Glenn Slayden's user avatar
75 votes

Chrome: Hide Extension Errors in JavaScript Console

I know that this is an old question, but coming here today I found a new solution and decided to add my two cents. In the Chrome console there is a gear option on the far right. Clicking on it will ...
Rabbi Shuki Gur's user avatar
68 votes

Change default code page of Windows console to UTF-8

In the 1809 build of Windows 10 I've managed to permanently solve this by going to the system's Language settings, selecting Administrative language settings, clicking Change system locale... and ...
Isti115's user avatar
  • 1,054
53 votes

How to close a tmux session

TMUX Prefix (e.g. ctrl+b) + :kill-session or tmux kill-session (could run either from the inside of a session or the outside) Both styles of invocation can use the flags: -t target-session ...
FSchndr's user avatar
  • 631
36 votes
Accepted

Why do I get different results from Mac's shasum than from other shasum calculators?

The input to the shasum invocation in the question is test\n (with a newline), not test. If you give test with no newline to shasum you’ll get the same output as the online tools cited: $ echo -n &...
sideshowbarker's user avatar
34 votes

How to force GPG to use console-mode pinentry to prompt for passwords?

On a debian box: sudo apt install pinentry-tty sudo update-alternatives --config pinentry (and set it to pinentry-tty)
John Lawrence Aspden's user avatar
32 votes
Accepted

How does ls know how to output its results?

It calls the isatty() libc function on its stdout file descriptor to determine whether the output goes to a terminal or not. Internally, isatty() attempts to use one of the ioctl() calls that are ...
grawity_u1686's user avatar
23 votes

How to stop kernel messages from flooding my console?

You can also temporarily suppress all kernel logging to the console by using: sudo dmesg -n 1 See also: https://askubuntu.com/questions/97256/how-do-i-disable-messages-or-logging-from-printing-on-...
Marius's user avatar
  • 331
21 votes

How to close a tmux session

One of the best way to do this interactively is by pressing ctrl+b,w to go to window mode then add tag by pressing t. then press capital X to kill all tagged window... this is apparent when you have ...
Vaisakh K M's user avatar
20 votes

Why do I get different results from Mac's shasum than from other shasum calculators?

Try this: hexdump -C <<< test Knowing Unix shells, you're probably getting an unwanted 0x0a at the end of that string.
Spiff's user avatar
  • 105k
18 votes

Windows console with ANSI colors handling

Is there any console emulator for Windows that interprets ANSI coloring? Windows before 10 - no native support for ANSI colors on the console For Windows version below 10, the Windows command ...
Jens A. Koch's user avatar
18 votes

How do commands like top update output without appending in the console?

There are, potentially, two mechanisms at work here. One is use of ANSI escape codes (and other non-ANSI codes in some cases), as mentioned by Martin Prikryl in their answer, to implement a text-based ...
Austin Hemmelgarn's user avatar
17 votes
Accepted

How to force GPG to use console-mode pinentry to prompt for passwords?

On Ubuntu 18.04, with the default installation of gpg 2.2.4, I have /usr/bin/pinentry /usr/bin/pinentry-gnome3 /usr/bin/pinentry-gtk-2 /usr/bin/pinentry-x11 I was able to do the following to have a ...
Roc W.'s user avatar
  • 315
16 votes
Accepted

Windows 10 console stops running if I click in the console window

The Windows 10 command prompt pauses when you click so that you can copy and paste text without that text changing or moving. You can escape this copy mode by simply right clicking in the console ...
Worthwelle's user avatar
  • 4,708
15 votes

Is there a way to get iTerm + Bash usability on Microsoft Windows?

I personally prefer Cmder which is a combination of all the previous answers. Cmder is a software package created out of pure frustration over the absence of nice console emulators on Windows. It is ...
Emile Bergeron's user avatar
15 votes

Chrome: Hide Extension Errors in JavaScript Console

In case the error is coming from a chrome extension you don't want to disable, there's now a feature to filter messages from specific extensions or scripts. Find the console message, right click on it,...
tobek's user avatar
  • 276
15 votes

How to force GPG to use console-mode pinentry to prompt for passwords?

I'll copy my answer from over here... Looking at man pinentry-gnome3, I see this: pinentry-gnome3 implements a PIN entry dialog based on GNOME 3, which aims to follow the GNOME Human ...
mblythe's user avatar
  • 471
15 votes

Weird characters appearing in the console

Such garbage may be an aftermath of a command that output binary data to your console. Usually you don't want commands to do this. Still it's possible due to a bug or some mistake. Example: You ...
Kamil Maciorowski's user avatar
14 votes

What is the difference between shell, console, and terminal?

For beginner beginners For a more detailed description: https://askubuntu.com/a/506628/130518 terminal = text input/output environment console = physical terminal (something you can actually ...
Karl Morrison's user avatar
11 votes

How to force GPG to use console-mode pinentry to prompt for passwords?

I just had this problem on Ubuntu 16.04.3 when trying to generate/install a private key using gpg2 (2.1.11) on a system account without a password, and on a user account over ssh. Nothing worked ...
racitup's user avatar
  • 211
11 votes
Accepted

How do I read the console output of a Windows GUI application?

Invoke it as gui_application.exe > output.txt to have stdout go into the file Invoke it as gui_application.exe > output.txt 2>&1 to have stdout and stderr go into the file If you are ...
John Rocha's user avatar
10 votes

How do commands like top update output without appending in the console?

What you observe is the product of a historical development. The earliest interactive terminals were true-to-god teletypewriters; essentially electric typewriters connected to a telephone line. (Ever ...
Peter - Reinstate Monica's user avatar
10 votes

How to open console app in Windows 11 without using new terminal feature?

Change the shortcut to use console host. For example: C:\Windows\System32\conhost.exe C:\path to your app\program.exe This way W11 launches the program directly. Works create for FAR Manager.
Sergo Ulpus's user avatar
10 votes

How does ls know how to output its results?

For a less technical explanation, observe what happens when you try these two commands: $ ls update.sh web.config MyApp.runtimeconfig.json $ ls | cat update.sh web.config MyApp.runtimeconfig.json ...
gbarry's user avatar
  • 850
9 votes

Linux - copy/cut file into clipboard

When you press Ctrl-C over a file in the file manager, the file's contents IS NOT copied to the clipboard. A simple test: select a file in file manager, press Ctrl-C, open a text editor, press Ctrl-V. ...
manjesh23's user avatar
  • 1,692
8 votes

interactive/visual merge tool for console?

sdiff, a classic command line tool which shows text file differences side by side, also has an interactive merge mode. Use it by running $ sdiff -o output.txt input1.txt input2.txt It is the default ...
fbmd's user avatar
  • 180
8 votes

How can I change the input keyboard layout while in the console?

loadkeys us, it loads US keys but for a single session.
sunilyadav0201's user avatar
8 votes

Windows console with ANSI colors handling

Currently CMD console colors are not enabled by default in Win10, so, to enable it add this to your code: #if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64 HANDLE hOut = ...
Pedro77's user avatar
  • 1,961
7 votes

Colored copy of PuTTY window

Looks like this option has moved to a submenu since the answer was posted in 2010. In 2020, I have Putty Release 0.74: Window->selection->copy->Copy to clipboard in RTF as well as plain text
LinuxDisciple's user avatar
7 votes

interactive/visual merge tool for console?

I use the Midnight Commander for this. Select a file on the left pane and another on the right, press F9, then Command > Compare Files. It can also be called using the mcdiff command Use Enter to ...
Bernardo Ramos's user avatar

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