New answers tagged terminal
0
votes
Terminal prompt not wrapping correctly
The question asked is for the Bash shell interpreter, as like many of the other questions on similar topic. None, if not few, point to on how to do it on the Zsh shell interpreter.
\[ ... \] or \001 ....
0
votes
Is it possible to check where an alias was defined?
To add to the bash -ilxc : 2>&1 | grep, I would set PS4 so that when grep picks out the line with your alias, you get the file where it's from. For example
PS4='+ ${BASH_SOURCE[0]}:${LINENO} ' ...
1
vote
How to turn off the ANSI escape sequence of Bash?
Just tell that you have a terminal which do not support such features, e.g. putting
TERM=vanilla jest foo.js
or set the environment variable at beginning of your script (remember to export it: the ...
0
votes
nohup won't show next prompt in SSH session
Add this to .bashrc
function detach { ( nohup $* </dev/null 2>&1 >/dev/null & disown ; sleep 0 ) >/dev/null ; } ; export -f detach
Then you can run: detach
e.g. detach gedit ....
-1
votes
Zip the whole contents of a server except for www and access-logs symlinks
This is what you are looking for (from man zip):
-y
--symlinks
For UNIX and VMS (V8.3 and later), store symbolic links as such
in the zip archive, instead of compressing and ...
3
votes
Accepted
How to run the command "sudo sh /path/to/script.sh" by double clicking?
EDIT
Since you edited your comment to provide more information, I can now give you a complete answer. I verified with my friend who runs KDE plasma, and he says that the default behavior is that ...
0
votes
Getting error when using FILTERING in a Window on top command
On the Mac Terminal Zsh the top command has many differences with traditional linux implementations, as exemplified with the OP's question. I found a nice solution for filtering all iTerm2 processes:
...
1
vote
Bash customization only take place after interacting with the terminal for the first time
Starship applies its configuration each time you execute any command (see starship init bash --full-code-print for one example of it setting up $PROMPT_COMMAND) but as far as I can see not in the ....
2
votes
Accepted
Unexpected terminal behavior after SSH session ends unexpectedly
Use ESC [?1000l to disable mouse events:
printf '\e[?1000l'
The reason you need to do this is because the application enabled mouse events but was unable to disable them in the normal manner ("...
0
votes
Command or tool to interpret and read asciidoctor syntax through terminal?
Asciidoctor itself can convert .adoc files to various formats, including HTML. While it doesn't natively support terminal viewing, you can convert the AsciiDoc file to HTML and then use a text-based ...
2
votes
Accepted
Different name on terminal than on file manager
What you're observing is a common behavior in many Linux distributions, including Red Hat. The discrepancy in file names between the graphical file manager and the terminal is due to the way desktop ...
2
votes
Different name on terminal than on file manager
The name you see in the terminal will always be the real one. Presumably, your file manager is hiding the extension. Then, since this is a .desktop file, it probably contains its own display name ...
1
vote
In terminal, how to delete a word when cursor is within the word?
zsh's line editor supports all of vim's [cd][ai][wW] (even an extra [cd][ia]a as a bonus) out of the box when in vi mode (entered with bindkey -v like in tcsh or set -o vi like in ksh).
See info zsh '...
3
votes
In terminal, how to delete a word when cursor is within the word?
If you are using a shell which uses readline(3) as bash, you have either to combine two shortcuts:Alt-dAlt-Backspace
Or you define a key which is not already in use, see the output of the command ...
2
votes
How to change the line spacing in Terminator?
Nowadays, Terminator luckily supports this. In Preferences/Global, you can set the "cell height". It does exactly what @egmont described in his answer. I've actually been browsing the source ...
1
vote
is it possible to auto wrap the log output when check the linux service log
If you don't mind losing the colors, you can just pipe to cat which should result in your terminal wrapping the output. Compare:
systemctl status thermald.service
systemctl status thermald.service | ...
0
votes
Accepted
Are there commands for execute XFCE's menu entries to reboot or power off/shut down?
From https://askubuntu.com/a/771187/158442:
I think what you want is xfce4-session-logout (online manpage).
Excerpt from the manpage (reformatted, filtered):
The xfce4-session-logout command allows ...
0
votes
ncmpcpp character problem
On a Raspberry Pi, this worked for me to fix the problem: export LC_ALL=en_GB.utf8
0
votes
Is it possible to get a character at terminal cursor using ANSI escape codes?
The DECRQCRA escape sequence allows you to query the checksum of a rectangular area.
The checksum is basically the sum of the character codes there. And if you choose a 1×1 rectangular area then... ...
1
vote
How to interpret \e[H\e[2J ANSI escapes sequence from Linux terminal?
\e[H moves the cursor home (top left corner) and \e[2J clears the screen (the regularly viewed part, but not the scrollback).
In many terminal emulators \e[2J simply clears the regularly viewed part ...
0
votes
Close / kill / hide single Terminal window in bash on 'process complete'
Something more generic for using with Linux and macOS:
#!/bin/bash -e
function kill_self_terminal {
local tk_child_pid=$1
if [[ $tk_child_pid == 1 ]]; then
return 1
fi
local tk_parent_pid=...
0
votes
Accepted
SSH Chroot problems
1.) The /etc/passwd lookup is typically implemented by glibc using an additional library module, typically named something like libnss_files.so.2. That library is not mentioned in ldd outputs, because ...
0
votes
How can I create an exfat partition that can be mounted without root?
There are a couple of points that might help clear this up for you.
First, the exFAT filesystem, unlike other filesystems you're used to, has no provision for storing the metadata that describes ...
1
vote
Weird spaces left on KDE terminals
As @jsotola and @egmont said, it had to do with fonts. However, I found that I had to change it inside konsole: I had to create a profile with a monofont and set it as default.
Kate and dolphin are ...
1
vote
groff -mandoc creating "ESC[1m" versus overstriking with backspace for bold text
You can abuse script and less to convert the backspace sequences:
script --return --quiet -c "printf '.Dd today\n.Sh NAME\n' | groff -mandoc -Tutf8 | less" /dev/null | od -c
…
0000200 1 ...
2
votes
Accepted
groff -mandoc creating "ESC[1m" versus overstriking with backspace for bold text
Debian Bookworm configures groff 1.22 for the old backspace-overwrite behavior you see there, and documents it in their patched grotty manual page along with how to revert to the newer SGR (\e[1m-like)...
Top 50 recent answers are included
Related Tags
terminal × 4272bash × 786
linux × 643
shell × 445
command-line × 313
macos × 245
ubuntu × 226
shell-script × 203
colors × 201
ssh × 200
tty × 169
tmux × 162
zsh × 154
debian × 147
gnome-terminal × 138
terminal-emulator × 130
keyboard-shortcuts × 125
gnu-screen × 114
console × 99
escape-characters × 99
xterm × 94
vim × 91
centos × 79
process × 79
scripting × 74