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

learn more… | top users | synonyms (5)

9
votes
4answers
2k views

How to make in CLI check for updates to be happening every 4 weeks and install them automatically without going to Software sources?

I have a set of custom commands I run on my computers after I install them. How do I make Ubuntu check for updates every 4 weeks and install them automatically on check? I would need this done via ...
5
votes
4answers
3k views

I would like to create a log of all commands typed in terminal

I would like to have a log of all command that are typed on the terminal. I have check "script" but this generates a file with the commands and the responds all together. Is there a way to have the ...
4
votes
2answers
898 views

How to list currently not installed packages?

I'd like to output a list of all currently not installed packages (they are visible in Synaptic for example) using only shell commands. How do I do this? Thanks!
1
vote
2answers
2k views

XFCE shortcut problem

Every time, when i hit k button in a terminal window in vim, so it happens fairly often, it invokes the Find pop-up. I could not find where this can be turned off. I do not have this problem at home ...
43
votes
6answers
13k views

What is the difference between ./ and sh to run a script?

I have written a simple script. When I runsh <myscriptname.sh>, i got the correct output, but when I run ./<myscriptname.sh>, I got an error. What is difference between when I do sh and ...
2
votes
2answers
832 views

SSH Key problem

I want to setup my home server to use ssh keys but when I follow the tutorial on https://help.ubuntu.com/10.04/serverguide/C/openssh-server.html for setting up ssh keys I get this: Bad port 'umask ...
28
votes
3answers
5k views

Remove note about sudo that appears when opening the terminal

Whenever I open the terminal, To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. appears before the terminal. How do I get that to go ...
8
votes
4answers
1k views

Two gedit plugins clash. How to change shortcut keys, or enable/disable a plugin

Gedit has two plugins from Gnome's Gedit Plugins page which I both particularly want... Multi-edit Control Your Tabs However they both vie for the same shortcut keys: Ctrl+PageUp and ...
2
votes
1answer
2k views

How to set port forwarding to use terminal server client?

I'm using the terminal server client in Ubuntu to connect to a Windows machine in another location but I don't get it to work. I wonder what should be the port forwarding setting so I can connect. So ...
2
votes
0answers
7k views

How to auto-boot into text mode? [duplicate]

Possible Duplicate: How to disable X at boot time? How to configure my Ubuntu 10.10 Desktop (Maverick) to start in a Terminal like mode? I don't want any graphics. I can't get rid of GDM. ...
10
votes
5answers
16k views

How do I make urxvt render xft fonts?

I wonder whether there's a way to make urxvt render xft fonts: URxvt.font: xft:Droid Sans Mono Slashed:pixelsize=9:Regular URxvt.boldFont: xft:Droid Sans Mono Slashed:pixelsize=9:Bold ...
10
votes
3answers
1k views

High resolution CLI?

I want the resolution of my console to match my screen resolution(1440x900). 1024x768 works fine but for some reason when I put 1440x900 when I switch to ttyX the command prompt is almost right off ...
5
votes
2answers
3k views

always prompt the user before executing a command in the shell

Is there a utility that always prompts the user for confirmation before executing a command similar to the way sudo asks for password?
6
votes
0answers
440 views

How do I enable the terminal bell? [duplicate]

Possible Duplicate: Beep in shell script not working? When using the Terminal application in Ubuntu I never seem to hear any alerts. How do I turn these sounds on? I've tried looking in ...
7
votes
1answer
4k views

Lock Tmux Session With Vlock

I have just installed tmux and vlock. When I try to perform the lock-session command, my terminal flashes and then nothing happens. Is there something in my .tmux.conf that must be added to tell tmux ...
36
votes
5answers
48k views

Can I install extra drivers via the command prompt?

Since I can't seem to open the Additional Drivers program? And how do I know what driver I need to install?
10
votes
2answers
9k views

How to log CPU load?

How to log CPU load to a file in order to investigate a problem?
0
votes
4answers
764 views

Why don't those winepath commands work?

I tried code from this question and for some reason they do not work, why and how to fix them? a@ubuntu:~$ echo "#!/bin/sh" > ~/bin/run_linx_program bash: !/bin/sh": event not found a@ubuntu:~$ ...
3
votes
1answer
256 views

Meta package / quick reference for command line string manipulation tools?

The latest version of the Scribes text editor lets us select some text, hit Alt+X, and then run an arbitrary command. For example, I can run the sort command and the selected text is replaced ...
6
votes
2answers
1k views

How do I use bash's “<<” operator?

I know bash has a >> operator, to append output to files, but what is the use of the << operator?
67
votes
4answers
161k views

How to create an empty file from command line

How can I create an empty file from the command line?
33
votes
1answer
82k views

Command to append line to a text file without opening an editor

Assuming i have a line that i want to add to a file without opening an editor. How could i append this line alias list='ls -cl --group-directories-first' to this file config.fish
25
votes
3answers
12k views

How do I find the build dependencies of a package?

I'd like to find out which packages sudo apt-get build-dep <package> would install (if I already got some dependencies installed, I'd also like to see those → so running or simulating the ...
5
votes
1answer
1k views

How to disable right-click menu in terminal?

I'd like to disable right-mouse-click pop-up menu in Ubuntu terminal so that mouse right click to be passed to the application (Midnight Commander, to select files with the right mouse button). How to ...
18
votes
7answers
50k views

Create USB installer to install Ubuntu from the command line?

I'm trying to create a bootable USB image to install Ubuntu on a new computer. I have done this before following the "create USB drive" instructions for Ubuntu desktop, but I don't have an Ubuntu ...
16
votes
7answers
2k views

