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

learn more… | top users | synonyms (5)

2
votes
1answer
71 views

Switching between console and GUI in ubuntu

When in GUI mode, is there a CLI commands that kills the GUI and drops me into the console? When in CLI mode, is there a CLI command that drops me into the GUI? I found startx, but this drop me into ...
1
vote
0answers
18 views

root login password when I never set it? [duplicate]

Sorry for too many duplicate questions about this. But I don't think any of the answers to these kind of question has the solution for me. As some users might have asked, how to set root login ...
0
votes
4answers
104 views

How to add words to a text file using just open terminal command (no editors) and then save the text file

I'm new to Linux. I need to edit .conf file from open terminal only and not using any text editors. That is, can I add words and sentences to a config file from open terminal? Example: command ...
5
votes
3answers
182 views

Evaluating a string in shell script

I am following this bash shell scripting guide: http://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html In the section Numeric Comparisons, it cites an example: anny > num=`wc -l ...
1
vote
1answer
30 views

Making more off forever in Octave

Octave by default uses the "more" command to page results. It is possible to type "more off" to stop that in the current session. How can I stop it permanently without passing that command to Octave? ...
0
votes
1answer
32 views

How to create /etc/.java/deployment directory

How to create /etc/.java/deployment directory and to move DeploymentRuleSet.jar file in that directory which sits on my desktop. I need this so I can use my netbanking but since I'm a new Linux user ...
0
votes
0answers
26 views

apt-get use different server? [duplicate]

I keep getting timeouts on the au.archive.ubuntu.com mirror how do I force apt-get to use a different one? it keeps telling me Failed to fetch http://au.archive.ubuntu.com/ various links 502 ...
1
vote
1answer
132 views

Change keyboard layout (English UK) on command line to English US

I am using Ubuntu 12.04. The keyboard layout is English US everywhere except for the Command Line where it works in English UK. Terminal also has English US. How do I change the default keyboard ...
2
votes
1answer
51 views

Lamp package lamp-server^, auto enter mysql pw?

Is there a way to pass the desired MYSQL password to the prompts in the apt-get install lamp-server^ package in a single command line? Note: I tried finding the package repository to read up on it, ...
5
votes
1answer
177 views

Disable internet connection from terminal!

The connect automatically option is allowed for my wired "Wired connection 1". Disconnecting the connection works when I do it from the panel's Network -> Disconnect menu. But when I do that with ...
0
votes
1answer
125 views

Reinstalling Ubuntu via Terminal

I've currently encountered some issues with ubuntu causing me to be stuck in tty mode. I already tried fixing the issue but since I'm not sure of what really happened for this issue to occur I now ...
3
votes
5answers
271 views

Identify duplicate lines in a file without deleting them?

I have my references as a text file with a long list of entries and each has two (or more) fields. The first column is the reference's url; the second column is the title which may vary a bit ...
1
vote
2answers
56 views

Help about sed command

A Linux textbook covering sed command gives me an example as follow: sed -e 's/\(<[^ ]*>\)\([ ]*\)\(<[^ ]*>\)/\3\2\1/g' GNU Linux is cool Linux GNU cool is but while I typing exactly ...
5
votes
3answers
175 views

“command not found” when using arithmetic expansion in bash shell

