Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [terminal]

A terminal is an environment for text input/output. Inside the terminal, one runs command-line and text mode programs (including shells).

0
votes
2answers
40 views

Owner of the file not being displayed properly in LINUX Terminal

I want the terminal to display the user name that created a particular file, so when I traverse all the way to that file and type in the command ls -l filename.docx or even ls -la /path/to/file, it ...
0
votes
0answers
26 views

Determining the max RGB value (white) on a xterm-like terminal

One way to determine if a terminal is predominately dark or light is to get the value if its background color, and compare that with the grey color. However in order to do this you need to know what ...
0
votes
1answer
21 views

how to update path of commands?

i want to update the path for the conda command, which was first installed in /root/anaconda3/bin/conda but i deleted the directory and reinstalled to home/me/anaconda3/bin/conda . but whenever i ...
1
vote
1answer
17 views

parallel with quote in command

my original input in linux terminal is bcftools filter -e 'TYPE="snp"' input1.vcf -O v -o output1.filter.vcf bcftools filter -e 'TYPE="snp"' input2.vcf -O v -o output2.filter.vcf bcftools filter ...
0
votes
1answer
46 views

How can I run a new terminal with bash, but with a custom bashrc?

I open a new terminal with bash as follows. gnome-terminal -x bash gnome-terminal -e bash gnome-terminal -- bash Somewhere I read that to use a custom BASH RC file, you have to run: bash --login &...
0
votes
0answers
29 views

stuck on background can only move mouse and go virtual terminals

