A shell is software that lets users interact with the operating system, usually by typing at a command-line.

learn more… | top users | synonyms

105
votes
11answers
80k views

How do I detach a process from Terminal, entirely?

I use Tilda (drop-down terminal) on Ubuntu as my "command central" - pretty much the way others might use GNOME Do, Quicksilver or Launchy. However, I'm struggling with how to completely detach a ...
65
votes
3answers
19k views

What is the difference between shell, console, and terminal?

I'm confused with the terminology. What is the difference between shell, console, and terminal?
19
votes
3answers
7k views

Screen a running process

Sometimes I forget to run a program under a screen session and can't stop it in the middle, and I know it's going to take long. Is there a way to screen an already running process without restarting ...
6
votes
2answers
311 views

How to correct the unrecognizable code in my debian?

After running programs that output unrecognizable code, the whole shell would be full of unrecognizable code. How can I correct this?
88
votes
15answers
43k views

How to execute a command whenever a file changes?

I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with ...
4
votes
4answers
13k views

Accidentally deleted the Downloads folder, a windows “Special Folder”, how to restore?

I deleted the Downloads folder in my Windows 7 home directory (which I had moved and renamed to incoming) I was able to restore the folder from a backup, this restores the contents as well as ...
169
votes
12answers
25k views

How can I change to the previous directory instead of going up?

I currently spend a lot of my working hours moving back and forth between two paths which are very far down the tree and divert from each other at root. It strikes me that my life would be a lot ...
40
votes
3answers
65k views

How to make new file permission inherit from the parent directory?

I have a directory called data. Then I am running a script under the user id 'robot'. robot writes to the data directory and update files inside. The idea is data is open for both me and robot to ...
47
votes
7answers
37k views

What to do when Ctrl + C can't kill a process?

Ctrl + C doesn't always work to kill the current process (for instance, if that process is busy in certain network operations). In that case, you just see "^C" by your cursor and can't do much else. ...
15
votes
3answers
5k views

Use GNU screen as login “shell”

What's the best way to have screen automatically run when you open a new shell, whether by login, xterm, or anything else? I see the most common recommendation is to put exec screen in your regular ...
13
votes
9answers
9k views

Command aliases in Command Prompt?

How can I make command aliases in Windows' Command Prompt like I would with bash? I found out about doskey in a forum thread, so I can do something like: doskey ls=dir /b ...and now the command ls ...
67
votes
11answers
39k views

How to reliably keep an SSH tunnel open?

I use an SSH tunnel from work to go around various idotic firewalls (it's ok with my boss :)). The problem is, after a while the ssh connection usually hangs, and the tunnel is broken. If I could at ...
80
votes
7answers
65k views

What does 'source' do?

$ whatis source source: nothing appropriate. $ man source No manual entry for source $ source bash: source: filename argument required source: usage: source filename [arguments] It exists, and it is ...
55
votes
1answer
44k views

How do i change my default shell from bash to zsh?

I want to change my shell from the default bash shell to zsh on my Amazon EC2 instances. How do I go about doing it? Thanks!
38
votes
2answers
6k views

Case insensitive tab completion in Bash

Is there any way to make Bash tab complete case insensitively? $ bash --version GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) Copyright (C) 2007 Free Software Foundation, Inc. I am ...
19
votes
6answers
79k views

How do I run the Windows 7 Explorer shell with Administrator Privileges by default?

The Windows 7 shell (Explorer) can be made to run with Administrator privileges by this manual process: Kill Explorer shell by holding down Shift+Ctrl, right-clicking the Shut down button in the ...
14
votes
3answers
12k views

How do I fork a process that doesn't die when shell exits?

If I run emacs from the shell: $ emacs foo & and then kill that shell, emacs dies. How can I run a command so that it will not die when the shell dies? I found references to nohup, but that ...
9
votes
1answer
2k views

How do I make OS X set the terminal title back to the original title when coming back from ssh?

