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

learn more… | top users | synonyms (5)

4
votes
2answers
875 views

How to use guake at right side monitor in dual display environment

I want to use Guake at right monitor. So I added this ppa by sudo add-apt-repository ppa:cberner/guake, and sudo apt-get update. ...
2
votes
1answer
18k views

Is it possible to use Ifconfig to switch an interface to DHCP and if not, what is the best way?

I have just set up a new Ubuntu server and I am going to be doing a lot of networking tests. During setup, I simply skipped the network step. I now need to switch between DHCP and an address quite ...
33
votes
3answers
63k views

How do I find the version of bash I am running?

(learning bash) I was trying to check the bash version so I typed /bin/bash -v. That outputted a whole lot of text to the screen (contents of .bashrc, and other files sourced from it). Could I have ...
1
vote
2answers
1k views

Rerun previous command under sudo

I want to be able to run a command, it fails cause it doesn't have proper permissions. Then I can write "please" to sudo the command I just ran. Here's what I want to do in the terminal: $ run ...
13
votes
7answers
3k views

Auto complete for often used command line commands?

For some projects I often type in a couple commands, like for example: cd an/extremely/long/path/in/which/I/have/some/kinda/project and ./runmyproject --with some --command line --options set ...
2
votes
2answers
24 views

How to get the default screenshot tool?

I want to get user's default screenshooter application. Like, in a fresh install Ubuntu, it is gnome-screenshot, or in Xubuntu it is xfce4-screenshooter. Or maybe Distro A's screenshooter is ...
1
vote
1answer
2k views

ShellShock - bash already updated?

