Questions tagged [bash]
Bash (Bourne-Again SHell), is the default interactive user shell used in Ubuntu. Use this tag for questions specific to Bash, as opposed to generic POSIX shells.
11,392 questions
Score of 7
1 answer
536 views
List of possibilities from `apt install` is sorted randomly on Ubuntu 26.04
When I type apt install postgresql and press TAB twice, I see a list of possible packages. In Ubuntu 24.04, this list was sorted alphabetically, but now it seems to be sorted randomly.
Is there a way ...
Score of 5
2 answers
392 views
How to set a variable from a multiline file in GitHub
This is more a bash scripting question. I'm trying to set a variable from a multiline file in GitHub.
cat config.yaml | gh variable set TEST --org .... --body -
...but this sets the value as '-'
It's ...
Score of 1
1 answer
72 views
Restoring OS packages
I made a list on the bash with all the packages installed on Ubuntu.
Trying to restore them to another computer also with Ubuntu, I receive an error message saying that they are not on database.
With ...
Score of 4
1 answer
333 views
KDE installed alongside Ubuntu-Mate, script will open by double click, not the expected behaviour
Betriebssystem: Kubuntu 24.04
KDE-Plasma-Version: 5.27.12
KDE-Frameworks-Version: 5.115.0
Qt-Version: 5.15.13
Kernel-Version: 6.8.0-111-generic (64-bit)
Grafik-Plattform: Wayland
Prozessoren: 8 × AMD ...
Score of -2
1 answer
155 views
how to recover from these commands?
I followed the instructions in another thread to fix something, but since it didn't work, I'd like to go back and restore the original configuration.
So, as the title says, how can I restore and go ...
Score of 2
1 answer
86 views
How can I run a command using only the P or E or LPE cores on my Intel laptop?
I want to run a command and have it only run on either the P or E cores in my Intel laptops. I know about taskset but it only accepts core numbers and I want to specify ALL of the P-Core CPUs / E-Core ...
Score of 0
1 answer
52 views
writing alias command to bash file via echo
This command works as I might expect:
alias pgmstat='lsof -p $(pgrep -d'\'','\'' 2>/dev/null) 2>/dev/null'
However, when I wrap it in double quotes, precede it with echo, and send it to a ...
Score of 0
0 answers
35 views
Affect shell sessions globally in bash
I wrote a small bash script to handle conda initialization outside .bashrc, then aliased it in .bashrc
alias startconda='source /home/ade/.adebin/conda_init.sh'
conda_init.sh:
#!/bin/bash
if [ x&...
Score of 5
2 answers
546 views
Find all jpgs in a directory and convert to pdf
The name of the directory within dir will change so I tried using find.
First time using bash so I couldn't seem to wrap my head around piping just yet. The best I came up with was:
var="$(find ...
Score of 0
0 answers
36 views
Ubuntu Server WiFi (USB adapter) does not reliably recover after router restart — network becomes unstable despite cron watchdogs and autoconnect
System Details
OS: Ubuntu Server 22.04
Kernel: 5.15.0-173-generic
Architecture: x86_64
Setup: Headless server (accessed via SSH / Tailscale)
Network: WiFi using a USB WiFi adapter (Realtek ...
Score of 1
0 answers
66 views
How to pass multiple rsync source directories as bash array elements [closed]
I have a bash script that's attempting to sync multiple sources to a single destination. The idea is to sync the contents of my home folder along with the entire /etc/ssh directory. The script ...
Score of 5
1 answer
231 views
Dialog file selector for specific types of files
I'm making a bash script using the dialog package to launch the various Windows programs via Wine, so I don't have to go around hunting for these files. In this launcher I also want to add an option ...
Score of -3
1 answer
104 views
Bash script doesn't execute when using sh
I set my bash script called pass.sh globally by adding its source path into $PATH in my ./bashrc.
The problem is I can't execute using the sh only using the bash command when I'm in a different ...
Score of 1
0 answers
193 views
Accidentally corrupted /bin/bash
I wanted to add a program to the /bin directory with sudo mv said-program /bin, but I accidentally wrote sudo mv said-program /bin/bash due to shebang inertia.
As you can imagine, this broke the ...
Score of 0
1 answer
65 views
question for custom command in lxqt session
Im running lxqt session in noble. For checking the charging my PS5 controller
I made a custom command that shows me if bat of PS5 controlleris full through upower.
[customcommand]
alignment=Right
...