Which aliases do you find most useful or helpful to your Ubuntu experience?

Since first becoming an Ubuntu user I have developed a growing list of aliases, and there are some that I cannot imagine being without. This makes me think that there are probably still tons of ...
1
vote
2answers
295 views

Avoid dialogue by opening a shell script?

When i have an executable script and i runs it by double-clicking it in Gnome. It opens a dialoguebox that asks, what is intended to do: execute in terminal view cancel execute Is there a way to ...
5
votes
2answers
3k views

Shell command to bring a program window in front of another?

Does a shell command exist to bring a already started program in gnome in the front of another. i.e.: Gedit and Nautilus are started. Nautilus is in the background and Gedit in the foreground. How ...
2
votes
1answer
547 views

Most commands won't do anything if I use the console at my Ubuntu server. Why?

I've bought a vps server a few days ago, with Ubuntu on it, but I have a problem now. By nearly all the commands I put in I get this error: : command not found. I am logging in as root. I think this ...
5
votes
2answers
1k views

Good tutorial on grep, sort, unique and tools like that

I don't even know how those tools are called together, but i think they make linux a very powerful OS. Do you know any good tutorials to learn those?
3
votes
1answer
11k views

How can I edit my httpd.conf file?

I have XAMPP installed, and need to edit my httpd.conf file to add a virtual host block. If I right-click on the file in Nautilus and open with gedit, I can see all the content, but it's read-only. ...
42
votes
2answers
49k views

How to get disk usage from command line?

How can I get the current disk usage (in %) of my hard drive from the command line?
11
votes
4answers
35k views

sudo: source: command not found

I've been updating some of the default profile for bash, and saw from the tutorials I was following that I could reload the new profile with the new environment settings by using: source ...
2
votes
4answers
166 views

Is there a app / command that will hunt for files

Is there a app / command that will hunt for specified files ( thumbs.db, .m3u and similar ) files across my home dir and delete them?
5
votes
2answers
763 views

How do the environments of a standard Terminal command-line and a bash script differ?

I know there is something different about the environment of the Terminal command-line and the environment in a bash script, but I don't know what that difference is... Here is the example which ...
7
votes
2answers
3k views

Is it possible to save output from a command to a file after the command already has been executed?

Does an elegant way exist to save the output of a command to a file after the command has been run, with the terminal window is open? I mean once the command has been executed in the terminal. The ...
5
votes
5answers
1k views

Is there a command-line utility app which can find a specific block of lines in a text file, and replace it?

UPDATE (see end of question) The text "search and replace" utility programs I've seen, seem to only search on a line-by-line basis... Is there a command-line tool which can locate one block of ...
23
votes
3answers
7k views

Redirect the output using `sudo` [duplicate]

I have a small question regarding using sudo with output redirect >. To enable IP forwrding, someone can use the command: echo 1 > /proc/sys/net/ipv4/ip_forward Executing this command will ...
5
votes
5answers
5k views

Concatenating several .mp3 files into one .mp3

As it was suggested here I am using cat command to concatenate several .mp3 files into one .mp3 file. Imagine, I have following .mp3 files in the current folder: 001001.mp3 001002.mp3 001003.mp3 ...
5
votes
3answers
5k views

Diffrence between two dirs?

I have two identical folders, but the are not identical(for example Java installation dir). One dir has one extra file and one file has been changed. Is there any easy to use tool to check that or do ...
70
votes
4answers
89k views

Find and replace text within a file using commands

How can I find and replace specific words in a text file using command line?
18
votes
7answers
28k views

How to run a script without closing the terminal?

I have a script in file bla.sh and it is executable. When I click on it, the script is executed and the window is closed. I'd like the window to stay open. Something like command cmd /k** command in ...
2
votes
1answer
1k views

How can I force fish to save new key bindings persistently after closing a terminal window?

How can I force fish to save new key bindings persistently after closing a terminal window? At the moment i have the problem: I open a terminal window, the default shell is fish. I add a key ...
19
votes
6answers
11k views

Differences between doublequotes “ ”, singlequotes ' ' and backticks ´ ´ on commandline?

I often see tutorials on the web or posts on this site which make heavy use of the following characters at the command line. Often it seems that they are used for pretty similar purposes. What are the ...
1
vote
1answer
169 views

Add binding to fish that not auto executes the string?

How do i set up a key binding in fish, so that fish understands not to execute the bindingstring after appending it to commandline but just appending it as string to commandline. I want to set up a ...
4
votes
4answers
2k views

Battery loading state on commandline?

Sometimes the energy status applet on my gnome panel suddenly disappears. Is there a simple command to print loading state of the battery at commandline?
18
votes
4answers
20k views

Command to open a URL?

My question is pretty simple: Is there a command I can use in bash that will open a specific URL in the default browser?
2
votes
3answers
892 views

Is it possible to use two different shells for different terminal windows?

Is it possible to use another shell for scripts than for standard terminal use? The problem is, i use fish as shell at the moment and i find i very convenient. But i would like to learn a bit of ...
31
votes
6answers
31k views

Beep in shell script not working?

I'd like to use a beep sound in a shell script. Unfortunately none of the methods I found via Google work for me. I tried echo -e '\a' echo -ne '\007' and the command beep after I installed it ...
16
votes
1answer
11k views

“sudo cd …” one-liner?

Occasionally I want to cd into a directory where my user does not have permission, so I resort to sudo. The obvious command sudo cd somedir doesn't work: $ sudo mkdir test $ sudo chmod go-rxw test $ ...