Skip to main content

Questions tagged [command-line]

This tag is for questions that are about using the command-line interface (CLI), including the use of standard command-line tools and shell commands. However, for questions that are specific to each shell (like Bash, ZSH etc.), use the tag of that particular shell as well.

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

How to fix unresponsive Terminal

My Terminal does Not respond. I can Open it but when I try to type something, it gets ignored. I cant See the letters on the Terminal - They are Not hidden. I tried 2 other Terminals, Same Problem. I ...
Katharina J's user avatar
0 votes
0 answers
16 views

Please help with this issue, I am new to Ubuntu [duplicate]

Media change: please insert the disc labeled 'Ubuntu 22.04.4 LTS Jammy Jellyfish - Release amd64 (20240220)' in the drive '/media/cdrom/' and press [Enter]
A K's user avatar
  • 1
0 votes
0 answers
59 views

Bash not working in TTY/gnome-termina/Xterm

I opened the terminal today and all I could see was this white blinking bar: I opened Xterm and there is the same problem. Also, TTY doesn't work well, I can login and then I cannot type anything. I ...
R3D_H0T's user avatar
1 vote
0 answers
47 views

How to add my own shell script to be able to be autocompleted in terminal by Tab

I have bunch of shell script (.sh) command created in a folder ~/bin, I added this path to .bashrc so I can execute them wherever I like. i.e. a sample command to create git feature branch based off ...
Dreamer's user avatar
  • 111
0 votes
1 answer
279 views

How do I tell `man` to use `batcat` to view man pages?

I would like to use batcat (or bat for short) to view man pages, because batcat will implement syntax highlighting with different colours. I've installed batcat like this: sudo apt install bat I ...
Flimm's user avatar
  • 42.4k
0 votes
1 answer
71 views

Database not saving imported sql file in terminal MySQL

I've imported an sql file to a new database. Everytime I've imported it, these error messages always displays. mysql> source ./DataWarehouse/3/mysqlsampledatabase.sql Query OK, 1 row affected, 1 ...
NuhUh's user avatar
  • 1
0 votes
1 answer
346 views

Not able to update or upgrade after upgrading from Python 3.10.12 to Python 3.11 [duplicate]

I have a complete backup for starters. Second, I was testing an application that required me to upgrade from Python 3.10.12 to Python 3.11, and now Gnome Terminal is not working, and I am unable to ...
mylesmorales's user avatar
0 votes
1 answer
42 views

Custom alias to run and compile .c file [duplicate]

I'm trying to create custom alias to to compile and run my .c files in one command. I tried to add this line in /.bashrc_aliases alias runc='gcc $1 -lm && ./a.out' however I get an error and ...
Jáchym Šmíd's user avatar
2 votes
1 answer
137 views

Special characters 158 and 159 stopping my functions in terminal

I am having issues with the two special characters 158 (U+009E "Private message") and 159 (U+009F "Application program command"). My issue started with a function in Clisp that I ...
BigLiquidCat's user avatar
1 vote
1 answer
430 views

fsleyes segmentation fault (core dumped)

I use FSL's neuroimaging program FSLeyes for my work. Usually, I can start running the program from any directory by simply entering fsleyes into the command line. Today, my cat stood on my computer ...
Sophie Flem's user avatar
0 votes
0 answers
4k views

vmmon and vmnet are not installing in Ubuntu 22.04 LTS (kernel 6.5.0-21-generic)

I am tring to install Vmware Workstation 17 on my device. I installed the .bundle file got from the official website. Installed gcc gcc-11 gcc-12 build-essentials via apt.Then I ran the command sudo ...
Ahanaf Rashid's user avatar
0 votes
0 answers
100 views

How can I run different commands in separate terminals using a shell script?

I have access to an Azure VM where I intend to run three Hyperledger Besu nodes: one boot node and two validator nodes. To automate this setup, I've created a shell script. First, I checked the ...
Shalabh Negi's user avatar
0 votes
1 answer
88 views

Backporting: Does anyone have a function to mimic bash 4 associative array?

I need to make changes in my script that uses associative array, so that the script may be used in older versions (before v4.0) of bash which did not support associative array. Can someone suggest how ...
rusty's user avatar
  • 16.4k
0 votes
1 answer
101 views

Terminal autocompletion not working

