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.
4,293
questions with no upvoted or accepted answers
1
vote
2
answers
5k
views
Grepping last 5 minutes log
I need to grep last 5 minutes log.
log file:
18-06-17 06:00:09 ID-5
18-06-17 06:00:11 ID-78
20-06-17 09:34:51 ID-Hello
21-06-17 09:20:49 link is down
22-06-17 06:00:11 ID-674
22-06-17 06:40:51 ID-2
...
1
vote
0
answers
188
views
Create Keyboard Shortcut for Single-Line Bash Command
I want to run cmus-remote --pause when I press F8 at anytime, in any window, in Ubuntu. I've tried creating a keyboard shortcut (System > Preferences > Hardware > Keyboard Shortcuts) with bash -c '...
1
vote
1
answer
155
views
Ubuntu bash Small Script Help
I am trying to run the following bash script, but it does not display anything on the terminal window and i get no errors either. I am trying to display the currentid value to be shown on the terminal ...
1
vote
2
answers
1k
views
Open linux terminal and run multiple tasks using perl script
I am running these commands in perl script with purpose
Open a linux terminal
Run script xbrecoverBoard.sh and rest_board.sh in that terminal
gnome-terminal -x sh -c "./xbrecoverBoard.sh && ....
1
vote
1
answer
105
views
Did my 11 month old just ruin my Ubuntu installation via the screen unlock password prompt?
My 11 month old son is obsessed with laptops and I occasionally let him play around with my Ubuntu laptop while the password protected screensaver is running. Aside from potential hardware damage, I'm ...
1
vote
1
answer
151
views
Shelled root seems to print incorrect from /etc/shadow | grep root
I'm trying to understand why my script prints cat /etc/shadow | grep root as the empty string (''). This happens even though my script gets access to [email protected]...
I'm walking my way through ...
1
vote
1
answer
45
views
Sublime Text 3 behaving differently whether called by terminal or by clicking .desktop file
Notice how when I use the version launched with the .desktop file sublime takes advantage of Unity's top bar. I'd like it to do the same with instances launched by the terminal
1
vote
0
answers
4k
views
w3m to display image inline and quit
In a Lubuntu 16.04 system, w3m does display png and jpeg image files inline on a gnome terminal, but it enters the command mode, so the image only shows when you press some key (like down arrow, there'...
1
vote
1
answer
301
views
AWK command executed with out error but not modifying the file
I am applying awk command on a file but this file is not modifying. can any one suggest why this is happening?
awk 'BEGIN{FS=OFS=""}; {if($692=="6") sub($690,"9");print $0;}' abc.txt >efg.txt
...
1
vote
2
answers
2k
views
Problem with proxy settings while trying to install a package
I'm trying to install a package (android-studio) through ppa, and am having some troubles. I'm 95% sure it is related to the corporate proxy we're behind of.
These are my settings:
env | grep -i ...
1
vote
1
answer
494
views
Create a Shell with Limited access of commands
I have to give ssh access to a user, but i want them to execute only limited command set like ifconfig, ip link,restart apache etc. but not adduser etc.
Please someone point me in the right direction
1
vote
0
answers
506
views
Convert single Latex strings into normal text
I want to use a bash script to extract Author and Title from a latex file and save it in a variable, I found a solution, however if the title or the names use a special character (like \'e) it will ...
1
vote
1
answer
355
views
How to open a file from bash in another workspace
I am working on a project where a text file and tif file should be opened to full window to compare with each other. So easiest way to do this is to open either one in another workspace. That means I ...
1
vote
0
answers
712
views
ssh tab auto-complete causes bash: warning: setlocale
When I try to to use tab to auto-complete to finish a ssh (or scp) command, the following error appears on the console:
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8)
-bash: ...
1
vote
0
answers
223
views
echoing COM port return garbled but consistent charachters
I have a RS323 to usb cable connected to a circuit of max3232 IC Chip, everything was checked to be running on windows.
The Tx and Rx are connected to each other to simulate an echo function.
When ...
1
vote
0
answers
1k
views
How to stop lightdm without getting dark?
I am trying to install on a freshly installed ubuntu the drivers for my gtx1050.
At first it worked, I downloaded the display drivers for linux as a .run-file, I ctrl+alt+F1 into a console and ...
1
vote
0
answers
3k
views
Execute a Shell Script from php?
I'm trying to generate Android apk files from shell script, I want to execute a shell script file from PHP. When I run the shell script in the terminal, it works perfectly. If I try to run the script ...
1
vote
3
answers
398
views
Bash help: awk columns
120 , 3 <IP address> <port>
100 , 3 xx.xxx.xx.xxx xxxx
220 , 3 xxx.xx.xxx.xxx xxxx
280 ...
1
vote
0
answers
2k
views
How to check if the libdvdcss library is contained in ubuntu?
I am using ubuntu studio 16.04. Except from adding a few PPAs, I've not changed the system as it was after the installation.
I am wondering if the library libdvdcss is installed, here is why:
After ...
1
vote
0
answers
274
views
Ubuntu Terminal 16.05LTS How do I keep progress bar output on same line when I resize terminal
For some applications that prints output on the same line (carriage return) such as wget or anything that has a progress bar overwriting the previous progress, when I resize the terminal window or ...
1
vote
0
answers
2k
views
From a bash script, send commands to a terminal window
I need to run a script which will run many similar commands inside another terminal window (which has a app launched and ready to receive commands).
And the command should be sent to the open ...
1
vote
0
answers
3k
views
White background in terminal (Ubuntu 17.04)
I install "paper" theme and the terminal background change to white, I don't find out how to change it to dark. The same with Numix theme.
I want to use the colors of theme (not built-in ...
1
vote
0
answers
383
views
gtk-3.0/gtk-widgets.css color codes ubuntu
for ubuntu 14.04 when editing usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css to change colors in some item I would like to know if there is a guide to the corresponding colors to the numbers in ...
1
vote
0
answers
2k
views
keyboard-interactive authentication (Locked out?) on a Modern Honey Network Ubuntu 14.04 box?
I deployed a Modern Honey Network for a course project. I have a Ubuntu Box that hosts the MHN server and now I have deployed a Ubuntu 14.04 box to host several Sensors (Cowrie, Snort, etc.) However, ...
1
vote
0
answers
76
views
Reconfiguring software to run on different Python version locally
I am using a shared server installed with Python 2.6.6 but this program (called RSeQC) requires Python 2.7 or higher to run; so I installed Python 2.7.13 locally. Then to enable Python 2.7.13 locally ...
1
vote
0
answers
855
views
PowerShell launcher
I am setting up a demo Ubuntu 16.04 devbox and I wanted to create a launcher entry for PowerShell that uses the default gnome-terminal but with the canonical PowerShell colors and icon on the launcher....
1
vote
0
answers
2k
views
How to logout the ubuntu while remain vnc session connected?
Ubuntu server 14.04 Trusty.
Using vnc4server, gnome-shell.
I am trying to logout the user but with no luck.
What I am trying to achieve is to end all the tasks that the user is processing,like ...
1
vote
1
answer
148
views
files made with Gedit cannot be found/made executable from terminal
I recently (as in within the hour) made one .rb file and one .html file. When I enter them into my Terminal they always return: "No Such File or Directory". It does not matter if the manner of input ...
1
vote
1
answer
3k
views
Changing default terminal
As said, I'd like to change default terminal. I've set ctr+alt+t shortcut and it starts xfce4 terminal. But it's bothersome sometimes. There's an option open in terminal/open terminal when u click rmb,...
1
vote
0
answers
163
views
Ubuntu 16.04: Executable added in .desktop opens without the file
I added Pymol executable into ~/.local/share/applications as a pymol.desktop file. The program now shows up in the Applications tab of the GUI and opens but without the file.
I mean to say, Pymol ...
1
vote
0
answers
107
views
Terminal throws error message of some installation
Whenever i open terminal, it opens with the following undesired message:
32bit Detected
Installing Google Chrome
--2017-03-11 22:27:37-- https://dl.google.com/linux/direct/google-chrome- ...
1
vote
1
answer
750
views
(Another!) question about www-data privileges and root - but with a twist
In short : is it safe to grant root (user) access to www-data?
Longer statement : as a lot of questions asked on this using chmod g+s, POSIX ACLs and other sites umask as to the appropriate way of ...
1
vote
1
answer
1k
views
Using Sudo commands via Webpage
I am working on the webpage where you click the button run the file in superuser.
I am trying to run mininet topology using the python script via web page.
<?php
$mininet='sudo python ...
1
vote
1
answer
66
views
drupal8 login password forget
I had install drupal 8 on my ubuntu 16.04 bt username or password have forget for login. email id also show not recognized. how to find user name or password
1
vote
0
answers
32
views
Cant merge terminal's tabs (they all crash)
Im using Ubuntu 16.10, having this terminal structure:
Window_1:{Tab_1, Tab_2}
Window_2:{Tab_3, Tab_4}
When I click and drag Tab_1 then drop it to Window_2, instead of merging it with other Window_2'...
1
vote
0
answers
1k
views
Systemd service run binary and after run script?
I have the following service:
[Unit]
Description=Renews letsencrypt certificates
After=network.target
[Service]
Type=oneshot
WorkingDirectory=/etc/letsencrypt/
ExecStart=/usr/bin/letsencrypt renew
...
1
vote
0
answers
2k
views
sshpass I want to use in .sh and execute some commands Ubuntu 16.04
From one VM-X i want to log onto different VM-Y, get output dh -H command from VM-Y
and find out which disk usage is above say 50% and sendemail
from VM-X
echo "df -H | grep -vE '^Filesystem|tmpfs|...
1
vote
0
answers
124
views
lpr prints only txt files
I have made a script to automatically print all files dropped on a folder, then delete it after printing. This works fine with text files, but doc,jpg,pdf,..etc printing is failing with no result
...
1
vote
1
answer
6k
views
Use proxychains in terminal
I know that I'm using the proxy(tor) by the precise return of this command:
sudo proxychains sh -c 'apt update'
However, when I do this in 2 steps, the command's return isn't as precise as before: ...
1
vote
0
answers
584
views
Terminal can't scroll after overnight idle computing
I'm on Ubuntu 16.04, using ubuntu terminal, running zsh with oh-my-zsh.
I'm on a ssh session to a remote computer with the same configuration.
I launched a big computing and forgot to output the ...
1
vote
0
answers
483
views
Ubuntu 16.10 - X.org not starting
The main problem: startx does not start fluxbox, server disconnects, but xinit $(which xterm) works.
X.org (and EDID) problem started with installing fresh 16.10. Minimal ubuntu console, Xorg, ...
1
vote
0
answers
91
views
Which shell message are involved, in my example, and how to enable or disable them?
I have two Ubuntu virtualboxes both version 16.04.
If to reset the network manager on vbox1 results in :
bernard@vbox1~$ sudo service network-manager restart
bernard@vbox1~$
and tests suggested by ...
1
vote
0
answers
363
views
LS_COLORS failing to source in .zshrc
I've noticed a strange problem with sourcing.
source /etc/zsh/zshrc in .zshrc fails to set LS_COLORS
The last line in /etc/zsh/zshrc:
eval $(dircolors /etc/zsh/DIR_COLORS)
But it has no effect.
...
1
vote
2
answers
1k
views
Postfix SMTP mail server External smtp relay
How can I configure postfix smtp?
External smtp relay
Smtp authentication
Email send rate limit
Schedule emails
1
vote
0
answers
857
views
Run a script with root privileges, but only at very first login of any user
How can I run a script that requires root privileges at login of a (or any) user?
I am building an Ubuntu 16.04 Docker image. I need to update the list of libraries with the ldconfig -v command but ...
1
vote
0
answers
122
views
Unable To Download Software VIA Terminal
Trying to Download repos but this error shows up, this happens always while trying to download any other repositories also.
W: The repository 'http://ppa.launchpad.net/osmoma/audio-recorder/ubuntu ...
1
vote
0
answers
586
views
how can I run a graphical program from ssh?
Before you get all, vote to close, thread like this other one, hear me out.
I have a program, it produces an image stream. I want to feed that stream to an ffmpeg session on the same machine. The ...
1
vote
0
answers
71
views
How do I setup my computer to run multiple sessions at once with different peripherals?
I have built another computer for my organization, but it is so powerful that I put it in an office where multiple people are sitting next to each other.
I have several monitors, and that gave me an ...
1
vote
0
answers
451
views
how to play .avi file from a remotely connected Ubuntu with -X flag (without dropping quality/resolution of video)?
How to open a .avi video from a -X ssh version of an Ubuntu terminal? None of the ones said below work for me:
The syntax to open any file in its default application is
xdg-open If you mean ...
1
vote
0
answers
389
views
Using shell script to move file after failed execution of Xfoil.
I have Used this script to get majority of my code. I am trying to edit it where the code continually runs even when getting stuck on a file. What happens with original dataanalysis.sh script is that ...