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.
22,812
questions
1
vote
3
answers
6k
views
Running Bash Script as root with non root script section
I have a bash script that needs to run as root to accomplish a task in this case it is to make the validator take a snapshot of the Helium blockchain.
I have edited the /etc/sudoers file to allow me ...
1
vote
0
answers
1k
views
When I edit .bashrc in Ubuntu 20.04, it does not ask me to save anymore
I'm not sure what happened but when I
sudo nano ~/.bashrc to add a couple of exports
#spotify
export SPOTIFY_CLIENT_ID='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
export SPOTIFY_CLIENT_SECRET='...
0
votes
1
answer
993
views
Open vscode from script in ubuntu
I am trying to create script to open VSCode in the current directory but I am not abe to do it for folder consist of spaces.
For example if location is 'home/documents/code'. it is able to open ...
-1
votes
2
answers
136
views
In windows from the cmd prompt you type Win and it got you back to the GUI, what's the equivalent in Ubuntu
Good evening, i am used to windows, but would like to know how to get from Ubuntu command line to launching Ubuntu GUI. What command would i use. In windows, WIN did the trick, what is it in Ubuntu ...
0
votes
1
answer
401
views
How do I get terminal programs to have a black background instead of a solarized black one?
I have my Terminal color scheme set to White on Black. However, whenever I use console programs such as aptitude or minicom, the black background takes on a solarized appearance. I abhor the solarized ...
0
votes
2
answers
158
views
Internet file transfer command
I am doing research and need to transfer a file between home and office via the Internet. It is easy to do that with some software such as AnyDesk. Since I want to do file transfer by a bash file in ...
0
votes
1
answer
5k
views
Resize blocks of linux filesystem
I use UbuntuServer on an Dedicated Server in Version 21.04 and just resized my HDD in the HyperViser.
But now I can't change the blocksize of the sda2 (my Linux Filesystem).
I tried few diffrent ...
-2
votes
1
answer
294
views
remove certain files except others
I found so many suggestions as to how to remove files with exceptions. However, this case is a little different.
Let's say, I have 6 files as follows in my Ubuntu 18.04:
text_1.json
text_2.json
...
0
votes
0
answers
45
views
Find specific numbers of capitalized words next to each other
Let's say I have a .txt file:
Aaa
Aaa Bbb
Aaa Bbb Ccc
I want to find the row that has one capitalized word, two capitalized words, and three capitalized words. So one grep to find Aaa, one grep to ...
0
votes
2
answers
422
views
I can't move the curser with the up and down and side to side keys in Terminal
I must be missing something here. I have worked with terminal before.
I am trying to change "true" to false and the arrow keys are not moving the cursor to do this.
Please help me .
Thanks....
2
votes
1
answer
6k
views
How to change the default directory that WSL Ubuntu terminal (on Windows 10) opens with
I installed the WSL Bash on Windows 10 so it can act as my terminal in VScode, but the default directory is ~/home/USERNAME
I would like it to be /mnt/c/Users/USERNAME (so on my windows domain side)
I'...
0
votes
1
answer
3k
views
Login Loop cannot CTR-ALT-F3 to command promt
I am stuck in a login loop. I see lots of suggestions about getting to a command prompt and either freeing memory, clearing log files, or undoing the last updates and upgrades. Sadly, when I get to ...
1
vote
0
answers
96
views
ckan.plugins.core.PluginNotFoundException: example_theme
I'm Using ubuntu server 20.4 and CKAN as my open data portal. I'm just following their offical documentation
https://docs.ckan.org/en/2.9/theming/templates.html
and I already Executed this commands
/...
1
vote
0
answers
170
views
Creating a CKAN Extension Error: No such command 'create'
I'm Creating a CKAN EXTENSION base in their official documentation.
https://docs.ckan.org/en/2.9/theming/templates.html#creating-a-ckan-extension
When I'm in this step,
ckan -c /etc/ckan/default/...
1
vote
1
answer
37
views
UpDating .sh file to be compatible with v20.04
I'm trying to update this .sh file
#!/bin/bash
function pecl_install {
pecl install $1
echo "extension=$2.so" | sudo tee /etc/php5/mods-available/$2.ini
echo "; priority=$3&...
0
votes
0
answers
165
views
mysql server not connecting in command line
When I try to connect to my local MySQL installation on Ubuntu 21.04, I receive the following error:
ERROR 1045 (28000): Access denied for user 'nishant'@'localhost' (using password: YES)
If I don't ...
-1
votes
1
answer
2k
views
Whenever i enter into terminal to open python, Command 'python' not found, did you mean: command 'python3' from deb python3
I've installed ubuntu 20.04.3 lts, and I installed anaconda3 twice, first time from user privilege and once again from root privilege since not being activated conda. when i reopened the terminal, i ...
0
votes
0
answers
365
views
Remove login identification Ubuntu 21.10
I have a special application requiring a "straight" system load, without asking for login credentials. The same process is possible under Windows 10.
Basically, I want to automatically login,...
1
vote
2
answers
1k
views
Change terminal-emulator in ubuntu default filemanager
in the Ubuntu default file manager when right-clicking there is an option to
Open in Terminal.
How can I change the terminal-emulator for the "Open in Terminal" option? I have changed my ...
6
votes
2
answers
256
views
Which CLI text editor does not waste screen space?
Vim has a non-removable status bar at the bottom. Nano has the same problem with its title bar. Surely there has to be an alternative for entering text in full-screen without any frills? I often jot ...
0
votes
0
answers
515
views
About installing .sh Ubuntu 20.04
I'm trying to install this file .sh https://github.com/greatfire/website-mirror-by-proxy/tree/master/install
I used these command line
chmod +x install.sh
sudo ./install.sh
after that it show me ...
2
votes
1
answer
430
views
Missing executable permissions on secondary internal disk
I've just installed Ubuntu Studio after migrating from Manjaro, and every time I run Android Studio (which is installed in my secondary drive, which is mounted in ~/Storage) I get the following error:
...
2
votes
2
answers
2k
views
How to solve "The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable" error?
I've installed Ubuntu 20.04.3 LTS and installed Anaconda3, but I had to uninstall Anaconda3 since some problem occurred. I removed it using this command as root and from the /home/user directory:
# rm ...
0
votes
1
answer
2k
views
Why is my alias from .bashrc not working?
I've written a line in .bashrc
alias untar='sudo tar –xvzf'
Now, when I use "untar" in bash I get the error:
untar filename.tar.gz
tar: invalid option -- '�'
Try 'tar --help' or 'tar --...
1
vote
0
answers
271
views
Recommended way to limit CPU usage of a shell script
On Ubuntu 20.04 I'm using the AWS CLI to send backup data from my web server to S3. While the script works, it consumes CPU usage to the point where other services begin to fail. This becomes a big ...
0
votes
1
answer
57
views
Is there a package that allows saving a terminal instance?
Is there a package of some sort for saving a terminal instance like this:
some_package instance_name python3.9 main.py
closes terminal
some_package instance_name
Shows the all terminal mesage as if I ...
1
vote
1
answer
7k
views
What is python-minimal?
I had a problem that gave me an error message in the terminal whenever I tried executing a command. I checked a forum, and the most helpful solution instructed me to run this command:
sudo apt-get --...
0
votes
2
answers
2k
views
Accidently make ls colors (folders, files, links...) to white
I accidentally delete/change LS colors when listing directories with the 'ls' command, so I tried the command "ls --color=auto" it works temporarily because when I reboot my terminal ls ...
-1
votes
3
answers
2k
views
How to list all ASCII files present in a directory?
I want to list all ASCII files that are without extensions(.txt) in my present working directory(home).
I started with the ls command in the terminal but i don't know what i should put in the options ...
0
votes
1
answer
102
views
How do I configure Ubuntu to automatically prepend every command with a certain command?
How can I configure Ubuntu Server so that every time I execute any terminal command, it prepends a specific command I name to that command?
So that:
$ cmd2
is actually received by the system as:
$ ...
0
votes
1
answer
185
views
How could I set a universal time limit on any command line operation?
I would like to specify somewhere deep in the operating system that any command line command that takes longer than a specified amount of time should automatically be terminated or cancelled and ...
0
votes
0
answers
95
views
Unable to access/rename/delete directory
When I list files/directories with command ll | grep 'TM'
ls: cannot access TM: No such file or directory
??????????? ? ? ? ? ? TM
I can see TM folder is listed but when ...
0
votes
1
answer
329
views
How open file with gedit withot terminal block? [duplicate]
When I open file with
gedit templates/index.html
I see this in terminal and can't use it more:
How can I open file in text editor without blocking terminal?
0
votes
1
answer
195
views
~/.profile not reloading [closed]
I am using Ubuntu 16.04.7 LTS
Wanted to know why changes are not reflected when I change
the ~/.profile and reloading the file using
source ~/.profile or . ~/.profile
The changes are only ...
13
votes
2
answers
8k
views
How do I check if command failed... with a pipe?
So I have a script like this:
somecommad | grep --invert-match something
I'd like to be able to conditionally run a different command if somecommand fails. Here's what I tried:
somecommand | grep --...
0
votes
1
answer
1k
views
'su' command without a passwd prompt in a remote machine while connected through and ssh session using python's paramiko library
I am writing a python script to automate ssh connection to a remote machine. When connected to the remote machine using python's Paramiko library, if I need to elevate privileges (specifically to ...
1
vote
0
answers
95
views
How to cut a file in this way?
I have to cut a long file (approx. 2 millions of lines) at the line that follows the line at which there is the last appearance of a word.
For example the file could be:
line 1
line 2
....
word
line ...
1
vote
1
answer
2k
views
Setting the permissions on all files inside a folder without changing the permissions of the folder itself?
I have a folder called my_files. I want to:
set the permissions to allow all users to read, write and execute the folder
and set the permissions on all files inside my_files to allow all users to ...
2
votes
1
answer
748
views
How invoke print dialog from command line?
I'm using xfce4 on Ubuntu. Blasted if I can't see what command will send a file to the printer via a print dialog. Please help.
1
vote
1
answer
159
views
How to register a command to confirm the option when installing programs?
When installing SageMath through the terminal on Ubuntu 18.04
on command
sudo apt-get install sagemath
I get a notification:
Postfix Configuration
---------------------
Please select the mail server ...
1
vote
0
answers
17
views
How to install libmysqld-dev on ubuntu 18.04? [duplicate]
I have looked through many forums but can't find how to install libvdpau-dev on Ubuntu 18.04.6. Can you help me?
~$ sudo apt-get install libvdpau-dev
Reading package lists... Done
Building ...
0
votes
1
answer
404
views
Proper Incremental Backup/cloning Solution for an Ubuntu 20.04 LEMP Server on Raspberry Pi (and turning clones into bootable ISO's on the fly)
BACKGROUND
I still consider myself sort of a noob when it comes to setting up server. So when answering this question, please give as much detail as possible in your answers.
ENVIRONMENT
I run a LEMP ...
2
votes
2
answers
583
views
OpenShot will not upgrade
I just installed openshot video editor via terminal: this tutorial https://www.ubuntupit.com/install-openshot-video-editor-ubuntu-linux-mint/ on ubuntu 21.04 on a raspberry pi 4b. I tried to start it, ...
0
votes
1
answer
191
views
How do I use the command passwd to set a password for user the user01?
Using command line, what do I type to create the password 123xyz for the user named user01?
0
votes
1
answer
345
views
Split files into multiple subfolders and zip each subfolder
I am using Ubuntu 18.04.5 LTS.
I have created the following script to split files in a folder into different subfolders:
#!/bin/bash
dir_size=850
dir_name="images"
n=$((`find . -maxdepth 1 -...
-1
votes
1
answer
327
views
i ran the following command on docker it shows the folllowing error how to get rid of this?
I ran the following command on docker and got the error below. How can I fix this?
FROM compiler-common AS compi
ENV DEBIAN_FRONTEND=nonintera
RUN apt-get install -y --no-i
git-core \
checkinstall \...
3
votes
1
answer
1k
views
Run script from Nautilus without opening terminal
I have some Python scripts that provides a UI using GTK (ie. it's not a terminal application). In Ubuntu 21.04, double-clicking in Nautilus will provide me the option to run them with or without a ...
0
votes
0
answers
71
views
Does gmplayer work?
I'm trying to get "gmplayer" to work. I did, eventually, get it to work, but it was a struggle, and I have a question (at the end of this post). Note: I first installed mplayer and it ...
1
vote
0
answers
745
views
Wine seemingly installed but not showing up in the menu
I installed wine via terminal, following all the steps on the website, but it isnt showing up in the menu.. what do I do to troubleshoot and fix this?
2
votes
1
answer
862
views
convert bunch of images to black and white with overwritting existing images
I need to convert a bunch of images (about 1000) to black and white
I used the following code:
convert *.bmp -monochrome ./*.bmp
but it produces new images. for example, I have file1.bmp, file2.bmp ...