Questions tagged [shell]
A shell is software that lets users interact with the operating system, usually by typing at a command-line.
4,054
questions
0
votes
0
answers
21
views
How to start an Android app in a resizable window with the freeform intent flag? [closed]
I want to know how to start any app (and Discreet Launcher, an Android home screen launcher, to view my favourites) in a resizable window (freeform activity).
I have MacroDroid, thinking of using an ...
0
votes
0
answers
19
views
Source command in Mingw32 and Python [closed]
I need to use the command : source/c/msys/1.0/auto/07p/cmds/auto/env.sh in Mingw32 or in Python but the answer was: no such file or directory ? . I'm sure that the file is located in correct path.
any ...
0
votes
2
answers
28
views
An incorrect path is displayed in my custom command line prompt in bash
I would like to display the current and parent directories in my Linux command prompt. For example, if the current directory is /home/user/proj/src, I'd like the prompt to display proj/src.
I found ...
0
votes
1
answer
41
views
tar on Windows does not handle paths with special characters
On a Windows 10 command line, creating a tar archive with "special" characters (e.g. extended latin) in the path of the archive itself results in errors.
To be slightly more exact, a quick ...
0
votes
0
answers
26
views
Can I show multiple tmux sessions in one pane?
I have 5 node js scripts running, each in their own tmux session. I saw something completely unrelated a few days ago where someone was using tmux and they had like 6 different shells open on the same ...
0
votes
1
answer
37
views
no-ignore-case in grep command
In man page of grep --no-ignore-case matching control has the following description:
Do not ignore case distinctions in patterns and input data. This is the default. This option is useful for ...
0
votes
0
answers
24
views
How does Zotero find the information used to rename PDFs, and how can one incorporate this functionality into a shell script?
The bibliography management software Zotero can automatically rename manuscript PDFs in a AUTHOR - YEAR - TITLE.pdf format. Per this question, Zotero doesn't support batch-renaming all PDFs in a ...
1
vote
1
answer
71
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/...
0
votes
0
answers
123
views
How can fzf's command history search always be shown, automatically and without CTRL-R?
With fzf you can press CTRL-R to have a command history search box shown below the prompt and fuzzy search. I want it shown automatically for each new prompt, without having to press CTRL-R.
1
vote
0
answers
18
views
Pathname or word too long in Cshell
I am using cshell. And I know that there is a limit of 1024 character while setting path. But I have many path variables which I need to set. So, it is exceeding 1024 characters and I am getting an ...
0
votes
0
answers
23
views
How can I complete individual command line phrases / do partial completion with fzf?
With fzf I can press CTRL-R to search my command history but it completes the whole command. What I'd like is to just complete the current argument, the next phrase before the next space. Can this be ...
1
vote
0
answers
12
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
>&...
1
vote
1
answer
88
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 ...
1
vote
0
answers
57
views
WSL run a non-login shell even with `--shell-type login`
Previously running wsl sourced .profile for me, as expected:
As of build 16188 when running bash.exe without arguments (or with the ~ argument) bash will be launched as a login shell. The same is ...
0
votes
0
answers
42
views
Run custom shell script through udev
I'm trying to make an udev rule that'll play sound upon connecting the charger. The rule seems to work fine except I can not get the shell script to run. This is my udev rule:
$cat 01-mru-battery-...
1
vote
1
answer
60
views
What does it mean to "run something in a shell profile"
I'm installing Homebrew and I get a message that says:
Next steps:
⁃ To add Homebrew to your PATH run brew shellenv in your shell profile (e.g. ~/.bash_profile or ~/.zprofile)"
What does it ...
2
votes
0
answers
34
views
Setting GitHub Actions Secrets on Docker container build/run command, but encountering a parsing issue
I'm in the early stages of building an automated pipeline. Still in the exploring phase. Right now, I'm struggling with setting the environment variables for the container I'm going to run my app.
The ...
0
votes
1
answer
53
views
How to make bash script output compatible with both terminal and file?
In bash, if I want to produce periodical status messages, I can replace the previous one by emitting a hotkey combination, e.g. as seen here, here or here. When a user executes the script directly, ...
0
votes
0
answers
66
views
Cannot activate Python virtual environment from within shell script (zsh)
I cannot activate a Python virtual environment from within a shell script (zsh).
I have tried the following:
#!/bin/zsh
conda create -n myenv python=3.10
conda activate myenv
It sends me the error ...
0
votes
1
answer
55
views
Script to install Anaconda and update conda
I want to write a shell script (zsh) that does the following:
Installs Anaconda via Homebrew.
Adds conda to PATH in .zshrc.
Updates conda base environment.
I have come up with the following solution:...
1
vote
0
answers
38
views
Grub script how to remove menuentries
I made a grub script to detect bootable disks and show them on grub menu. It is working but I want to put a rescan button and to make that first I need to remove old menuentries. How can I do?
My ...
2
votes
2
answers
509
views
Is it possible to replace the Windows shell with Steam to launch to Big Picture faster, and have Explorer.exe load after Steam launches automatically?
I have a Steam Deck which I dual-booted to Windows. I'm trying to accomplish a facsimile to "game mode" on Steam OS.
I want to boot to big picture automatically/extremely quickly so it ...
0
votes
1
answer
31
views
Loop of screens with a loop inside does not pick variable values
How can we execute a loop of screens, each of them executing a loop so that it picks both inner and outer variables?
Consider this:
# does not print i
for i in 1 2; do
screen -dmS screen-${i} ...
0
votes
0
answers
64
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/...
0
votes
2
answers
102
views
lvm: lvresize --resizefs does not read the request size in correctly
I am trying to resize a logical volume (as well as the filesystem contained on that volume) and am a little confused by the output of the lvresize command:
# lvresize --resizefs -L 2T /dev/archive/...
2
votes
0
answers
77
views
Program is not interactive in NuShell
Some background
Qemu has a wonderful feature, which allows you to connect its stdio streams to serial ports on the guest. This allows you to connect QEMU's stdio streams to a TTY shell on the guest ...
0
votes
0
answers
102
views
How to change the default shell for a vsphere.local user on a VMware VCSA server?
How to change the default shell for a vsphere.local user on a VMware VCSA 8 server (Photon OS/Linux 3.0) ?
I tried the chsh command but it does not work for a vsphere.local user :
PS C:\> ssh ...
0
votes
0
answers
14
views
gnu screen title cannot be configured
I use shelltitle command in the .screenrc, but no matter what I set it, the new windows created are always having a default title, in the form of shell prompt, user@hostname:cwd, what is wrong with ...
2
votes
1
answer
59
views
How does symlink from shutdown to systemctl work?
which shutdown
returns
/usr/bin/shutdown
I also tried sudo which shutdown just in case...but got the same result.
I can see that
lrwxrwxrwx 1 root root 9 Dec 13 03:38 /usr/bin/shutdown -> ...
1
vote
1
answer
116
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. ...
0
votes
0
answers
23
views
Trying to use Applescript variable in curl command inside do shell script for phone calls
i have no clue at all but i'm quite desperated... i try to use the follow apple skript establishing a call on my snom desktop phone. when i put the link directly in the browser it works fine. but ...
1
vote
1
answer
143
views
Keyboard layout wrong on Arch Linux emergency mode
If on Arch Linux emergency mode:
systemd.unit=emergency.target
I change US keyboard layout to Spanish:
# loadkeys es
special characters fail.
For example: if I type "ñ" shell shows "A±...
0
votes
0
answers
120
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 ...
0
votes
1
answer
293
views
Play single mp3 through specific Pipewire device via shell command
I'm trying to figure out a way to play a single mp3 file through a specific Pipewire output device via a shell command.
Only this one file should be played through that device. I don't want to change ...
1
vote
1
answer
93
views
!$ not automatic in Kali Linux
Does anybody know how to change the behaviour of !$ in Kali Linux ? Right now, if I reference last argument using !$ I must enter the new command with the last argument instead of executing a new ...
0
votes
1
answer
129
views
Is there a shell command that opens multiple images in one instance of the microsoft photos app?
I'm on Windows 11 and let's say I have a folder that contains a few JPEG images. If I navigate to that folder, highlight the images and hit 'enter' it opens all the images in one window of the ...
2
votes
1
answer
904
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 ...
0
votes
0
answers
170
views
Custom Shortcut Icons Not Showing (Blank Page), Using UNC Path for an SMB Share
On my Server have a custom Icon (ICO) that I created that is in the directory of a .NET / C# Application that I want to share, right along side the EXE for the Application, which has an Icon (ICO) ...
0
votes
0
answers
91
views
While invoking bash without options -c or -s the first argument is a filename, how to execute it sourced? [duplicate]
While invoking bash without options -c or -s the first argument is a filename (see manpage bash).
In such a case bash executes that file and exits.
I just need this feature, yet that file has to be ...
0
votes
1
answer
21
views
Issue reading certificate from file in Ubuntu
I need to pass the certificate as a parameter in a request.
I have exported the certificate through Chrome.
Now I am trying to read it.
I tried the following after looking through a few blogs:
...
0
votes
1
answer
87
views
linux + why command output cant be filter or can saved in file
clockdiff is command that measure clock difference between hosts
here is example from my Linux machine.
clockdiff -o 162.23.2.2
.
host=server11 rtt=750(187)ms/0ms delta=0ms/0ms Tue Oct 24 11:01:42 ...
0
votes
0
answers
202
views
~/.oh-my-zsh/oh-my-zsh.sh:17: parse error near `done'
I am keeping to have this error:
~/.oh-my-zsh/oh-my-zsh.sh:17: parse error near `done'
when I source ~/.zshrc...
This is the file ~/.oh-my-zsh/oh-my-zsh.sh
# ANSI formatting function (\033[<code&...
0
votes
1
answer
92
views
Difference between './file' and 'sh file'
On macOS, in the zsh terminal, I ran the following commands:
cd /tmp
mkdir newdir
cd newdir
touch file1
./file1
The last command returned
zsh: permission denied: ./file1
But running
sh file1
executed ...
1
vote
1
answer
1k
views
HKEY_CLASSES_ROOT\Directory\shell\open\command but per user
I use a third party file manager instead of Windows explorer and set it by adding the key [HKEY_CLASSES_ROOT\Directory\shell\open\command] to the registry and it works like a charm.
But now I need to ...
0
votes
0
answers
1k
views
How to solve exec format error while running container in ECS?
Previously the question was related to https://stackoverflow.com/questions/77266768/yarn-command-not-found-after-successful-docker-build. It was fixed but my problem is related to using shell /bin/sh.
...
0
votes
0
answers
29
views
Windows 10 Explorer: can't distinguish if a file is selected or not on mouse hover
On Windows 10 Pro 22H2, I noticed that:
mouse hover over a Deskotp item, it will be displayed with a light grey rectangular border
click on the item, the item color / border stays exactly the same, ...
0
votes
1
answer
855
views
Where to set env var for Debian12?
There are too many places can hold permanent env var settings in Linux, so that I can't finger out which one is the most correct/proper.
/etc/environments
/etc/bash.bashrc
/etc/profile
/etc/profile.d/...
1
vote
1
answer
111
views
On Linux, how can one diff directories, excluding files by name, but including directories of the same name?
Consider the following dir/file structure (all leaf nodes are regular files, not that it really matters):
$ tree
.
├── cool_1
│ ├── dumb
│ │ ├── file1
│ │ └── file2
│ └── foo
│ └── ...
1
vote
1
answer
383
views
How do I change the background color for folders in PowerShell when invoking the "ls" command from WSL Interop?
I've installed the WslInterop module and exposed several commands from WSL2.
I'm using Import-WslCommand "apt", "cat", "awk", "nano", "find", "...
0
votes
1
answer
180
views
How to nicely print time difference in bash?
In my bash script, I want to print the time that my set of commands took to execute.
I'm doing this:
#!/bin/bash
start=$(date +%s)
./my-long-command.sh
./another-longcommand.sh
echo "Completed, ...