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

learn more… | top users | synonyms (5)

5
votes
2answers
343 views

Why do I get different outputs in case of sh and bash?

I have the following simple script: #!/bin/bash echo "Bash version ${BASH_VERSION}..." for i in {1..99..2} do echo $i done Output in case I run with sh file.sh: Bash version ... {1..99..2} ...
1
vote
2answers
59 views

Changing environment variables

I just changed my /etc/environment file to: M2_HOME=/usr/local/apache-maven/apache-maven-3.1.1 M2=$M2_HOME/bin ...
-1
votes
0answers
26 views

Gedit embedded terminal not working

I get this error when I run gedit: $ gedit Traceback (most recent call last): File "/usr/lib/x86_64-linux-gnu/gedit/plugins/terminal.py", line 309, in do_activate self._panel = ...
1
vote
1answer
90 views

ubuntu 14.04 stuck in login loop. Nothing seems to help [duplicate]

just an hour ago, I installed some package which was supposed to solve the problem with dead keys. After that I restarted my laptop and could not log in because of infinite loop with the login page. I ...
1
vote
2answers
52 views

How to get a colored bash?

How to get the bash colored like this?
0
votes
1answer
26 views

Easiest way to take a continous series of pictures from a webcam

Looking around I found several solutions to take individual pictures (a few solutions are given here) and even a series of pictures (with up to one fps). I want to store the pictures in much lower ...
-2
votes
0answers
34 views

How can I execute shell command in server?

I have a problem that is execute bunch of shell command to the live server. How Can I do this? I have searched something about it and here i got a following solution. The solution is that the ...
0
votes
1answer
33 views

How do I open .cpp file from the github directory? [duplicate]

I'm a total newbie here. How do I open .cpp file from the github directory? what command should I use? I'm in the directory where the .cpp file is stored but I do not know how to open that in the ...
1
vote
2answers
81 views

Terminal method of formatting storage drive

I want to know how to format a storage drive from the terminal. Helpful things to provide in the answer would be often used options for commands and base knowledge that one can use to extrapolate ...
0
votes
0answers
18 views

can anybody explain what ls -l do? [duplicate]

can anybody explain what ls -l do? I'm new to command line functions so simple explanation would suffice. Thank you. For my reference the results I get when I typed ls -l was: drwxrwxr-x 3 student ...
1
vote
1answer
30 views

Give file permissions back to root

