Questions tagged as ['command-line']
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
And
iwlist wlp3s0 scan
wlp3s0 no scan results
And
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 ...

I have 2 printers (both are "Generic Text-Only Printer")
- 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
or
$ lp -d "printer-name" textfile
- The second one is a network printer with an URI "socket://192.168.0.123" Currently, I can only prin ...
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! ...

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 ...

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 ...
Im trying to run a shell script with cron every day at 2am
Cron: 0 2 * * * /home/pi/TTD/startTTD.sh
File:
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/pi/TTD
/bin/sleep 3
./TwoToneDetect71d
File location: /home/pi/TTD
./TwoToneDetect71d
is an application
I've tried running it under sudo crontab -e
and crontab -e
with no luck

Pretending that the output of $-
is this:
hims
If I add options with the set
command:
set -B
the output of $-
becomes this:
himBs
but I would like it to become this:
iBs
So that it overwrites the previous options.

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?

Color Change for Alacritty Terminal not working. Usually it works by just changing a configuration file and saving.
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 ...
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 ...
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
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 ...
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?
...
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 ...
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 ...
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.
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$
me@UbuntuV2:~/home/me/path/to/Java/Code$ mvn test
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< MyCode.java >--------------------
...code runs fine...
This is great, but I need to run this same code fr ...
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:
[Unit]
Decription=Network Configuration Service
[Service]
Type=simple
Exe ...

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 ...
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
I am logged in the system, but why are these commands showing that 0 users are logged in currently?
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!
What?
....Danger zone
However i want to change all the text ...

When I run command gedit for any purpose for example gedit Mac.sh 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.
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
....etc
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 ...
The file structure is like this:
34945,/data/file/system01/data/system/backups/filename.txt
393092,/data/file/system-03stby/data/system/backups/filename.extra.txt
The result that I am looking for is this:
34945,/data/system/backups/filename.txt
393092,/data/system/backups/filename.extra.txt

I have multiple text files such as a0001.txt, a0002.txt...upto a0900.txt containing direct image links https://example.com/photos/example.jpg
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 ...

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?
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!

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.
like:
sudo rm /var/lib/dpkg/lock-fron ...
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 ...
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 ...