Questions about using the command-line interface (CLI).

learn more… | top users | synonyms (5)

2
votes
1answer
132 views

How to automatically answer interactive cli program (not script) with bash script?

I've googled this, and almost all I could find is to answer a bash script and this doesn't work for me. The answers I found told to do: echo "yes" | ./script or ./script <<< yes or ...
2
votes
3answers
2k views

“ bash: /usr/bin/mint-fortune: No such file or directory ” - Ubuntu 14.04

Previously i used LMDE on my laptop, but now I moved to Ubuntu. I might have been a little bit rough with it, because I’ve simply format / partition, and installed Ubuntu on it. Home folder was ...
4
votes
2answers
48 views

Command equivalents of Unity keyboard shortcuts

I'm wondering is there any way to achieve the affect of the Ctrl-Alt-Keypad shortcuts in Unity using terminal commands instead? I want a command that sets a gui window to half the size of the screen, ...
0
votes
1answer
19 views

Open in Terminal context menu only opens terminal in home directory

Been testing out Ubuntu 15.04 on my laptop. I noticed that right click menu (when right clicked on desktop or in the file manager) has open in terminal. But when I choose, not matter what directory I ...
0
votes
0answers
16 views

How to install AMPPS 3.0 from terminal?

After downloading the file, when trying to install ampps 3.0 on the terminal, I got a message saying: ......Extraction failed. .... Terminated . I am using the file Ampps-3.0-x86_64.run from ...
12
votes
5answers
649 views

Where are commands `fg`, `bg` and `jobs` installed?

