Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
81 views

How to disable row highlighting on iterm and oh-my-zsh?

I just setup the new Macbook today and start to have the weird highlighting with the blue frame on the row when i use my mouse to select a particular row on the terminal. The other row will be faded a ...
Thai Tran's user avatar
  • 131
0 votes
1 answer
112 views

ls -ltr on the terminal lists the files but says "No such file or directory" in a shell script

I am new to Bash and am practicing some shell scripts. I wanted to write a script to list all the folders and their file count, if a root path is passed as a parameter value from the terminal. The ...
MNIA's user avatar
  • 1
0 votes
1 answer
129 views

Linux Bash Wait Command Not Working

I am trying to use and bash file .sh to start other bash files in seperate terminals. I want them to run one after the other as I use them to copy large numbers of files to the same Hard Drive. ...
Dave's user avatar
  • 1
1 vote
1 answer
161 views

How do I create a pty without a shell?

Backstory: I have a CLI Python application. I want to be able to debug it without interfering with the CLI of the main application. The Python debugger allows you to specify an alternative stdin/...
FrederikVds's user avatar
1 vote
0 answers
25 views

Copy interactive command outputs from Terminal to MacOS clipboard programmatically

Developing this answer, which offers a way to copy a given line from standard output to MacOS clipboard – I wonder if there's a way to do the same for interactive commands? For example: ~ bc -l >&...
Dmitrii Kuznetsov's user avatar
1 vote
1 answer
325 views

Default shell zsh but responding bin/bash

I have no idea what I did! I was installing maven and one of the guides had me do something and now I'm stuck in default zsh. I've tried changing my terminal preferences to be /bin/bash, as well as my ...
beepbeepboop's user avatar
0 votes
0 answers
68 views

Unsure what happening with my terminal but I'm getting a weird response

Whenever I run a python file, (vs code) or even open my terminal on mac I get a warning saying. /Users/ABC/.zshrc:1: command not found: “alias /Users/ABC/.zshrc:2: command not found: “alias /Users/ABC/...
Angus_U22's user avatar
1 vote
1 answer
243 views

Why is this tmux option not persisting?

I would like to generate a bashrc configuration file each time I start a particular tmux session, and I want to use my user's default tmux configuration file ${XDG_CONFIG_HOME}/tmux/tmux.conf as well. ...
ardnew's user avatar
  • 260
0 votes
0 answers
160 views

How to run sh script in lxterminal using double click on Raspbian

I've read so many threads regarding running a script using double click, but none of the ways describes my case. My operating system is Raspbian Bookworm (Debian), the graphical shell is LXDE and the ...
Michal's user avatar
  • 11
2 votes
1 answer
2k views

"set editing-mode vi" vs "set -o vi" What is the difference?

On multiple forums I have come across adding set -o vi to my .bashrc file. Today I saw the option of adding set editing-mode vi to .inputrc. I googled and both appear to do the same thing. Are there ...
Ishaan Kapoor's user avatar
1 vote
0 answers
89 views

Shell programs do not refresh the screen correctly

When I press PageUp or PageDown in ranger or cmus, the screen doesn't refresh correctly, some characters and even lines are not updated. I believe it started with macos upgrade from 13.4.5 to 13.5.1 ...
Bellavene's user avatar
0 votes
1 answer
141 views

ls ignoring extensions when colorizing with LS_COLORS

I'm trying to set LS_COLORS to colorize my ls output, but for some reason it is ignoring any file match patterns. It is correctly coloring executables, directories, etc., but it seems to be ...
mrjake2's user avatar
  • 121
0 votes
0 answers
102 views

How do Linux terminal programs set up the environment for the shell program

I am writing a terminal emulator in Rust. The source is here. It forks itself and the child process (eventually) becomes the shell program which it reads output from and passes input to. On macOS, ...
deeBo's user avatar
  • 143
16 votes
1 answer
4k views

“Terminal is not fully functional” warning with `less` but not with `more` (which is also `less`)

