Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
30 views

SSH from A through B to C, using private key on B

Schematic: ssh ssh A ------> B ------> C ^ ^ using A's using B's ssh key ssh key Preconditions: A is running ssh-agent A can access B B can access C A can't ...
J.Nexus's user avatar
  • 11
1 vote
0 answers
77 views

How could I have VScode on Windows 10 with the default terminal changed to WSL2 Ubuntu-24.04 like a native linux distro?

I'm trying to have inside VScode for Windows 10 (Microsoft Windows [versão 10.0.19045.4474]) options to change the terminal from default to another one such WSL2 Ubuntu 24.04. I have installed ...
Marlon's user avatar
  • 379
1 vote
0 answers
75 views

how to install memcached via pecl?

I'm trying to install memcached and am having some difficulty. Here's what I tried: apt-get update apt-get install memcached libmemcached-dev libzip-dev pecl install memcached pecl install memcached ...
neubert's user avatar
  • 7,204
0 votes
1 answer
24 views

changing the directory a tarball decompresses to

When I do wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz and then tar xvzf install-tl-unx.tar.gz the files get extracted (right now) to install-tl-20240521. On the CLI it's ...
neubert's user avatar
  • 7,204
0 votes
0 answers
24 views

How can I execute a command whenever I change the PowerDevil power profile?

I have a laptop with a variable refresh rate (up to 120Hz) monitor. I want to change the refresh rate to 60 whenever I switch the power profile to "Power Save" in Powerdevil, and change it ...
StrongSand94191's user avatar
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
0 answers
92 views

ls in Docker on Windows not showing one directory

I'm running Windows Server 2016 Datacenter version 1607 (build 14393.6614) with Docker Desktop Community Version 2.0.0.3 (31259). I'm running an Ubuntu docker container in an interactive mode with my ...
user1543037's user avatar
0 votes
1 answer
77 views

anacron doesnt work as expected

Trying to schedule a job to run every day with cron or anacron. Search the forum for resolution but still without any success. Changing shell=/bin/bash or bin/sh didnt do anything. My system lubuntu ...
Surepic 342's user avatar
0 votes
1 answer
161 views

Activate a conda/mamba environment when cd to a specific directory

Can I automatically activate a specific environment when cd into a directory? Like if I cd into the directory my_nn_library then automatically run mamba activate nn_env. I am using Ubuntu.
Osman Mamun's user avatar
0 votes
1 answer
444 views

docker login fails when done in .bashrc

At the end of my .bashrc file I have the following: docker login -u AWS -p $(aws --region us-east-2 ecr get-login-password) 636602586062.dkr.ecr.us-east-2.amazonaws.com However, whenever I open up a ...
neubert's user avatar
  • 7,204
0 votes
1 answer
251 views

google-chrome, when ran in the background through bash, still outputs errors, despite 2>&1 > /dev/null

When I run google-chrome 2>&1 > /dev/null & and then go back to the prompt and then visit a website with, say, an invalid cert, I still get errors output to my console's screen. eg. ...
neubert's user avatar
  • 7,204
0 votes
0 answers
22 views

How to output disk size in GB only with no rounding error? [duplicate]

Output disk size in GB only. Giga Bytes only. Not MB. Not Mega Bytes. Not TB. Not Tera Bytes. Tested thus far: sudo blockdev --getsize64 /dev/sda 1000204886016 sudo blockdev --getsize64 /dev/sda |...
joseph22's user avatar
  • 367
0 votes
1 answer
124 views

How to output disk size in GB only with no rounding error?

Output disk size in GB only. Giga Bytes only. Not MB. Not Mega Bytes. Not TB. Not Tera Bytes. Tested thus far: sudo blockdev --getsize64 /dev/sda 1000204886016 sudo blockdev --getsize64 /dev/sda |...
joseph22's user avatar
  • 367
0 votes
1 answer
65 views

sudo for just one command IN lost+found folder, not more

I have this script # check lost+found folders function chklnf { #DOC echo "chklnf - list any files in lost+found folders on mounted devices" x="lost+found/" if [ "$EUID" != 0 ] ;then ...
Hannu's user avatar
  • 9,469
1 vote
2 answers
1k views

Running shell Script via Crontab

So I've tried to run a shell script via crontab. My Crontabs look like this: 00 20 * * * $HOME/Bilder/Hintergründe/.background_skript/background_night.sh and my background_day.sh looks like this: `#!/...
Sebastian Illi's user avatar
0 votes
1 answer
2k views

How to modify Linux ISO (like Ubuntu) and add my custom bash to it

I googled and I see something like Cubic but I don't think it fits my problem. What I want to do is (suppose the talking .iso file is an Ubuntu): During the installation, it does this: > echo I'm ...
Saeed's user avatar
  • 423
0 votes
1 answer
77 views

How to move files containing NULL to a separate folder?

I have over 10000 files in a folder. I was using an Rscript to preprocess the files. It displayed an error: Error in read.table(wd, comment.char ="#", header=T, sep='\t'): empty beginning ...
svp's user avatar
  • 103