I accidentally typed out this command, not knowing exactly what it did: sudo chown -R user:user / Now when I type ls -la /, it shows that user has permission to all directories (before it showed ...
-1
votes
3answers
51 views

Create and replace an existing directory?

I have a directory name foo located in ~/Desktop. Suppose I want to create a directory from a terminal with same name and in the same location. When I tried mkdir it gave an error: mkdir: cannot ...
1
vote
1answer
23 views

What is the difference between free and vmstat commands?

vmstat output: procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 1 1 0 1001568 84736 ...
0
votes
0answers
24 views

Change terminal or terminator profile via keybinding or echo command

How can I change profile for terminator or terminal without touching the mouse? in terminal alt-t will allow me to get to menu to change profile echo -en "\033]0;$*\a" will allow me to set title ...
-1
votes
0answers
32 views

old version of newly installed skype opens instead of new one - not in terminal, but with quick access

I have installed the new skype version (4.3) on ubuntu. thanks to this thread How to upgrade skype from 4.2 to 4.3 i managed to do it with little proficiency, thank you so much! and i have also ...
0
votes
1answer
77 views

convert.im6: Unable to open image `xxx': Permission denied @ error/blob.c/OpenBlob/2638

I just tried converting several different images into a PDF file using the 'convert' command in a terminal, but when I did so, it returned: convert.im6: Unable to open image 'xxx.pdf': Permission ...
0
votes
2answers
42 views

Is there any way to install multiple software at a single command via terminal? [duplicate]

I just want to know after install ubuntu newly it`s need to install previous essential software again,That is really time consuming so is there any way that I write command and my essential software ...
1
vote
2answers
46 views

How can I wipe my hard drive from the Debian command line to install Ubuntu to a blank hard drive?

So here's my dilemma. I tried to install Debian and it wiped out Windows entirely after I installed the GRUB Bootloader. Thinking, "ok, I'll just get it back after I finish installing Debian," I ...
0
votes
1answer
70 views

Is sim a shell script command?

I was creating a sym-link for practice in Ubuntu 14.04. I meant to use this command: ln -s ../fun dir1/fun-sym It was taken from a book I am using. Except I used sim at the end by mistake. So the ...
-2
votes
1answer
54 views

Running python module in gedit embedded terminal [closed]

I'm new to python and i'm trying to run my first module but i can't do that through gedit embedded terminal the code i wrote is def num(b): print("Give A Number") b = b +5 print(b) I ...
29
votes
4answers
2k views

Is ~ considered like a relative path?

I'm trying to extract the different part of the Nvidia cuda library installer. I'm using the following command: mkdir ~/Downloads/nvidia_installers ./cuda_6.5.14_linux_64.run ...
3
votes
1answer
82 views

How long is an ARP entry cached for?

Where can I find out how long ARP table entries are cached? I'm running 13.10. Can I get this on the command line?
2
votes
2answers
48 views

Is it possible to launch an application on a remote pc using the terminal?

I found myself away from my computer needing to do some quick work that required my accessing my desktop remotely. I normally use teamviewer, but I don't have it load on boot. I can launch it from the ...
2
votes
1answer
38 views

How do I create simplistic window-like elements in a command-line program?

When I execute sudo dpkg-reconfigure lightdm in the terminal I see a simplistic window-like listmenu. Is there an way to make something like that in C++? This looks something like:
0
votes
1answer
35 views

After update to 14.04, ncurses seems to have bugs (cursor still visible in petris)

I just upgraded to 14.04, and wanted to kill time by playing some petris. Then I noticed this: The problem also exists in other terminals. Is there some option I can set to get the terminal to not ...
10
votes
4answers
854 views

How to copy a certain file several times with a regular ending?

I have a single file (a PDF) and I want to have lots of identical copies in the same folder (200 would be nice) named file-001, file-002 etc. How do I do it?
0
votes
0answers
24 views

Can we delay a command in ubuntu [duplicate]

Consider any two commands. command 1 and command 2 with this script SCRIPT command 1 stop two seconds after execution of first command and then execute the second command command 2 Can we make ...
0
votes
2answers
40 views

Open terminal in 'always on top' mode on startup

I want Ubuntu to open a terminal in the lower right corner when I log in, with the always on top mode enabled. I have made a script which does this when I run it from a terminal, but it does not work ...
2
votes
2answers
323 views

How to change the value of ~

by default ~ is given the value of /home/username/ i.e. If I use the command cd ~ it goes to the directory /home/username/ How to change the value of it to some other file such as ...
0
votes
2answers
33 views

End script and restart it with the same options and arguments

Usually !! repeats the last given command. But it doesn’t seem to work in a bash script. Is there a way to end a script and repeat it with the exact same options and arguments given the last time? ...
0
votes
1answer
47 views

Run terminal command (python command) at start up [duplicate]

New to Ubuntu, but have looked everywhere to get this question answered. Found no solution so far. Basically I need to run two terminal commands on startup, which follow each other directly. This will ...
0
votes
0answers
33 views

Bricked - tty mode incorrect, terminal disabled, unity broken

After installing VirtualBox unity seems to be uninstalled.. Launcher and task bar are missing. I can't access terminal from the normal ctrl alt T command. I tried logging into TTY mode but it says my ...
-1
votes
1answer
48 views

Running a program in background using command-line [duplicate]

How do I run a program in the background from a shell, with the ability to close the shell while leaving the program running which should not disturb the window i am working on? Lets say my UI is ...
0
votes
1answer
25 views

Terminal paging and scrolling

My terminal is very flaky. Even as I write this the webpage will scroll up and down almost at random. The same goes for my terminal. I will try to type, and the terminal will start paging and ...
0
votes
2answers
32 views

Unable to assign command output to a variable

I am trying to assign the latest file name obtained from the below ls command but getting some error, it would be very nice if someone can answer how can I fix this! fn=`ls -lrt ...
-2
votes
2answers
80 views

Why do I have to use command line terminal for nearly every program install? [closed]

I'm a PC Tech with DOS, Win and Mac experience going back to ~1985. Now I'm checking out the state of Linux for home PC's and I am setting up my 1st Linux PC since 2006. Reviews I found say Lubuntu ...
0
votes
0answers
54 views

Terminal flashing between current and previous screen

I just upgraded from Ubuntu 12.04 to 14.04. After upgrading the terminal will sometimes, but not always, flash between the current screen and the previous screen. Here are some examples: The output ...
0
votes
1answer
33 views

How to Connect/Disconnect to WiFi Via Terminal [duplicate]

I just have a quick question that I have been researching for a while now... How do you connect/disconnect to a wifi network in ubuntu via terminal? I tried several commands that failed. I have been ...
0
votes
0answers
25 views

I can't get into the sudoers listings [duplicate]

I try to type a command, to get Pinta (because GIMP isn't here for some odd reason) (Command is sudo add-apt-repository ppa:pinta-maintainers/pinta-stable/ubuntu), and it says asbell is ...
0
votes
1answer
36 views

Need to copy firmware files at /usr/lib to /lib using terminal

I have a Cubox-i4Pro and I'm running Xubuntu on it. In order to get Wi-Fi working I have to copy the firmware folder "brcm" from /usr/lib/firmware/brcm and make the folder /lib/firmware/brcm. Refer ...
0
votes
0answers
40 views

Terminal closing itself after 14.04 upgrade

All was fine in 12.04, in this case I'm using virtualbox in Windows. The upgrading process ran ok, no errors, no warnings. After rebooting the errors started to happen. Just after booting up there ...
6
votes
2answers
269 views

Execute command from file in current shell

I want to executed command from file (which is script) in current shell in terminal. Example: I have file ch_dir contains following: #!/bin/bash cd /usr Now if I execute file usually as following ...
0
votes
1answer
119 views

No GUI before login on Ubuntu 14.04

After I installed Ubuntu 14.04 as the only OS on my computer on nomodeset to install the Nvidia drivers for my video card. I installed it and all is working properly. The only problem that I have is ...
4
votes
1answer
69 views

Run several xdotool commands in one line separated from each other

I'm trying to run xdotool type word then xdotool key Return from Startup Aplications Preferences. But if I use && or ;, xdotool evaluates it as continuation of input.
0
votes
0answers
95 views

when building u-boot /bin/bash: arm-none-linux-gnueabi-gcc: command not found

I am currently running Ubuntu 12.0.4 on a 64 bit machine. I have an AM335X development board. Along with the kit came the compressed kernel (linux 3,2), rootfs, u-boot, and ARM cross compiler ...
0
votes
1answer
39 views

How to display all user and groups by command

I want to display 1. All users and 2. All groups in my pc by using command-line. users and groups displays users currently logged and groups a user is in respectively. How to display List of all ...
-1
votes
0answers
26 views

automate ssh commands and read output

I am working on my assignment where I have to enter a certain key on ssh terminal to open next problem. There are several candidate keys which I have shortlisted and i need to enter them via ssh, ...
0
votes
1answer
21 views

No package 'ncurses' found [duplicate]

I'm trying to install XWiimote and they tell me to run ./autogen.sh in the installation notes . This is the output: zorin@Samsung-NP300E4Z-S03TH:~/Downloads/xwiimote-master$ ./autogen.shlibtoolize: ...
2
votes
0answers
31 views

Echo difference between Ubuntu and Red Hat [migrated]

I have mostly been experimenting with Ubuntu but recently was using a Red Hat Enterprise system and was surprised at a difference I found setting and displaying env variables. In Ubuntu I might have ...
1
vote
1answer
35 views

Make password appear censored in bash script

I am going to make this short and simple. I am making a bash script where the user needs to enter their root password using the read command and it will be stored in a variable. What I don't like is ...