I'm trying to fix this new ShellShock bug on my PC (running Ubuntu 14.04). From what I've gathered, the simplest way to do this is to just update bash via the terminal (I've tested my system for the ...
0
votes
0answers
22 views

How to make special new folder in right click? [duplicate]

I want to create folder but it's name date of current day. I know how to make it in terminal by this command: mkdir $(date -I) How to add this to right click to be easy?
1
vote
1answer
8 views

What init files will be read when opening a new tab and a new window of gnome terminal?

If I am correct, I remember that opening a new tab in genome terminal will run .bashrc, and opening a new gnome terminal window also will. Do these two read the same init files of bash? E.g. ...
1
vote
4answers
153 views

How to write the path of a folder with space in it's name? [duplicate]

I can't figure out how to write the path of a folder that includes spaces in its name (in Terminal). I tried: cd /path/path/path/"A Folder"/file cd /path/path/path/'A Folder/file cd ...
2
votes
6answers
638 views

How to command grep not to display the searched string?

I want to print a part of a line in a file. The whole line looks like this. Path=fy2tbaj8.default-1404984419419 I want to print only the characters after Path=. I have tried grep Path filename | ...
0
votes
1answer
30 views

SH file not executing successfully

I am new in linux. Trying to run sh file which connects the server over FTP or VSFTPD and get some files. Here is my Script #!/bin/sh HOST='IP_ADDR' USER = 'user' PASS = 'password' FILE = ...
1
vote
2answers
38 views

Shell script running but not opening terminal [duplicate]

I'm having a problem executing a shell script in ubuntu, the script is set as executable and I enabled the execute instead of view option in Nautilus and the script does what it's meant to do which is ...
2
votes
4answers
1k views

How do I change to ksh?

I need to learn some ksh details, but i don't want to change from bash to ksh permanently. What should i do? Is it possible to change shell only for a specific console session?
0
votes
0answers
23 views

Strange characters inserted before username both in Terminal and Tilda terminal emulator [duplicate]

Started noticing some odd behavior when using Gnome Terminal, Tilda terminal emulator also a couple days ago. Basically whenever I launch a fresh instance of either application (new tabs also) I get ...
0
votes
0answers
37 views

Terminal Crashed in Ubuntu 14.04 LTS

When I open a terminal. I can't input commands directly. I must use CTRL + C first. Then, steven@steven-Latitude-E6540:~$ apears and I can input commands. If I don't input anything before 10 seconds, ...
8
votes
3answers
7k views

How do I disable a touchpad using the command line?

Is there a way to disable a touchpad using a terminal command?
0
votes
1answer
23 views

Cant make file executable in gui or terminal

I have recently installed a fresh version of crouton on my Chromebook with unity and ubuntu. I have been trying to make my files executable in the GUI, but every time I click the box it turns back ...
0
votes
1answer
41 views

Console errors are not being shown

The problem is no errors are being shown even when I type wrong command as shown. There are several cases: bash> blablabla bash> man blablabla The output of lsof -a -p $$ -d0,1,2 gives the ...
0
votes
1answer
30 views

Why am I getting a mkdir error with this sudo mkdir /var/www/magento-dev.local/public command?

I'm trying to install Magento on an Ubuntu 14.04 server. I created a file called magento-dev.local in the /etc/apache2/sites-available/ directory. that has the following contents: <VirtualHost ...
4
votes
2answers
79 views

How to combine multiple text files into one text file ordered by date created?

I'm a newbie so please help: I keep a journal on my iPhone using Scratch that outputs all notes I make to a separate .txt file stored in Dropbox. I have this synced with my Ubuntu 14.04 system, so ...
2
votes
2answers
23 views

Listing and removing albums with too small audio bitrate

I'm cleaning my music library and got stuck with getting rid of thousands of albums with bitrate <320kbps which gathered there for years. Checking single files bitrate and deleting whole folder by ...
0
votes
4answers
36 views

How to open bash files with terminal?

I am new to Ubuntu and I just started learning bash. How can I open bash files through terminal?
1
vote
3answers
25 views

split string with a certain character to form a path

I have a string abc_d_e75_f10_xyz_l_11 I want to split it so that I want to construct a string of an existing directory from this string to cd to it. So in this example abc_d_e75_f10_xyz_l_11 I want ...
0
votes
1answer
20 views

why i can't upgrade and manage my packages

why when i tried to upgrade or remove something this message comes in: "E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem." what should i have to do ...
2
votes
3answers
80 views

Search for a files that matches another file name in another folder

I have some files in a folder, which are named ***_code_c**** (where * represents any letter or number). I have another folder that have many files, folders and subfolders inside it. What I want to do ...
2
votes
2answers
77 views

how to see the PID for currently running command?

while reading about linux I got : By default, variables created within a script are only available to the current shell; child processes (sub-shells) will not have access to values that have ...
0
votes
0answers
121 views

Error In Phonegap and android while creating project

error in creating phonegap project Creating android project... /home/akarshnagariya/.cordova/lib/npm_cache/cordova-android/3.6.3/package/bin/node_modules/q/q.js:126 throw e; ...
4
votes
1answer
56 views

Adding unread message count to terminal command prompt

I want to see the number of unread messages in my unix mail messages account in the command prompt. How can I do this? Update: Here is the output from mail and mailx when I have sent myself two ...
1
vote
5answers
54 views

Is there a way to check which font your shell/terminal emulator is using from the commandline?

Is there a way to check which font your shell/terminal emulator is using from the commandline? I am willing to settle reading part of a config file, if a direct command is not readily available.
1
vote
2answers
45 views

How do you clear, delete, or hide a portion of your history in the Terminal?

clear will not work, because that clears your screen. What I am looking to do is just hide, delete, or obfuscate a portion of history on my display in my session, namely a command that I inputted that ...
0
votes
0answers
36 views

Another “Some index files failed to download”-error, but there's no 404 error

everyone. I know that there have been other error reports similar to this one, but none with quite my same experience. I'm running Ubuntu 14.04 (32-bit) on an Acer AspireOne with 2 GB RAM, an ...
77
votes
5answers
337k views

How to delete a non-empty directory in Terminal?

How do I delete the following directory? I typed: rmdir lampp This error comes up: rmdir: failed to remove `lampp': Directory not empty Is there a command to delete all the files in the ...
0
votes
2answers
39 views

Rename files in subfolders with parent folder names

I have a main directory that has four folders f1, f2, f3 and f4 each of these folders has 10 folders, and each of these 10 folders ff1...ff10 has some .jpeg images with some names lets say image1.... ...
0
votes
1answer
11 views

cannot start Ubuntu desktop from console

I am trying to re-enter my ubuntu desktop 12.04 LTS after an upgrade that failed due to the computer going out of power during the upgrade. Since then, when I log in with my password, I get onto the ...
3
votes
3answers
257 views

Delete files and folders with specific name from a certain directory

I have a folder /home/userA/folderA this folder contains many files and folders and subfolders. What I want to do is to delete all files that have certain names data.txt and glass.txt. I also want to ...
0
votes
1answer
14 views

Folder path in terminal too long [duplicate]

When i'm in a deep folder hierarchy the entire list of folders are seen before $ How can i make this short even though i'm in the same folder.
0
votes
1answer
68 views

How to print out the command result right front of command prompt?

Is it possible to get the result of echo command right after command prompt without printing them in new line and below command prompt? Something like this: kasiya@kasiyaPC:~$ echo 'Hello World!' # ...
1
vote
1answer
32 views

How to enter part of a command automatically, after another command executed?

I want to create a function for grep-ing my command line history by history | grep {keyword}. And after seeing the list and choosing the command by line number ,I want to execute it by !{line_number} ...
61
votes
11answers
75k views

How to check battery status using terminal?

I would like a command that check the battery status through the terminal
7
votes
5answers
3k views

Command-line to switch between profiles in gnome-terminal

I created a new profile for gnome-terminal and I can switch between "Implicit" profile and the new created profile as you can see in the below image: Now I wonder how can I switch between profiles ...
1
vote
1answer
248 views

Startup script can be run multiple times despite pid file

The reason I'm doing this script is because I want to daemonize supervisord: right now I'm in a cloud host in which I don't have access to the /etc or the sudo command; this script is my best attempt ...
2
votes
0answers
24 views

How to mute sound effects in 14.04 via the command line?

Using the command line, I want to mute the sound effects in Ubuntu 14.04. The GUI way of doing so is going to System Settings (unity-control-center), then going to the Sound Effects tab: The answer ...
5
votes
2answers
131 views

How can I delete numbered files in a given range?

I have folderA that has some files with a number sequence starting with a_000000. What I want to do is to delete files starting from a specific number: let's say a_000750 till the end of files in this ...
0
votes
1answer
24 views

error while install app from terminal [duplicate]

many masters in here. I just have some problem while installing software via terminal. for example, I want to install wine with the code sudo apt-get install wine. But terminal said this: Reading ...
0
votes
0answers
22 views

How does gedit detect the encoding of a text file?

How does gedit detect the encoding of a text file when opening it? I notice that gedit can always find the correct encoding when opening a text file of mine, while chardet can often fail to and ...
0
votes
0answers
6 views

Linux User Group in Ventura County, CA [on hold]

(I hope this webpage allows me to ask this...) Anybody in Ventura County, CA (93010) can come if they want to, to the Linux User Group in Camarillo. Jsut contact me at troysweeney@programmer.net or ...
3
votes
2answers
7k views

Terminal does not start; how to fix it?

When I try to start the Terminal (Applications -> Accessories -> Terminal), it does not start. I get a "Starting Terminal" entry in the taskbar. After a few seconds, it goes away. No terminal appears. ...
1
vote
5answers
11k views

Command to unmute and maximize volume?

I need to mute/unmute from the command line. I found out that I can do it with: amixer sset Master mute amixer sset Master unmute the problem is that the command for unmute is not working (as ...
15
votes
4answers
18k views

How can I know how long `dd` cloning will take?

I have to dd a couple of 1TB hard drives. They are taking several hours to clone and I was wondering if there was any way possible of knowing how fast they are going, how much they have done and how ...