Using Ubuntu Desktop, I have terminal open and I am using the bash shell. One of the shell expansions of bash is the arithmetic expansion, with the following syntax: $(( EXPRESSION )) or $[ ...
4
votes
1answer
98 views

How do I recursively create a folder inside another unexistent folder?

I want to create this folder: $HOME/a/b/c/d while $HOME/a is not created! Is it possible by one line in Terminal?
1
vote
1answer
33 views

How to return to command line in 12.04 server

How do I return to the command line in Ubuntu 12.04 server when all there is, is a line with nothing but a flashing underscore on it. I typed a command wrong and it is stuck like this.
1
vote
1answer
88 views

How Do I Access Windows Shares From BASH?

Probably total noob question. I installed Ubuntu in a VMWare Player. Works fine. I usually work in terminal and didn't realise until today that I could use the Files icon to connect to my Windows host ...
19
votes
3answers
1k views

Ctrl+L in terminal

I accidentally typed ctrl + L in terminal and my terminal window jumped one 'screenful' size. I looked at the keyboard shortcuts in "Edit"->"Keyboard shortcuts" and didn't find that shortcut. What ...
1
vote
1answer
197 views

NDK_ROOT enviroment variable defined but script does not see it

In my ~/.bashrc i have this: export ANDROID_SDK=~/Devel/android_dev_x64/sdk export ANDROID_NDK=~/Devel/android-ndk-r9d export NDK_ROOT=$ANDROID_NDK export ...
0
votes
3answers
30 views

Cannot acess my own Username directory

My directory root is: $home/pk The problem is that I'm unable to enter into home directory. When I type commend cd /pk, it gives an error, saying file or directory not found. When i type -ls command ...
4
votes
2answers
98 views

Moving files from several subdirs to a main dir

So I recovered all the files that were still available on a corrupted external drive using testdisk. Now I want to sort out the different file extensions and copy them to their respective newly ...
3
votes
5answers
243 views

How do I make the shell to recognize the file names returned by a `ls-A` command, and these names contain spaces?

This is the part of the script I am using to rename the files returned by ls-A: for FILE in `ls -A` do ext=${FILE##*.} NUM=$(($NUM+1)) NEWFILE=`echo $2_$NUM.$ext | sed 's/ ...
1
vote
3answers
31 views

How to get the list of installed library packages only?

I want to get the list of installed library packages only from terminal. Is there any command for that?
1
vote
2answers
41 views

Echo command with color option in script and command works differently

If I run echo -e "\e[1;31mThis is red text\e[0m" in comand line, It prints out red text. However, if I use write it in script file test.sh #! /bin/bash echo -e "\e[1;31mThis is red text\e[0m" run ...
0
votes
0answers
40 views

Escape character ^] not working from Mac terminal [migrated]

If I ssh into an Ubuntu machine and run telnet localhost 4730 I see: me@ip-10-xx-xxx-30:~$ telnet localhost 4730 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. But ctrl + ] ...
1
vote
2answers
38 views

How to know the time/date of when the packages are installed?

I installed and removed so many packages on my system.But it don't know when it was installed and when it was removed. I want to know when the packages are installed on my PC.
0
votes
3answers
52 views

Is that possible to cut down the terminal prompt text? [duplicate]

While opening my gnome-terminal, it looks like this avi@avi-Lenovo-IdeaPad-Z500:~$ I want to cutdown the prompt text and make it to appear like this, Z500:~$ Is that possile? If yes, then how?
6
votes
2answers
392 views

How to replace a string on the 5th line of multiple text files?

I want to replace the 5th line of multiple text files (file1.txt,file2.txt,file3.txt,file4.txt) with the string " Good Morning " using a single terminal command. All the text files are located on my ...
0
votes
0answers
33 views

Cursor positioning using mouse in bash possible?

In Vim I can actually position the cursor in insert-mode using the mouse. So I assume this should (technically) also be enable-able for the bash. Is it possible? This would be quite useful at times ...
0
votes
0answers
18 views

Accessibility bus warning when opening files in Eclipse from command line (Ubuntu 13.10)

Similar to closed issue Gnome Menu Broken? When opening a file from the command line for edits in Eclipse , I get this warning: ** (eclipse:nnnn): WARNING **: Couldn't register with accessibility ...
0
votes
0answers
58 views

Use terminal to translate some text [duplicate]

With my daily work I need to translate some words frequently and it's exhausting to do it with google translate each time since I have to leave my terminal to do so :). So is there a way that could ...
4
votes
7answers
282 views

How can I list all applications installed in my system?

I know, I just can hit Super+A to see all installed apps in Ubuntu, but I need a command to list their names. The command dpkg --get-selections | awk '{print $1}' is also not an option because it ...
1
vote
1answer
35 views

How to find name of the virtual machine Ubuntu server is being hosted on?

Is it possible to find out what version and what type of virtual machine is my ubuntu server being hosted on its on a remote server?-Thanks in advance.
2
votes
3answers
46 views

How to close/end/terminate an accidental “if” in the terminal?