I installed Pop OS 18.04 LTS on my laptop (note: using external monitor since laptop's screen has failed) from a CD. Everything worked, then after a restart, now I'm stuck on the background. Right ...
0
votes
0answers
37 views

bash shell modes? how to pipe request to shell on remote server

I have this tcp server in Node.js that will open a shell and pipe the request to the shell: const net = require('net'); const cp = require('child_process'); const server = net.createServer(s => { ...
0
votes
1answer
65 views

How can I open terminal and run command automatically?

I'm in the terminal emulator. I want to open another terminal to run a specified command. gnome-terminal -e "zsh -c 'pwd; zsh;'" That runs pwd and zsh consecutively and successfully in another ...
0
votes
0answers
18 views

PuTTY (or other terminal) with output buffering for slow connection

I'm looking for terminal that can buffer output (keystrokes) before sending them. I need this, because I have some devices on very slow and not reliable connections (ping 400-600ms, 20% packet loss) ...
5
votes
0answers
21 views

How was the blinking terminal cursor invented? [migrated]

I was just staring at my blinking terminal cursor: And was wondering where it comes from. Does anybody have some piece of history about the blinking cursor? I couldn't find much online. E.g.: when/...
0
votes
1answer
18 views

Exit alternate screen after crashed ssh-tmux session

After I get disconnected from my tmux session over ssh (I have to use the ssh ~. command to exit), the mouse start displaying control characters like 80;31M65;80;31M65; when I click or turn the wheel. ...
1
vote
1answer
21 views

read -s gives error via script

I am trying to read a password from user, i used -s silent flag but read -s is not working from the script but it works if i do it manually from terminal. error details project.sh: 3: read: Illegal ...
1
vote
0answers
18 views

Can I configure pass to always use pinentry-curses?

I use pinentry-qt most of the time, but in the specific case that I'm using pass, I would like to use pinentry-curses because of the faster startup time. Is there a way that I can configure pass to ...
0
votes
1answer
17 views

Installing package with service account

I need to install a software called nominatim on ubuntu. Following the install instruction, I created a service account user with a specified home directory at /srv/nominatim. I know service account ...
0
votes
1answer
20 views

Why can't echo and printf output variables that have only whitespace characters? [duplicate]

var1=$(printf "\n\x0A\n") var2=$(printf "\na\nb\nc") Using Android Terminal, the output of echo -e "$var1" (same for echo and printf) iss nothing, not even the 3 new lines. But echo -e "$var2" or ...
-1
votes
1answer
29 views

Error EOF Syntax Error

-bash: /Users/tj/.bash_profile: line 17: syntax error: unexpected end of file This is currently at the top of my terminal window. I need to fix this error. I have deleted the last line out of my bash ...
-1
votes
2answers
26 views

Renaming files with numbers

I have files: file1 file2 file3 ... How to rename them to file501 file502 file503 ....
0
votes
0answers
24 views

Is there any terminal tool where you can zoom in and out the screen?

So I know there's zooming tool in universal access menu in Ubuntu, but currently I can't find how to operate it through command line, plus it can't zoom out. My second attempt is use xrandr --output ...
1
vote
1answer
72 views

Script for sending commands via ssh and not wait till and leave the terminal

I have sevaral computers, combined into network with Ethernet switch. All are running Fedora server and have connection to Internet. What I need is a script, which: Connects to all nodes from list ...
0
votes
1answer
25 views

sh: d2j-dex2jar.sh: No such file or directory

I'm trying to use dex2jar to extract a .jar file from my .apk. I have downloaded this version: https://github.com/pxb1988/dex2jar And followed the instuctions: sh d2j-dex2jar.sh -f ~/path/to/...
0
votes
1answer
38 views

How to “echo” colored messages without “-e” option nor intermediate variable?

I really struggle understanding the behavior of echo (and others such commands) while processing ANSI escape codes to print colored messages. I know I can use the -e option like this: echo -e "\e[...
0
votes
1answer
42 views

Can I make characters uncopyable in a terminal emulator?

I run fish (in gnome-terminal) with a custom style that gives me information about the current Git repository: That's all very fine, but when I want to copy-paste some command with its output like so:...
0
votes
1answer
25 views

Setting Colors in ~/.bashrc [CentOS 7]

I'm trying to set colors within my .bashrc. I would like my background to be black, bash prompt text to be white and input text to be lime green. I have this so far: export PS1="[\e[1;37;40m[\u@\W]\$ ...
1
vote
1answer
23 views

Readline: using tab as menu-complete, how do I “accept” the auto-completed directory and display the next level down?

I'm using the following settings on my readline (~/.inputrc): set show-all-if-ambiguous on set menu-complete-display-prefix on set completion-ignore-case on "\t": menu-complete "\e[Z": menu-complete-...
0
votes
0answers
8 views

Bundler issues upon terminal startup

Whenever I start my terminal, it gives me this output right from the get-go: Traceback (most recent call last): 2: from /usr/local/bin/fusuma:23:in `<main>' 1: from /usr/lib/ruby/2.5.0/...
9
votes
1answer
2k views

Unknowingly ran an infinite loop in terminal

I copied the below code from some random source to my terminal and ran: while sleep 1; do tput sc; tput cup 0 $(($(tput cols)-29)); date; tput rc; done & The code is to show a running ...
0
votes
1answer
46 views

Does the wc command strip the trailing line feed from txt files?

I'm currently building a replica of the wc command line call (in C). I have a file [tst.txt] and the C code to read that file. The wc tst.txt command responds with the output: 2 6 20 tst....
0
votes
0answers
21 views

Emacs launched from command line and standalone Emacs have different syntax highlighting when using the same theme (solarized)

I have set export TERM=xterm-256color, however when I launch Emacs in terminal vs. the standalone app the syntax highlighting has different colors. What do I need to do to make them the same?
9
votes
1answer
567 views

How does a program know if stdout is connected to a terminal or a pipe?

I'm having trouble debugging a segfaulting program because the ouput right before the segfault is what I need, but this is lost if I'm piping the output to a file. According to this answer: https://...
5
votes
1answer
426 views

How important is it that $TERM is correct?

I recently switched from rxvt-unicode to st. This means I went from $TERM=rxvt-unicode-256color to $TERM=st-256color. I'm happy with the switch and want to continue to use st. However, I've noticed ...
-2
votes
0answers
25 views

What is the difference between ./ and . for running an executable? [duplicate]

For example if I have a example.sh file and I want to run it in terminal, I can use both ./example.sh and .example.sh Is there any differences between them? Which one is more convenient?
1
vote
1answer
49 views

make zsh run a command when no command is entered

Imagine I am typing at my terminal prompt, but actually decide not to type anything. Instead I just press enter. Is there a way I can make zsh run a command now? I want to potentially make this ...
0
votes
0answers
24 views

How can I move the cursor in terminal without mouse scrolling? [duplicate]

We all know that scrolling the mouse can view the buffers up and down in a terminal. But when there is no mouse only keyboard how to make it ? Even selecting the buffers? e.g. in iterm2,Xshell,...
1
vote
0answers
25 views

How to capture all std outputs [duplicate]

Suppose I have a program called mktemp which creates a random tmp directory in /tmp and also produces a string output of the directory address Input[0]: mktemp Output[0]: /tmp/tmp.MkrKAscwwk How can ...
0
votes
2answers
52 views

adding contents with multiple files using awk, sed or grep

I have to files named file 1 and filed 2 following format: file 1 with 18000 lines COL1 COL2 COL3 COL4 COL5 - . ID = tom_fa_10005086 - 0 Parent = tom_fa_10005086 - 0 Parent = ...
3
votes
3answers
72 views

How do I open the current directory in a new tab?

My environment Terminal.app 2.9.4 on macOS zsh 5.7.1 When I used bash, Terminal could open current directory in a new tab, but it have not been able to do that since I changed to zsh. In the app ...
0
votes
0answers
30 views

Diagnostics for Linux terminal settings

I was recently confronted with a terminal emulator in an SSH client where Home key would not work by default in Bash. After hours of investigation and reading about the major hairball that is the ...
-1
votes
0answers
16 views

Terminal extension to open links from output using keyboard only

Background I remember watching a video a while back where the user ran some command that produced, among other things, some hyperlinks in the output. Now, my terminal handles this quite well in that ...
2
votes
3answers
147 views

Getting out of while loop on console

I ran a command: while true ; do ..... ....... ; done on the Linux console/terminal, and now this while loop is continuously running. I have two questions here: How to get out of this while loop? ...
0
votes
2answers
44 views

Using printf with escape sequences?

I can change my cursor shape like this: printf "\x1b[\x31 q" # block :) printf "\x1b[\x35 q" # ibeam :) But when I assign that to a variable with %s and expand using printf, it doesn't work: CURSOR=...
3
votes
1answer
58 views

Neomutt - Can't display Swedish characters

I have an issue regarding neomutt not displaying the Swedish characters å, ä and ö. When typing locale in the terminal I get: LANG=sv_SE.UTF-8 LC_CTYPE=sv_SE.UTF-8 LC_NUMERIC=sv_SE.UTF-8 LC_TIME=...
-1
votes
3answers
81 views

How to get the file's name and content in the terminal, for all files in a directory

Assume I have unknown number of files in a directory. I want to get the contents inside each file along with the file-name as in below example. file1 "content in file one" file2 "content in file ...
0
votes
2answers
25 views

How to page up and down in the Ctrl + Alt + F3 virtual terminal window? [duplicate]

I'm using Ubuntu 18.04 LTS. Every now and then, I like to escape the noise of windows by pressing Ctrl + Alt + F3 where I login using to one of the ready to use terminal windows. If I cat a file and ...
1
vote
1answer
26 views

Multiple input for grep

Is it possible to use more than one input on Unix grep? Here is what I'm trying to do: pip freeze list all installed python packages, but unfortunately also list it's dependencies cat requirements/...
0
votes
1answer
54 views

Emacs with 24bit terminal support on FreeBSD

I'm trying to enable 24bit support on the terminal (via SSH) on my FreeBSD 12 installation without success. I tried to create a terminfo file with the contents: xterm-24bit|xterm with 24-bit direct ...
1
vote
1answer
98 views

“Forcing” a kernel panic from the terminal on Linux

I'm using Solus 4.0 (in a VM) and trying to make screenshots of "typical" kernel panic output ("BSOD"). The init system in Solus is systemd. I tried the following commands in the terminal without ...
0
votes
0answers
19 views

How to use both ssh and sshfs through VPN with single connection?

I am used to mount remote filesystem by sshfs to edit code and view files and also login via ssh to run the code and any commands. Now I have to connect to the network via VPN before I can ssh/fs ...
0
votes
1answer
105 views

$EDITOR environment variable won't set

Whenever I attempt to set the EDITOR environment variable, a subsequent check reveals no value has been set. I was attempting to edit the crontab: sudo crontab -e -u mycooluser which returns: no ...
0
votes
1answer
9 views

remote mysql login using username / password not working when adding password to command line

I am running the following command to connect to a remove mysql server (it is part of a bash script that will connect automatically) mysql -h slave1 -u monitor -pvP!KnK4* And I receive the following ...
0
votes
2answers
105 views

Disable mouse scrolling through terminal command history on Mac terminal

Recently I started using tmux inside my terminal on my Mac. However now whenever I'm in a tmux session and I scroll up or down using my mouse, it scrolls through my command history instead of ...