Questions tagged as ['command-line']

Questions about using the command-line interface (CLI).
Score: 0
screak avatar
Failed to start session and nmcli has no output
bd flag

The problem here is that there is no Internet I was gonna try to install ubuntu-desktop if nmcli was working

nmcli dev wifi list has no output


iwlist wlp3s0 scan

wlp3s0 no scan results


nmcli device wifi connect "ssid" password "password here"

Error: no network with ssid "ssid"found

I try to

sudo systemctl start wpa_supplicant.service

Failed to start wpa_supplicant.service unit wpa_supplicant.ser ...

Score: 0
using cp to print a text file
br flag

I have 2 printers (both are "Generic Text-Only Printer")

  1. The first one is connected directly to my laptop through a USB. This printer corresponds to a device /dev/usb/lp0. For this one I can print a file just by using either cp or lp

$ cp textfile /dev/usb/lp0


$ lp -d "printer-name" textfile

  1. The second one is a network printer with an URI "socket://" Currently, I can only prin ...
Score: 1
Filipe Rodrigues avatar
Terminal error information right before sleep
za flag

I run Xubuntu 20.04 and I'd like to know how to gather that terminal data that appears before the splash when turning on the computer, and especially the terminal data that shows up for like 125 milliseconds before the computer enters sleep mode. It always shows up some kind of warning but I can't read anything in time and I really don't want to ignore possible problems with my setup. Thanks in advance! ...

Score: 0
"No Such device" when trying to download any torrent on deluge inside docker container
us flag

I have a debian ssh media server based on this article, that has a complete setup of docker containers, that include Radarr, Sonarr and Plex. All the downloads are made through deluge, which was working fine until a few days ago, when torrents were no longer being downloaded. Every torrent started instantly goes into an "Error" mode. When I check the status on the bottom, it reads: Status: No such device ...

Score: 1
bash: `set +m` option does not work when placed in the .bashrc file
it flag

If I enter the command:

set +m

at the end of the .bashrc file, when I run the command:

echo $-

the option m is missing as it should be, but...

If I enter the command:

{ sync & } 2> /dev/null

and then I press enter again without entering any commands, although I removed the m option, the output still appears:

[1]+  Done                    sync

and only when I rerun the command from the  ...

Score: -3
Jacob Simon avatar
Crontab won't run Shell Script
in flag

Im trying to run a shell script with cron every day at 2am

Cron: 0 2 * * * /home/pi/TTD/


/bin/sleep 3

File location: /home/pi/TTD

./TwoToneDetect71d is an application

I've tried running it under sudo crontab -e and crontab -e with no luck

Score: 0
bash: set command: enable the options by overwriting the previous ones
it flag

Pretending that the output of $- is this:


If I add options with the set command:

set -B

the output of $- becomes this:


but I would like it to become this:


So that it overwrites the previous options.

Score: -6
VPN DL issue-Surfshark
jo flag

I have to go the long route commands to try get this vpn running..well my issue is when Ubuntu prompts for my system PW it DOES NOT recognize it in command line. Many attempts failed. Yes the pw is valid I constantly have to use it to get in my machine. Can someone help me please?

Score: 0
Alacritty Color Schemes Not Working
in flag

Color Change for Alacritty Terminal not working. Usually it works by just changing a configuration file and saving.

enter image description here

This started occurring after I used this command:

LS_COLORS=$LS_COLORS:'di=0;35:' ; export LS_COLORS

Which I got from this thread here when I was attempting to change the color of my directories and folders

I have tried deleting and recreating the alacritty.yml file, but it does n ...

Score: 0
Andreea Silvia avatar
Display files that have additional rights for group and others that the user does not have
cn flag

I have a problem to solve for a university class I am taking. I need a command that lists files in a directory that have a group or others permission that is set, but it is not set for the owner (such files could have security problems if someone other than the owner has more rights on a file).

How can I do that and display the result as the file name followed by the additional right that appeare ...

Score: 0
Sahil Thummar avatar
How to create a new file / an empty file using command or shortcut or without command?
cm flag

How to create a new file / an empty file using command or shortcut or without command?

Like To create new Folder,

shortcut: Ctrl + Shift + N
Right click and create New Folder
Score: 0
Vishwa Mittar avatar
Tilix shortcuts problem
eg flag

Tilix has a shortcut "Ctrl+Alt+T" to open the terminal in Nautilius (In the currently opened directory), but ubuntu has the default same shortcut "Ctrl+Alt+T" to open the terminal from anywhere i.e Browser. Now the default shortcut always opens Tilix in the home directory, even if any directory is opened in Nautilius, simply the default shortcut is overriding the "Tilix Shortcut". How can I set the same ...

Score: 1
Par4o avatar
Find files from timestamps
kr flag

I have a lot of files, of which I need to show only those created in the last 3 hours, and sort this list by date. I tried to do it with the following command:

find /root/shell/copy/ \( -type f -mmin +180 \) | get_crtime | xargs ls -t | head -1

get_crtime is a function created for .bashrc as shown in this example to find out the date of creation for a file.

How can I use the command correctly?

enter image description here

Score: 1
The command could not be located because '/bin:/usr/bin' is not included in the PATH
my flag

I was trying to get the finger command to work on Ubuntu as I was learning Linux. Several hours later, Ubuntu does not start properly any more.

When I start Ubuntu, I get lines and lines of:

Command 'uname' is available in the following places
 * /bin/uname
 * /usr/bin/uname
The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable.
uname: command not fo ...
Score: 0
zeroclaim avatar
"syntax off" in vimrc not working; other settings work as expected
li flag