fg, bg and jobs are used for job management. And for some reason (maybe it's just me), I'm not able to find where their binaries are nor their manpages (whereis prints no information). which gives no ...
1
vote
1answer
29 views

Why does the more command not work when bound to a keyboard shortcut?

I have two commands that both work in terminal: notify-send "$(more /home/tim/autest.sh | head -1)" and notify-send "$(cat /home/tim/autest.sh | head -1)" putting them in a script like this: #! ...
1
vote
1answer
12 views

Reset hibernation delay from command line

My hibernation on Ubuntu 14.04 LTS works fine. But someone keeps changing its delay to never hibernate. I am tired of paying days' worth of electricity for 10 minutes usage a day. Is there a way I ...
45
votes
3answers
97k views

How to connect and disconnect to a network manually in terminal?

Since the network manager is troubling me so much I want to replace it (possibly wicd orNM from ppa:volanin). I do not know how to connect and disconnect to the network through the terminal without ...
0
votes
0answers
11 views

how to connet to hidden network from terminal [duplicate]

My Ubuntu graphics has stopped working. I can only access the terminal. So I am trying to connect to a hidden network through the terminal. I have tried using iwconfig for the same. But with no ...
0
votes
0answers
26 views

Why does the Terminal minimize when initiated in Ubuntu 15.04?

After installing Ubuntu 15.04 update Steam quit working. So I tried to remove Steam installer and reinstall it; along with the installation I received the message: Steam, Steamdeps are run in a ...
-1
votes
2answers
1k views

problem with opening .sh file in Ubuntu 13,10

I have problems opening a the .sh file for Cytoscape in Ubuntu 13.10. I click on it but it does nothing! When I try to use the terminal it opens but shows lots of codes and does not run. Sorry if ...
1
vote
0answers
16 views

In Ubuntu 15.04, how do I disable the hints in the terminal? [duplicate]

So, I just updated to 15.04. Looks great, but the first thing I noticed when opening up a terminal was that it reads: To run a command as administrator (user "root"), use "sudo <command>". See ...
6
votes
2answers
14k views

Compressing folders with password via command line

I would like to know whether it is possible to do the following via CLI. I have a Folder F which contains several sub folders and some files. I want to compress folder F into .zip file with the ...
0
votes
1answer
30 views

KDE (Kubuntu) login issue

the problem is much more bigger then what the topic says. I am new with Linux and was watching a tutorial for certain commands... and I learned about this command "startx". What this command does is ...
0
votes
0answers
13 views

Is Vala a good choice for making a gui to a program? [on hold]

I've written a simpl program that manages environment variables where you can inspect your environment variables like printenv | sort | less. Now I want to make a GUI for my program. I tried Vala and ...
2
votes
1answer
53 views

how to create a symbolic link that works relative to the working directory

consider the following : x/ ph/ file1.txt -> ./../file1.txt file1.txt y/ ph/ -> /x/ph/ (this is full absolute path of x/ph) file1.txt /y/ph is a symlink for ph folder ...
-1
votes
1answer
22 views

Open a folder in a Graphic File Manager from a terminal [duplicate]

How can I open a folder in a GFM (in a files window) from the terminal? Thank you for your kind help.
5
votes
3answers
3k views

How to see the details which Ubuntu shows at the time of login anytime?

When I login to my ubuntu system, it show me this this message, How can I see it any time? I tried to run . .bashrc but it didn't worked. Welcome to Ubuntu 12.10 LTS (GNU/Linux 3.2.0-24-virtual ...
18
votes
2answers
7k views

In a bash script what does a dot followed by a space and then a path mean?

I came across this example when trying to mount a usb device inside a openvz container and I have never seen the construct in the second line before. Can you explain what it signifies? #!/bin/bash . ...
2
votes
1answer
33 views

How to permanantly change the color scheme of the terminal?

I have just installed solarized color scheme for ubuntu gnome terminal. I have followed this tutorial. eval dircolors ~/.dircolor - this command s causing problems. When I use this command, it ...
0
votes
1answer
26 views

How do I export a variable to the `sh` shell? [duplicate]

Calling export MYVAR=/path/to/whatever from .bashrc obviously works for bash but not for the sh shell. Unfortunately, the Matlab launcher seems hell-bent on using sh and not bash. As such, the ...
1
vote
1answer
11 views

How can i install xfonts-… packages?

I need to install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic packages. But I get an error, that they are not exists. Using Ubuntu 14.10 Need them for xvfb
1
vote
2answers
227 views

Can't get IPython to start: “ImportError: cannot import name start_ipython”

I'm trying to start IPython from the terminal. I input: ipython into the terminal and I get this output: Traceback (most recent call last): File "/usr/local/bin/ipython", line 4, in ...
1
vote
1answer
24 views

Running Shell Script on Double Click

Okay, I have opened nautilus and edited preferences to ask when I double click an .sh script to run in Terminal. Well, I don't want to use a .desktop file; I want to just simply double click on the ...
0
votes
0answers
16 views

Pass multiple specific files as one string arg from another java program [on hold]

I am trying to pass few specific paths as a string arg in one program to call another java program. I get an ArrayIndexOutOfBoundsException error but when I pass the exact same arg in the command line ...
7
votes
2answers
232 views

How to use grep output as a path for cd?

How can I pipe grep output as an argument to the cd command? For example: [root@xxx xxx]# pip install django | grep '/usr.*' Requirement already satisfied (use --upgrade to upgrade): django in ...
2
votes
2answers
42 views

When one disables the root account via the terminal, what output can one expect?

When I used Ubuntu for the first time, my friends told me to enable the root account, and I enabled it. But, I know that I already reinstalled Ubuntu few times, but in this last time, I don't know if ...
16
votes
3answers
1k views

“mv file” and now it's missing

In a terminal window, I typed: mv filename ..\.. [Note the wrong slash.] Now I can't find it. Gone. I ran some searches and looked through recoverable deleted files. Nothing. Poof. Serves me ...
3
votes
4answers
104 views

Ordering of the commands used to install from a ppa

To install from a ppa, you have to use the following 3 commands: sudo add-apt-repository example/program sudo apt-get update sudo apt-get install example-program Is there any reason not to do this: ...
1
vote
1answer
66 views

How get rid of the terminal message about sudo [duplicate]

After upgrading to 15.04 I get a message with every new terminal to tell me how to use sudo: To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for ...
0
votes
3answers
19 views

What does !! do? [duplicate]

I can run a command like this: tim@Hairy:~$ echo Hello Hello Then I can run the command !! and it does it again: tim@Hairy:~$ !! echo Hello Hello I can even run it with another argument to the ...
54
votes
7answers
4k views

What does `!!` mean in `sudo !!`?

I am a user of Ubuntu with not much experience and I have been using sudo. What does sudo !! do and how?
1
vote
3answers
120 views

What is the syntax for IF/ELSE in bash?

I am trying to pull logs and doing few others things directly. written a small line BASH but not working. I am sure thats with IF Condition. sed -rne '/21:25:07/,/21:50:07/ p' ...
1
vote
2answers
7k views

How to use rsync from within a python script? [closed]

I plan to move file from one system to another system. For this, I am using rsync command in linux terminal. It works fine. But I need to implement this command to python. I am very new in python, so ...
11
votes
4answers
4k views

How do I set the prompt to use two colors?

One thing I liked about Mint was that the terminal would usually show two colors: everything from the left to the $ would be one color, and everything past the $ would be another. Is there a way to ...
2
votes
1answer
191 views

Copy all folders with name “ABC” to another location

I have 100 folders and every folder has a subfolder called "ABC". I want to copy folder structure and contents of "ABC" to another location. How can I do it through Ubuntu terminal?
3
votes
2answers
44 views
+50

How to run a script when a directory is changed by another user?

I know has been a bit of discussion about topics similar to this. But here is what I am basically trying to do. I have a watch directory called watched and whenever a file is added to that directory, ...
0
votes
1answer
21 views

sleep getting hang in shell script

I had a cron script running on my Ubuntu PC ( 12.04.3 ) which periodically checks for disk space. There was a "sleep 5" also used in this script. This system was up for a month, but an issue is ...
10
votes
5answers
915 views

How could I list all sudoers?

I want a command to list all sudoer users in Ubuntu 12.04. In other words, how could I list all users who have sudo ability? Suppose I'm a sudoer user. How could I know all other sudoer users?
5
votes
3answers
13k views

How to enable monitor from terminal?

I accidentally disabled my monitors, so when I log in I land on a blank, back-lit screen. I can open terminals with Ctrl+Alt+F#, so how do I enable the monitor from terminal? I tried xrandr, but it ...
1
vote
1answer
51 views

Changing Background Image in Multiple Terminals

I was wondering if anyone would know how to change the background image in the terminal in a unique way. I know how to change it so that every instance of the terminal has the same background, but I ...
14
votes
6answers
695 views

Most efficient way of launching and separating a program from the terminal? [duplicate]

I'm trying to launch a program from the Terminal in such a way that the following occurs: Closing the Terminal does not close the program The program is not outputting anything to the Terminal while ...
-1
votes
0answers
21 views

NSENTER command not found [duplicate]

I have Ubuntu 14.04, following some course learning around docker and Openstack, I needed to run a command as follows $ nsenter -m -u -n -p -i -t 19636 command not found . After googling, I found ...
1
vote
2answers
22 views

How to Copy special file (steam.pipe) in Ubuntu?

I had been using Ubuntu for a period of time, and had faced this problem: I am using ubuntu 14.10 right now and have Steam installed in my /home/user/.steam folder. When i was copying the .steam ...
0
votes
3answers
483 views

Count number of characters/words/lines in LibreOffice/OpenOffice(using terminal) Using `wc` command

The command wc which is used for counting doesn't work directly with Office files. For example I created a writer .odt file and I wrote inside 7 words. Then i tried wc -w file.odt the output was 136 ...
0
votes
1answer
19 views

Spellcheck an HTML file in the terminal

I have been trying to find a way to spellcheck my HTML file's content in Sublime for quality control. I have referenced several articles referring to aspell but after installation and trying to run ...
0
votes
1answer
19 views

Export a png from kra, a krita document

How to export a krita, kra document with many layers, to a png using command line ?
2
votes
4answers
403 views

How do I search for a process by name without using grep?

In order to search for a process you can use ps with grep. For example to search for firefox ps aux | grep firefox How to get the same answer without using grep?
6
votes
6answers
288 views

Exit terminal after running a bash script

I am trying to write a bash script to open certain files (mostly pdf files) using the gnome-open command. I also want the terminal to exit once it opens the pdf file. I have tried adding exit to the ...