This issue is very simple. Open terminal (I'm using GNOME Shell 42.9) Write down . Hit TAB to autocomplete The expected behavior (which has worked before) after following this steps is to have ./. ...
thmasker's user avatar
  • 161
0 votes
1 answer
33 views

dialog box - how stay in the same line after executing a selection?

i am testing some things with a dialog box. when i execute for example a command via 3, and when its finished, it jumps back to position 1. i would like to have it, when i execute someting on 3, that ...
gabberhead's user avatar
2 votes
1 answer
94 views

I need to automatically start a non GUI application through a terminal line because I don't have a GUI

I have a proxmox ubuntu container running ubuntu 23.10 and becuase it is a container it doesn't allow me to use a GUI. I need to run a server application as soon as the container boots up incase it ...
jelacksmith626's user avatar
5 votes
2 answers
522 views

highlighting specific lines in different colors when starting a scipt with printf

I am using a bash script. When I launch my script, how can I highlight specific lines on the output? For example, all lines with "Enable" should be green, all lines with "Disable" ...
gabberhead's user avatar
0 votes
0 answers
70 views

Command line automaticly new line

Sorry if my english is too bad : in Ubuntu when it starts you have lines line 'cloud-init'..I know it's possible to "ignore them" but having Ubuntu creating the line you are using to enter ...
Hab's user avatar
  • 1
3 votes
2 answers
146 views

Ubuntu terminal ignoring interpreter first line

I am Windows user running WSL2 with success over the last two years. I work on a project connected to a git repository. All devs work on mac/linux so all parts of this project are targeted towards ...
Jim Halpert's user avatar
4 votes
2 answers
518 views

How to handle unused loop partition after removing snap/snapd?

While working on an Ubuntu Server for personal use, I removed what would not be necessary for my usage. It is snapd & snap that I would like to properly clean. I removed snap and snapd using the ...
S.PUYGRENIER's user avatar
1 vote
0 answers
171 views

After installing apache2 it gives 403 Forbidden error

I installed the apache2 server on Ubuntu and after success, when I tried to hit the URL to check whether it worked or not it threw 403 Forbidden error instead of showing Apache's default page. I ...
Kashif  Sohail's user avatar
-1 votes
1 answer
89 views

Unable to locate package org.dom4j [duplicate]

I tried to install mulval and error message is appeared package org.dom4j does not exist then I tried to install the package using command sudo apt-get install -y dom4j but another message is appeared ...
eman mahmod's user avatar
1 vote
1 answer
50 views

Why doesn't the given command mask other lines? [duplicate]

Command: sudo find / -name miniedit.py -print | grep -i "miniedit" | tail -1 Output: find: ‘/proc/10031/task/10031/net’: Invalid argument find: ‘/proc/10031/net’: Invalid argument find: ‘/...
kesarling's user avatar
  • 121
0 votes
4 answers
814 views

How to use sed to remove newlines above and below a string?

I'd like to change all occurrences of \ntoken1\n and \ntoken2\n to token1 and token2 in a file). I thought this would do it: ${ N N s/\ntoken1\n/token1/ s/\ntoken2\n/token2/ } but it does not. Thanks ...
John-L_.'s user avatar
3 votes
2 answers
391 views

unable to mount external drive from cron (using udisksctl)

GOAL I'd like to mount an external drive using cron for automatic backups, preferably with udisksctl. PROBLEM udisksctl mount -b /dev/sdXY works fine from the command line or shell script, but when I ...
petermao's user avatar
8 votes
2 answers
1k views

Should I put functions in .bashrc, .bash_aliases or .profile

I have read this thread about where to put aliases. Now, let's suppose that my custom command is quite elaborate (takes arguments in input, is composed of several commands run one after the other, I ...
Tms91's user avatar
  • 425
8 votes
1 answer
2k views

How can I properly make a bash prompt with error colors and emoji?

After solving the first issue with my custom prompt I still have another one left. When I cycle through my last used commands via the arrow-up and arrow-down keys I will sometimes have some characters ...
reneas's user avatar
  • 195
0 votes
2 answers
335 views

Removing spaces between words in a text file using a bash script

I am using a bash script that parses data from a bunch of different text files and generates a .dts file. The .dts file contains spaces between each column title and I need to remove them as it makes ...
Josh Altman's user avatar
0 votes
1 answer
85 views

How to hide command output, then run another command [duplicate]

I have this command which may output an error, so I hide it using &>/dev/null. Now I would like to run this command, then run another command. This is what I have now: ( aaa &>/dev/null )...
Z0q's user avatar
  • 125
0 votes
0 answers
52 views

A question about tinyproxy

I've got a question. when I tried to start tinyproxy's service, a error occured. I didn't know what should I do to fix it.
TZC's user avatar
  • 1
9 votes
3 answers
707 views

tput does not try /dev/tty (?)

In Ubuntu 23.10, echo -e "lines\ncols" | tput -S >/tmp/xx 2>&1 always writes "24\n80" to the file regardless of the terminal size. The man page for tput says it ...
jimav's user avatar
  • 409
8 votes
1 answer
578 views

Systemd: DISPLAY, XAUTHORITY variables are not enough to start Graphical dialogue in Wayland

I use the following in systemd .conf file to run a graphical zenity dialog every time specific device with SMART capability is inserted to the USB port. This works fine in Xubuntu which uses X display ...
rusty's user avatar
  • 16.4k
1 vote
1 answer
204 views

Problem writing udev script to disable onboard network card

I'm trying to disable a faulty onboard network card with the solution suggested in this answer: https://unix.stackexchange.com/a/467085 . But for some reasons, the script/commands are unable to write ...
rusty's user avatar
  • 16.4k
-1 votes
1 answer
107 views

Ubuntu not booting, hanging before terminal is accessible

I had a power outage last night. My pc is running Ubuntu 20.04. It’s on a UPS and I was able to shut down the pc, and when it was shut down, I turned the UPS off. Today the power was restored, and I’...
Daniel Jansen's user avatar
0 votes
0 answers
20 views

Bash script for executing linux commands on remote machines using ssh key [duplicate]

I want to run a script to get details of hardwares and user details from multiple remote machines by login using ssh private key. this is my script #!/bin/bash # Check if the user provided a file if [...
Subash's user avatar
  • 66
1 vote
1 answer
220 views

Cannot run bash script Cisco Anyconnect. "Sorry, you need user privileges to run this script." When executing as root

For work i need to install Cisco Anyconnect and i can't get it to install due to a rights issue. I have everything set up, i think correctly. I'm following this instruction. After step 8 (executing ...
CJDG's user avatar
  • 13
4 votes
3 answers
637 views

Search for a "string" or "String with Spaces" recursively that may be a file- or directory-name or a text inside a file

I would like to search for the string rstudio (and its different possible combinations mentioned below) recursively starting from /. In some locations, rstudio is a string inside another file (but ...
koustav_ch's user avatar
-1 votes
1 answer
127 views

Open terminal from keyboard in 23.10

Previously Ctrl + Alt + T would open a terminal, but in 23.10 this seems to open a search function that closes before you can use it! How do I open a terminal in 23.10 without using a gui at all?
SteveInBavaria's user avatar
1 vote
2 answers
398 views

How to count subfolders containing numbers?

How can I use Terminal to count all direct subfolders in a directory that contain numbers? So it shouldn't be counted recrusively.
D-T's user avatar
  • 487
1 vote
0 answers
28 views

Is there a wmctrl command that terminates the "Always On Top" status of a window? [duplicate]

I just learned that this command below helps you keep a window always on top in Ubuntu 22.04. wmctrl -r :ACTIVE: -b toggle,above However when you run it again, it doesn't terminate the "always on ...
user172244's user avatar
-1 votes
1 answer
2k views

how to open ubuntu on command line . I got it installed in wsl but it won't open when I type Ubuntu. what is the command to get it to open?

how to open ubuntu on command line . I got it installed in win 11 but it won't open when I type Ubuntu. what is the command to get it to open?
peter risley's user avatar
5 votes
1 answer
425 views

sudo with tee displays staircase

Previously I ran without sudo and used tee to display on terminal and log to file: ./my_app | tee path/to/log_file Now I need sudo: sudo ./my_app | tee path/to/log_file However, because of tee when ...
intrigued_66's user avatar
6 votes
2 answers
2k views

Keyboard shortcut for opening the terminal in the current directory?

I would like to have a keyboard shortcut that opens a terminal in the current directory. Here is what I already did: open_terminal_here.sh: #!/bin/zsh gnome-terminal --working-directory="$PWD&...
soroush's user avatar
  • 61
0 votes
1 answer
39 views

CDPATH help documentation—3

man bash says: The variable CDPATH defines the search path for the directory containing DIR. Alternative directory names in CDPATH are separated by a colon (:). A null directory name is the same as ...
Guilherme Woolley's user avatar
4 votes
1 answer
1k views

Unzip to directory of the same name

I am trying to unzip files supplied by Google Takeout and need a command to unzip all zip files in a directory to a directory of the same name as the zip file to avoid conflicts. The zip names cannot ...
Datadimension's user avatar
-1 votes
1 answer
183 views

How do I use CDPATH to cd to Documents no matter which directory I am in?

If the cd shell builtin doesn't see the target directory in the current directory, it consults CDPATH. If the target directory is absolute (begins with the root directory, /), CDPATH is not used. ...
Guilherme Woolley's user avatar
0 votes
0 answers
46 views

gnome-terminal will not load - can access via VSCode

ThinkPad T470s, Ubuntu 22.04.2 LTS, GNOME 42.5 plenty of memory and disk space. Haven't used my thinkpad in a while. Booted it up, installed some updates and can no longer open Terminal. Click on the ...
xfitkitten's user avatar
2 votes
3 answers
638 views

What grep pattern allows to print only one-word lines?

I want to print the lines with only one no-spaces subsequences of characters while use grep on the text. title after grepping should to print title the sentence after grepping should not print ...
palmasd1's user avatar
1 vote
1 answer
138 views

Using etc/security/time.conf for groups

how could I set for group "spedytorzy" logon hours 7-15 from Monday to Friday? Actually I have *;*;@spedytorzy;Wk0700-1500 and added to /etc/pam.d/sshd file ,,account required pam_exec.so&...
czehu102's user avatar
0 votes
1 answer
128 views

sed mongodb connection string copying multiple times in env variable through github action

this is command which i run in github action its copying into .env.production file sed -i "s#DB_URI=.*$#DB_URI=mongodb+srv://xxxxxx:[email protected]....
DevOPs's user avatar
  • 11

1
3 4
5
6 7
459