Starting on OS X, I ssh into foo (a Linux box). My terminal title changes to foo. I then ssh into bar (another Linux box). My terminal title changes to bar. I log out of bar. My terminal title ...
9
votes
2answers
5k views

http get from the shell in Mac OS X

I'd like to download a link like: http://example.org/file.mp3 Now, I'm enough of a shell junkie to know what SCP does, but that's about where my geek-dom ends. So is there a shell program that lets ...
1269
votes
7answers
136k views

How do I make a machine “blank screen” for a period of time (as a penalty) if certain noise levels are reached?

My kids (4 and 5) yell a lot when playing games on the computer. I found an effective cure for this. When I hear loud noises, I ssh into the game computer and do: chvt 3; sleep 15; chvt 7 This ...
147
votes
6answers
95k views

How to chmod 755 all directories but no file (recursively)?

How to chmod 755 all directories but no file (recursively) ? Inversely, how to chmod only files (recursively) but no directory ?
79
votes
5answers
29k views

Scroll shell output with mouse in tmux

Mouse scrolling doesn't work in tmux the way it works when I run shell without tmux (in Gnome Terminal). It seems tmux sends mouse scroll events as if I pressed Up/Down keys. But I want it to scroll ...
20
votes
4answers
16k views

Byobu versus gnu screen versus tmux

So far I have used konsole to manage multiple shell sessions but it seems that byobu, gnu screen, and tmux offer a better support for multiple shells. I have never used neither of them before. One of ...
36
votes
6answers
21k views

Reload a Linux user's group assignments without logging out

When assigning a user's secondary group list using: # usermod -G <grouplist> <user> is it possible to force this group assignment to take effect without logging out all running ...
36
votes
4answers
9k views

What is the origin of the UNIX $ (dollar) prompt?

The UNIX prompt uses a $ symbol to indicate that your input is expected. I was wondering why this symbol was chosen -- if there is a reason. Dollar just seems a little unexpected. A > would have been ...
13
votes
4answers
2k views

A command before every bash command

Does anyone know a mean of putting a 'time' command before every command in a bash session?
13
votes
5answers
5k views

How to retrieve the absolute path of an arbitrary file from the OS X

I'm looking for a simple command that can be used within Bash to find the absolute and canonicalized path to a file on an OS X (similar to `readlink -f' under Linux). The following sample bash ...
23
votes
4answers
2k views

Difference between “a=b” and “export a=b” in bash

What's the difference between: a=b and export a=b In bash? I understand that they both define environment variables, but I don't fully understand the difference.
14
votes
5answers
16k views

How can I do a recursive find and replace from the command line?

Using a shell like bash or zshell, how can I do a recursive 'find and replace'? In other words, I want to replace every occurrence of 'foo' with 'bar' in all files in this directory and its ...
12
votes
4answers
2k views

Equivalent/Alternatives for Alt+Dot in Mac

One thing i miss from the Linux shell is the Alt+Dot shortcut. What it does is insert the last argument of the previous command. It appears to be a trivial technique, but it's really useful. i.e. if ...
8
votes
2answers
461 views

Can I keep . and .. out of .* expansion?

I often find it annoying (or worse) when I type command .* in bash and the command applies to the parent directory and current directory. Is there some shell option or other configuration I can ...
7
votes
2answers
665 views

How do I delete a file named “-p” from bash?

How do I delete a file named -p in bash? Trying rm "-p" complains that -p is not a valid argument.
2
votes
3answers
4k views

How do I set my shell in Mac OS X?

I know I can set "Shells open with" in the Terminal preferences, but I'm curious if there's any system-wide way of setting this (similar to updating /etc/passwd in some Unixes).
5
votes
4answers
5k views

Unix command to list all directories larger than 10mb

Is this possible, and what would the command be?
4
votes
2answers
5k views

How to extract a single folder and its subfolders from a “tarball” (.tar.gz)