1 vote
2 answers
2k views

Bind command not found in Linux Mint/Ubuntu terminal

I need to use this "bind" command described in articles like: https://www.computerhope.com/unix/bash/bind.htm https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html#Bash-...
Russo's user avatar
  • 199
-1 votes
1 answer
1k views

making it so alias's work in shell scripts?

So I don't have python available as a command on my system but I do have python3. So I did alias python=python3 and I was able to then do python test.py insead of just python3 test.py. I then created ...
neubert's user avatar
  • 7,204
0 votes
0 answers
238 views

error installing php dependencies on ubuntu

I have a vps with linux ubuntu 20.04 LTS installed, I also installed the lamp stack to upload my web projects, php with version 7.4, now I need to install some more php libraries for example: php-gd ...
FeRcHo's user avatar
  • 109
0 votes
1 answer
102 views

Ubuntu - Deleted service still working

I created an .sh file for my remote laptop that would play an alarm file through ffplay and send me a telegram message whenever the power plug got disconnected. The file worked great when I ran it in ...
qwerty's user avatar
  • 11
0 votes
1 answer
687 views

Change the color of the Intel NUC 11 Power LED from a running process

On an Intel NUC (model Intel NUC11TNHi7), Ubuntu 20 LTS is installed. I want to be able to use a process (such as a bash script, python, library, etc.) to control the button LED such as from systemd ...
kyrlon's user avatar
  • 107
0 votes
0 answers
146 views

Default path for RScript terminal command changes with sudo

I am trying to execute Rscripts from the terminal, but I can only get them to work by adding the sudocommand. Running --verbose, I have been able to narrow down the problem to a difference in the ...
HarD's user avatar
  • 101
0 votes
1 answer
961 views

How do I find the computer name who connected to ssh

I have an ubuntu20 server and a bash script located in /etc/profile.d sends a message to telegram if anyone connect using ssh. The purpose of this script is to find out if there is a hack and to take ...
ibraheem mohsen's user avatar
0 votes
0 answers
247 views

ffmpeg auto ended process with output error

How do you make ffmpeg stop during processing if strange words appear which make the live stream error automatically stop? For example, during the process I often get output like this: Non-Monotonous ...
Joe Cola's user avatar
  • 101
1 vote
1 answer
199 views

Bug of Bash?? When setting of `$HISTIGNORE` ends with `SP`+`*` or `SP`+`?*`

When setting of $HISTIGNORE ending with SP+* or SP+?*, lists of files in current folder will be concated to it's value. No matter extglob is set or unset. NG Example, (current folder has only one file ...
Jack Ting's user avatar
  • 113
0 votes
1 answer
149 views

Bash shortcuts do not work in Konsole on Kubuntu

I switched from Ubuntu to Kubuntu recently and I noticed that terminal behavior is weird. For example, Alt+backspace bash shortcut does not work as expected. It is supposed to remove from the ...
altern's user avatar
  • 493
0 votes
0 answers
47 views

Show number of files in subdirectories

In my working directory, I have a number of subfolders: SNPsplit_HS_10k_thrs3 SNPsplit_HS_1k_thrs3 SNPsplit_HS_5k_thrs3 SNPsplit_slidingwindow_1000_thrs3 SNPsplit_slidingwindow_100_thrs3 ...
Whitehot's user avatar
  • 133
1 vote
0 answers
143 views

Bash installer script appears to not accept EOF input and instead gets stuck

I already posted this issue on stackoverflow and was politely redirected to this website. I hope this time, I'm at the right place :D I wanted to automatize my Mint installation. One major part of my ...
133U's user avatar
  • 11
1 vote
1 answer
9 views

Put string with space as argument to script running as another user

I created bash script to excuted wp cli as another user, but has problem put string with space. My Bash Script: user=$1 domain=$2 post_title='post title example' post_content='post content example' ...
ahmat arnal's user avatar
0 votes
0 answers
472 views

How to start gnome display manager from root shell in ubuntu?

How do I start the display manager (Gnome) from a bash shell on a Ubuntu system? More specifically, the shell obtained from modified the grub boot commands. It would be nice to use a desktop ...
Wesley Jones's user avatar
1 vote
2 answers
623 views

How to have bash aliases usable from any directory?

As title sais I want to be able to use bash aliases from inside directories other than home. If file structure looks something like /home/Documents, do I have to create another .bash_aliases folder ...
frend123123's user avatar
0 votes
2 answers
985 views

Does htop have a bug in the display of process status and memory consumption?

When running a few processes, I noticed that htop showed certain process as consuming CPU, but yet were marked S in the State column (the S column)...which meant that the processes were sleeping or ...
Nav's user avatar
  • 1,089
0 votes
1 answer
40 views

How can I watch a windows folder from my Ubuntu VM know which file has changed?