So tab completion is great... unless you're a n00b... and you type the first part of ifconfig and then hit tabenter real quick... in which case you end up with: (not actual terminal input) ~$ if ...
0
votes
4answers
63 views

How to remove a path from system path(`$PATH`) using terminal commands?

I added a directory path to system path($PATH) by running, export PATH=$PATH:/home/avinash/Desktop/raj Now my path look like this, $ echo $PATH ...
2
votes
1answer
73 views

Is there a terminal commands cheat sheet application?

I stumbled upon a terminal cheat sheet here and I started wondering if there was anyway to display this in Ubuntu 12.04, much in the way that holding the [Super] key displays tips for window managing ...
1
vote
2answers
28 views

How to know the release date of my BIOS version

It's pretty easy to check the release date of BIOS version directly from the terminal emulator using a simple single command. So how to do that?
0
votes
1answer
37 views

A command to add a customized icon or symbol to Plasma's Default Panel

Is there a command, that can add/remove a simple icon in KDE environment tray or anywhere in plasma's Panel (taskbar)? I need a customized notification icon or any other persistent symbol which shows ...
0
votes
0answers
30 views

How to get matlab input from hadoop streaming -input

I am using matlab for image processing. Now i want to deploy this in hadoop streaming for grid computing purpose. how to invoke my input from hadoop streaming -input. I got error when i did like this ...
2
votes
1answer
46 views

How to give a quicklauncher or shortcut administration privilege?

I have a quicklauncher in a plasma widget (which is the same as a shortcut) which runs a command which needs administration privilege. I use the quicklauncher frequently and do not want to type root ...
3
votes
2answers
45 views

How to know all files in Ubuntu having stickybits?

I now understand sticky bits and why I should use them based on my question: What is the "sticky bit" (t permission) and why does /tmp have it? Now I have a new question. How could I ...
1
vote
1answer
28 views

List all manually installed packages similar to history.log file

I searched the whole internet for this but did not find any satisfactory answer for this question. aptitude search ‘~i !~M’ | less does not show the manually installed packages. On my system it ...
0
votes
2answers
15 views

Going into Substitute user [duplicate]

I can't seem to be able to type in a password so that I may acquire access to #apt-get. I'm looking to update my system via terminal, but typing out my password does no good to get me into su, as the ...
4
votes
0answers
102 views

14.04: after a recent update, bash completion is broken in specific cases [closed]

After some unspecified point in the past, my bash completion has acted strangely: if I begin a filename to complete with ~/, I cannot complete filenames, only directory names, and the suggested ...
0
votes
1answer
19 views

File counts not adding up: finding files ls -a misses

Filelight alleges that I have 112,028 files in my home directory, on the first level (not recursing). But: ls -1a ~ | wc -l thinks I have 225. find ~ -maxdepth 1 | wc -l says 224. The difference ...
1
vote
2answers
118 views

How can I check disk space used in a partition using the terminal in Ubuntu 12.04 LTS?

I am using Ubuntu 12.04 LTS and I was wondering if there is a command that can tell the space used in a partition using the terminal. Like I want to use the su command to change to a user called admin ...
32
votes
5answers
2k views

How to copy a file to multiple folders in Terminal?

I have tried to copy a file test.txt to multiple directories with one command: cp ~/test.txt ~/folder1 ~/folder2 But I didn't succeed. Is there a way to do that in one command so i can copy a file ...
4
votes
2answers
64 views

A setting which disables a network connection after a specified period

Is there any program or setting which can automatically disable a network connection after 5 minutes when it is enabled manually? So that the user will have to enable the connection every 5 minutes ...
0
votes
0answers
27 views

ddrescue does not log after the option is set

I'm trying to use ddrescue with the log option, but it's not working. So I have 2 HDs: /dev/sda - working /dev/sdb - bad I'm booting from a live USB disk (Ubuntu 12. 04. 4 LTS) So, I mount the ...
3
votes
1answer
38 views

How can “git gui” open repository from parent directory?

I start Git GUI tool using command git gui or git citool. I wanted to add another entry to right click script menu (already have dozens of commands) and created a script like this: #!/bin/sh git ...