I need to extract a single folder and its subfolders from a tarball (.tar.gz) on a CentOS server. I haven't the slightest clue how to do it using an SSH terminal. I tried: gunzip -c ...
4
votes
11answers
35k views

How to shut down a computer having a particular IP address?

If we have a collection of Windows and Linux computers on a LAN, is it possible to shutdown a computer having a specific IP address, using the Linux shell? Assume that I do not have ssh or telnet ...
1
vote
1answer
535 views

Shell Shortcuts in Windows OS

to open send to folder in windows 7, we type shell:sendto and to open apps folder in windows 8, we type shell:appsfolder first of all, i would like to know what is this syntax known as (shell: ...
6
votes
7answers
392 views

Can I shorten my directory commands in Ubuntu?

When working on a rails app I like to open all of my files through the command line like so CD my_app gedit app/views/user/show.HTML.erb Is there a way that I could shorten this so that I could ...
6
votes
3answers
23k views

How can I disable the CTRL-ALT-DEL key combination completely on XP/Vista/7?

I have been googling extensively to figure this out, and nobody seems to be able to give a direct answer. Let me start by saying that I'm NOT talking about requiring CTRL-ALT-DEL to enter logon ...
3
votes
4answers
476 views

When I ssh into a ubuntu machine, what kind of shell am I using

I keep reading about interactive, non-interactive, login, and non-login shells. (This is in the context of which of the .bash* files is read). I don't understand what each type of shell is, so let's ...
2
votes
1answer
573 views

Tab Auto-Completion in Mac OS X when using sftp in terminal

i have been getting very frustrated lately since the readline functionality has been removed from MacOSX and Tab Auto-Completion doesn't work anymore. So i was wondering if anyone knew a good ...
1
vote
2answers
1k views

Feeding contents of a text file as command to telnet

With the command telnet docs.python.org 80 I can do a manual request to http://docs.python.org/2/license.html, by typing the actual request. Now instead of typing it in live I'd like to feed the ...
1
vote
3answers
95 views

Directory /ETC has been moved! — Ubuntu 13.04

I made a bad move by moving my /etc directory to Dropbox in hopes to sync two computer enviroments. After moving the /etc directory any sudo commands responded with "Who is this UID 1000?". Basically ...
1
vote
1answer
122 views

put in bash or zsh history absolute path to files I working on

I have found that in bash i frequently use something like that: vim ./somefile1 less less ./dir1/dir2/somefile2 cp some_other_relative_path_to_file and so on After that when I trying to find a ...
1
vote
4answers
3k views

How can I get Linux to interpret keyboard charaters properly?

I access a linux server shell via putty, but many of the keys I use do not translate across, up, down, left and right all are seen as ^[[A, ^[[B, ^[[D and ^[[C; But so is C-up, C-down, C-left and ...
0
votes
2answers
1k views

Is it possible to shutdown remote Computers without inputing the password?

I used the following bash to shutdown remote computers,but for each computer,I must input the password for it.Is it possible to input the password Automatically? #!/bin/bash ssh -t ...
0
votes
2answers
256 views

How to permanently reset my $PATH?

I was trying to add something to $PATH and it went totally wrong. I now can't run any commands such as ls. I've looked at this answer ...
0
votes
4answers
1k views

Can I create a configuration file for a shell script?

Is it possible to create a .sh shell or .command file with a configuration file? I need to backup websites via Terminal and be able to put some data to configuration files, and have the shell execute ...
0
votes
0answers
172 views

How can I get Linux to interpret keyboard characters properly? [duplicate]

Possible Duplicate: How to configure PuTTY so that Home/End/PgUp/PgDn work properly in bash? I access a linux server shell via putty, but many of the keys I use do not translate across, up, ...
65
votes
6answers
4k views

How do I perform commands in another folder, without repeating the folder path?

Is there a clever way to do copy and move operations or a command to duplicate a file, without having to do a cd, then mv after, at the same folder? For example, I have to run the following: mv ...