I need to know which files have been updated in a Windows folder from my Ubuntu VM. I have a symlink of the folder I want to watch. What I found that is the closest to my needs is this python program ...
PineApple34's user avatar
0 votes
1 answer
3k views

How can I create a symbolic link of a file in another directory with relative path?

THE PROBLEM I'm developping an ai training app. The app uses docker and some folders are shared (mounted). Absolute paths inside and outside docker differ, and I need to create symlinks that work on ...
J Pablo F's user avatar
0 votes
0 answers
186 views

Execute a bash script with a shortcut on Ubuntu

I've a problem, I'm trying to execute a script whith shortcut on Ubuntu but it doesn't work: enter image description here enter image description here Can you help me please ?
Luku's user avatar
  • 1
0 votes
1 answer
43 views

git-prompt + TMOUT

I recently found bash TMOUT, which for me works fine for normal sessions, but in combination with git-prompt the timeout does not seem to be respected -- the shell stays open indefinitely. I tried ...
ciis0's user avatar
  • 131
13 votes
4 answers
8k views

How can I check if the environment is WSL from a shell script?

In .bashrc, I have some configuration for specific environments like this. if [ "$(uname)" = 'Linux' ]; then . "$HOME/.bash.d/ubuntu" fi if [ "$(uname)" = 'Darwin' ]; ...
ironsand's user avatar
  • 2,329
0 votes
1 answer
70 views

Cron Disrupting VBoxManage Commands

I am on Ubuntu 20.04 desktop, running Virtualbox 6.1 and I use Webmin to run a very simple cron job to take daily snapshots of my virtualbox test server as follows: VBoxManage snapshot VminServer ...
mjones's user avatar
  • 317
0 votes
1 answer
243 views

Unable to move cursor to next line after reading secret input in shell script

I am trying to read multiple inputs from user in shell script, #!/bin/bash read -sp "Enter the secret api key: " var1 read -p "Enter the mount path:" var2 If I try to run this, I ...
Ganesh Shinde's user avatar
0 votes
0 answers
145 views

I have not captured a screenshot using the service

I am using a shell script and I want to run the script automatically when the system is ON/Restart without opening any application. Here is my script.sh file: while sleep 5 do scrot 'myimage.png' -e '...
chirag tomar's user avatar
1 vote
0 answers
919 views

Where is /usr/local/bin on windows

For context, i installed apktools software by moving file to C:\Windows and run the software from command prompt. I use windows 10 (also enabled windows subsystem for linux) and just installed ubuntu ...
LLL's user avatar
  • 111
0 votes
1 answer
102 views

Git Push Successful, No Actual Files in Targeted Directories

I have a test and prod server, both running Ubuntu 20.04 with virtuamin 7 control panel, LAMP and git. Problem: My current git push configs seem correct. I get no errors at all... but at last, the ...
mjones's user avatar
  • 317
0 votes
1 answer
352 views

Running shell script as system service

I'm running shell script as system service but then it isn't working like it works running normally input="/home/sipl/inf" while read -r line do sudo iptables -t nat -i $line -A PREROUTING ...
roXx's user avatar
  • 11
0 votes
1 answer
184 views

shell script getopts options validations

I'm trying to check if all the validations are true and work but my logic I think is not correct and I'm new to coding. So I initialized p=0 and un=0, when user passes both option it should give error....
brucelee's user avatar
0 votes
1 answer
338 views

terminal git status helper listed in .bashrc and .bash_profile not loading unless you source .bash_profile

I have the following neat helper, that I found online, that displays my current git branch at all times if I am in a git repo: parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -...
codyc4321's user avatar
  • 410
1 vote
1 answer
130 views

I need to copy only symlinks from within multiple subfolders under a parent folder to another folder maintaining relative path information in symlinks

I use Ubuntu 20.04 and i have a lot of files under multiple subfolders under a parent folder. I need to copy only symlinks from within these subfolders to another folder maintaining the source folder ...
Ajith John's user avatar
0 votes
1 answer
357 views

Can I delete directories in /var without verified signatures (NO_PUBKEY Error) in Ubuntu 20.04?

When I execute sudo apt-get update command I get the following terminal output: Get:1 file:/var/cuda-repo-ubuntu2004-11-3-local InRelease Ign:1 file:/var/cuda-repo-ubuntu2004-11-3-local InRelease ...
Luis Vls's user avatar
0 votes
0 answers
4k views

Could not resolve host: on WSL ubuntu after trying to install anything

I am trying to set up nvim but this is a general problem with anything I attempt to install. As an example root@DESKTOP-NAME:~# git clone --depth 1 https://github.com/wbthomason/packer.nvim\ ~/.loc&...
Hydrolox's user avatar
1 vote
1 answer
58 views

How to add environment variables to "mdkir -p" bash command?

Lets say I have an environment variable var="html,xhtml". I want to create a directory with subfolders, like so: mkdir -p Website/{static/{cs,js},templates/{html,xhtml}} How can I replace {...
Snow's user avatar
  • 229

1
2 3 4 5
15