I'm trying to turn syntax highlighting off by default in vim in Ubuntu 21.10. I can toggle set number and imap just fine in my vimrc, but syntax highlighting is on by default for some reason, and syntax off does absolutely nothing. I've tried commenting out every other line in the vimrc that might be interfering, to no effect. Is there a different command I should be using, or is another file somewhere m ...

Score: 1
A J avatar
Different CMAKEs, unable to remove one of them
cn flag

I have two cmake commands, one has a path /usr/local/bin/cmake, which I would like to uninstall. I tried running apt remove cmake but it gives Package 'cmake' is not installed, so not removed. The other one (which I installed using pip) is located in a virtual environment. However, I would like to keep this one.

Score: 1
Pete avatar
Why might Java code run fine manually, but not from a Shell Script?
no flag

Hi have a frustrating problem: On my Ubuntu 22.04 machine, I have some Java/Maven code which I can run manually from the command line:

me@UbuntuV2:~/home/me/path/to/Java/Code$ mvn test
[INFO] Scanning for projects...
[INFO] -------------------< >--------------------
...code runs fine...

This is great, but I need to run this same code fr ...

Score: 0
Dex avatar
How to create a script which runs on startup only by the first boot?
cn flag

I need a solutions for creating a configuration script which should be executed only by the first boot of the machine. I want to configure new network interfaces through the script with parameters which are inputed by the user. There are various ways to do that. My guess was systemd.

I tried to write a systemd script like this:

Decription=Network Configuration Service

Exe ...
Score: 0
How can I diff two files, deleting lines in file1 from file2
jp flag

I want to take file1 and remove all the lines that are contained in file2, ideally keeping the filename file1 once done, keeping the unmodified lines of anything remaining.

I've tried using diff as follows

diff --suppress-common-lines file1 file2 > newfile

This gives me either and output < or > at the start of each line depending on the order of the two files, which I don't want.

Also tried u ...

Score: 0
game lover avatar
command w and who shows 0 users are logged in
cl flag

Currently I am using Ubuntu 20.04.3 LTS Problem which I am having now is that who and w commands who 0 users are logged in system.

mypc:~$ who
mypc:~$ w
 22:14:10 up 12 min,  0 users,  load average: 0.52, 0.58, 0.59
 USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT

enter image description here

I am logged in the system, but why are these commands showing that 0 users are logged in currently?

Score: -5
Amir Ibrahim avatar
How do i replace all the contents from a file using a text
in flag

I basically created a file text in Linux under the name of Linuxchallenge.txt which has content inside the file of:

<3 Archer Quotes

Do you want ants? because that's how you get ants!

Nope nope nope nope nope nope nope... you don't want to do that.

Do you think this is a game?
No, I think Jenga is a game.

Lana. Lana? Lana! LANAAAAAA!
....Danger zone

However i want to change all the text ...

Score: 0
Metadata failed setting attribute
dz flag

When I run command gedit for any purpose for example gedit it shows a warning or message that set documents metadata failed setting attribute metadata. Please provide me a solution on this in an easy understanding language.

Score: 0
BurstBass BurstBass avatar
Read logs real time with bash
be flag

I have this in the system logs:

Feb 27 02:53:51 Latitude-E6430 rsyslogd: action up   7
Feb 27 02:53:51 Latitude-E6430 rsyslogd: action down B
Feb 27 02:53:51 Latitude-E6430 rsyslogd: action up   U

I want to make a script that is monitoring the logs full time as a service, but I don't know how to do the condition.

1 - That when you read, line by line, store it in a variable.

2 - read variable ...

Score: 1
donna_unsworthcomcastnet avatar
How can I remove a string from every line of a file in the second column of a file
bt flag

The file structure is like this:


The result that I am looking for is this:

Score: 0
How to download files from text file
co flag

I have multiple text files such as a0001.txt, a0002.txt...upto a0900.txt containing direct image links

I want to batch download all links from a0001.txt to a0001 folder and so on in respective folder names as text file.

Links must be download in order so Images renamed with prefix. For sorting purposes.

What I tried was below. But it downloading one file at a ...

Score: -4
Command definition syntax
us flag

What is the name and where I can find info about syntax that defines commands:

cmake [{-D <var>=<value>}...] -P <cmake-script-file> [-- <unparsed-options>...]

What does [] , {} and ... means in this definition. I have feeling, that [] means optinal, but this means that -P should persist always?

Score: 0
Shiddhartha Ramprakash avatar
Installation of mpicxx
mx flag

I have mpich installed in my Ubuntu OS. But mpicxx in /usr/bin got deleted. It would be of great help if someone can help me re-install it.

Thanking you in advance!

Score: -1
DIFFERENT PROCCESS EVERY TIME Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend
tr flag

I'm having this error

Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 332998

Now, if i do

sudo kill 332998

I will get the same problem but with a different process number.

I already tried some of the answers with the same name "Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend." but nothing works.


sudo rm /var/lib/dpkg/lock-fron ...
Score: 0
user48951 avatar
Install package libvirt-dev?
cn flag

I want to install the package libvirt-dev but it depends on a specific version of libvirt0, how can I switch back to version 6.0.0-0ubuntu8.14?

~> sudo apt -y install libvirt-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the ...
Score: 1
Tim Holmes avatar
Appearance of Terminal and Nautilus in RDC
ve flag

Hi Folks: When I first set up my ubuntu system, and was using the local screen, keyboard and mouse, the terminal window and nautilus both had really good looking themes on them. The machine is intended to run headless over the local area network and is accessed via RDC -- for some reason, the themes have vanished when I connect via RDC and the current ones are really ugly -- anyone know how I can fix  ...