less complains about my value of $TERM, whereas more doesn’t. Which would be fine except for the fact that more is less. Originally I was puzzled by tools suddenly disliking my $TERM value (I thought ...
Anton Strogonoff's user avatar
2 votes
0 answers
376 views

Clear previous command output (not full screen)

Example This is on the terminal screen: user@host ~ % ls dir1 dir2 dir3 user@host ~ % whoami user user@host ~ % date Wed May 24 16:25:26 -03 2023 user@host ~ % [CURSOR IS HERE] I'm trying to ...
ranemirusG's user avatar
0 votes
2 answers
511 views

Are linux commands (grep, awk etc) part of the system, or the shell?

I'm a developer, so I know my way around a terminal, but I never really dove into it. I can write bash scripts (albeit on a beginner level, not my area of expertise), but I now need to understand ...
romand's user avatar
  • 3
0 votes
1 answer
396 views

Checking my understanding regarding the difference between Terminal and Shell

I am trying to test my understanding regarding the difference between terminal and shell. The terminal is just a text-based interface in which it accepts commands from the user. Moreover, the terminal ...
John adams's user avatar
1 vote
0 answers
101 views

.bash_logout not executing on MX Linux

As stated in title no joy from .bash_logout when I exit the terminal (same result when logging in on a virtual i.e. Ctrl + Alt + F1). I've tried everything listed here: Explain why .bash_logout won&#...
Jimi Cash's user avatar
0 votes
1 answer
45 views

VREPRINT doesn't seem to have any effect

According to the GNU docs, there is a character VREPRINT, or rprnt, which is supposed to re-print the shell's line-editor's input buffer. This can be helpful if something like a background process has ...
Andy Carlson's user avatar
3 votes
0 answers
1k views

Tips on how to speed up ZSH shell start up time

can someone help me understand why my Zsh start up is so slow. My Zsh takes up to six 6 seconds to start up so I added zmodload zsh/zprof and zprof to my .zshrc to see what takes the most time. The ...
miiguell's user avatar
1 vote
3 answers
980 views

Open terminal to execute command and then terminate if successful

I want to open a terminal and have it accept to execute one command and then terminate (so that the terminal closes). Optionally, this should only happen if the previous command was successful to ...
Mahoni's user avatar
  • 209
1 vote
1 answer
216 views

How can I fix a bunch of declare commands being spammed when I start a bash session? [duplicate]

Whenever I open a bash terminal, regardless of terminal client my output is spammed with a bunch of declare -x messages listing off various environment variables. Here's an example: declare -x ...
thereal_pika's user avatar
0 votes
1 answer
771 views

How to redirect terminal output with the formatting and color in Mac (Ventura)?

I am running huge volumes of tests and the output is displayed on terminal, I would however like it to be stored to be be read, searched for further use. Is there a wat to have it redirect with color. ...
Amey Varhade's user avatar
0 votes
0 answers
443 views

zsh does not start as login shell

Running Debian I have set zsh as my login shell in /etc/passwd and zsh is among the permitted shells. $ cat /etc/shells # /etc/shells: valid login shells /bin/sh /bin/bash /usr/bin/bash /bin/rbash /...
RREE's user avatar
  • 1
1 vote
2 answers
320 views

Works from terminal prompt. How to get bash script working?

using: Ubuntu 20.04.4 LTS (Focal Fossa) GNU bash, version 5.1.16(1) and script --version script from util-linux 2.34 These commands are working from a terminal prompt: script /home/x/Desktop/clamlog2....
joseph22's user avatar
  • 367
2 votes
0 answers
895 views

How to select the current line inside ubuntu terminal with hotkeys and copy it inside main clipboard

How can i select the whole line in ubuntu terminal only with hotkeys? CTRL+U works, but puts it inside a buffer. How can i copy that buffer into the main clipboard? Or how can i select/highlight the ...
Trofin's user avatar
  • 63
0 votes
1 answer
4k views

Terminal returning error "bash: /usr/bin/(command) /bin/bash: bad interpreter: No such file or directory" unless command is preceded with bash

When I look up this particular error on the web, every single one of them are in regards to shell scripts. I keep getting this error in the terminal itself and my home server is completely unusable ...
TrotskyDotsky's user avatar
1 vote
1 answer
249 views

zsh alias for running the most recent matching history item

I'd like to create an alias in zsh that runs my last terminal command beginning with node. I can run that command with !?node, but I can't create an alias with alias N='!?node'. How can I make this ...
Raffi's user avatar
  • 163
-1 votes
1 answer
587 views

How do I launch the fish shell in WSL through Cmder?

Setting it as the default shell in Ubuntu WSL results in the PATH not working properly, as described in the docs. So I want to avoid that issue by launching it through the terminal.
alicode1111's user avatar
3 votes
1 answer
1k views

I deleted fish shell and now VS Code terminal doesn't work

I have been working on a tutorial in Angular. Everything was working fine before I went to work today. I came back to my home computer after work today and the fish shell I was using within VS code ...
Michael's user avatar
  • 61
3 votes
2 answers
4k views

How to use zsh in flatpak vscode

I have Visual Studio Code installed in flatpak, I run it with: flatpak run --command=sh com.visualstudio.code I want to change the shell to zsh, but I can't find how to, I tried multiple thing in my ...
Hamza Ince's user avatar
1 vote
1 answer
4k views

What is the shell exactly when using Cmder on Windows?

I've just started using Cmder on Windows 7 and I understand that is a console emulator for Windows which gives a better experience than using cmd. However as I understand it the emulator needs to run ...
user20010's user avatar
2 votes
1 answer
669 views

Tmux Copy Mode: Show Current Line As Ascending Value From Top of Buffer

In this image I'm in tmux copy mode and at the very bottom of scroll the buffer. The line indicator on the top right shows 0/31827. How can I show the current line number as a value that ascends from ...
usr30742's user avatar
2 votes
0 answers
2k views

Can't change default login shell on OSX Monterey

I prefer to use bash on my Mac, but the version provided by Apple (GNU bash, version 3.2.57(1)) cannot glob files with accented characters, so using homebrew, I have installed a later version, 5.1.16, ...
SJC's user avatar
  • 21
0 votes
0 answers
518 views

using awk with single quote in a shell script will output error [duplicate]

we are on Debian 11. I'd like to use grep and awk to retrieve information from the content of a single file, like the following: file: /home/user/directory/otherdirectory/data.txt file content: $db['...
iodurocarburo's user avatar
0 votes
0 answers
394 views

Windows+IntelliJ IDEA 2021.3.1+Git for Windows v2.34.1: Git bash shell in Idea terminal, skip to next/previous word not working ( Ctrl + ← | Ctrl+ → )

I installed git for windows and linked bash shell in IntelliJ but I'm missing one shortcut which saves me a lot of time is a direct move to the next/previous word in the command line. how can I make ...
Rajat Verma's user avatar
2 votes
2 answers
3k views

How can I delete the content of a folder but not the folder itself?

Let say I have a folder on my Desktop, inside this folder are files and other folders which they are so many and large and may take some sec to delete all of them, I want get notified when my delete ...
ios coder's user avatar
  • 169
0 votes
1 answer
40 views

How to get the proper output?

I am working with an algorithm that produces outputs like these: ... 2 3 0 & :instance & :|V| & :|A| & :T & :model & :rootLP & :maxFlowCuts & :maxFlowCutsTime & :...
Matheus Diógenes Andrade's user avatar
0 votes
0 answers
173 views

Set Linux terminal foreground color prior to login

I'm wanting to set the foreground color of a Linux terminal (outside of any GUI). I'm using Gallium with its multi-user target, which opens straight to the terminal rather than the GUI. I've tried a ...
user2340724's user avatar
  • 1,181
1 vote
2 answers
657 views

Treat terminal like an emacs buffer

I'm on Ubuntu and I use either GNOME Terminal or Terminator. I'd like to be less reliant on the mouse/touchpad. Say that I have the output of ls in the terminal and I want to copy out part of the ...
dbrane's user avatar
  • 194
0 votes
1 answer
1k views

Bash on MacOS doesn't seem to store history?

So I'm trying to teach myself Unix and I changed my MacOS terminal shell from the default zsh to bash, because the Coursera courses that I studied use Bash scripting and so does the First Semester in ...
jxhyc's user avatar
  • 563
0 votes
0 answers
201 views

can't use my terminal after trying to update bash Mac OS

I was following a tutorial on how to update my bash version and everything was fine until I had to add /usr/local/bin/bash into /etc/shells. after I added it I had to run this command sudo chsh -s /...
Bingus's user avatar
  • 1
-1 votes
1 answer
412 views

Can I delete all the files in zsh-autosuggestions installing it?

I am using zsh as the default shell for my Ubuntu 20.04 Desktop LTS terminal. I am using zsh-autosuggestions, which is from https://github.com/zsh-users/zsh-autosuggestions. I cloned the repository ...
Sarvesh M.D's user avatar
1 vote
1 answer
363 views

Shell appending unknown integer to hostname in prompt (zsh) on mac

I recently customized the prompt in my terminal to be more like the one from parrot os, which I really like. I have read over the documentation many times on how to use the markers/variables in the ...
Digital Brent's user avatar
1 vote
2 answers
997 views

FFMPEG: Hard subs and trim?

I'm currently using the following command to trim videos, AND include the subtitles: ffmpeg -ss 0:23:10.5 -to 0:24:40 -i "in.mkv" -vf "subtitles=in.mkv" -c:v libx264 -c:a aac "...
lolc's user avatar
  • 68
1 vote
1 answer
477 views

MacOS - How to use terminal with 'set -o emacs'?

I like to do a lot of work in a shell and I usually setup the shell to use emacs keybindings. On linux, it's just a quick 'set -o emacs' and I'm good to go. However, on MacOS, the solution eludes ...
Kurt's user avatar
  • 111
0 votes
0 answers
50 views

How to paste from Windows into Ubuntu 20 shell in the cpanel of my website?

I am in the cPanel of my website and the hosting allows me to access the shell (Ubuntu 20). I cannot use simply CTRL+SHIFT+V to paste lines from Windows, Quick Edit Mode isn't active nor can I paste ...
Andrea D_'s user avatar
  • 101
1 vote
0 answers
499 views

How can I use a serial connection as an output for a shell?

I have a serial device (/dev/ttyACM0), which is connected to the serial port of a microcontroller. The microcontroller draws text that it gets on that serial connection to a screen. I want to use that ...
Jacob Garby's user avatar
0 votes
0 answers
387 views

Launch Multiple Instances of Shell scripts in Parallel

I have a parent folder which contains a script mytestcase.sh Parent_folder/mytestcase.sh I would like to launch 5 terminal instances to run mytestcase.sh from 5 different terminals at the same time ...
ramuloramula's user avatar
0 votes
0 answers
3k views

Bad file descriptor error on MacOS Big Sur terminal

I have just tried to install algs4 on MacOS Big Sur. However, it failed and after the installation process, my terminal keeps sending error messages every time I launch it: /Users/user/.zshrc:source:...
Elizabeth 's user avatar

1
2 3 4 5 6