Questions tagged [shell]

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

Shells are used to interact with the Operating System (OS) and launch other applications.

Shells also have built-in commands, depending on the OS. Examples are directory listings, moving and copying files (Windows) or job control (Unix-like).

Most shells offer scripting capabilities, starting with simple sequential execution of commands. For more complex problems, control structures (like conditionals or loops) can be used.

Broadly used shell include:

  1. Windows:
  2. Unix-like:
    • Bourne Shell
    • Bourne Again Shell
    • Korn Shell
    • (Tenex) C Shell /
    • Z Shell
    • Friendly Interactive Shell

See Comparison of command shells on Wikipedia for a more extensive list.

4014 questions
10 answers

How can I sort the output of 'ls' by last modified date?

How can I sort the output of ls by last modified date?
6 answers

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 will turn off the screen for 15 seconds on Linux.…
Leonid Volnitsky
  • 8,473
  • 3
  • 13
  • 8
12 answers

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 runnable. Why isn't there any documentation about…
Andrea Ambu
  • 8,338
  • 4
  • 25
  • 21
41 answers

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 that file. Currently, I'm using this: while read;…
Denilson Sá Maia
  • 12,863
  • 12
  • 40
  • 44
16 answers

Reload a Linux user's group assignments without logging out

When assigning a user's secondary group list using: # usermod -G is it possible to force this group assignment to take effect without logging out all running sessions? This would be very useful in the situation where a Screen…
  • 5,962
  • 3
  • 16
  • 13
14 answers

How do I make rm not give an error if a file doesn't exist?

I'm writing a makefile that will clean up some useless files at the end of the compilation. If a target has already been made, it will of course skip that target and the useless file may not be there. So if I do this: rm…
Jason Baker
  • 8,382
  • 9
  • 34
  • 50
21 answers

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 process (e.g. Firefox) from the terminal it's been…
12 answers

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 though the shell output history. Is there a way to…
  • 3,853
  • 3
  • 16
  • 6
10 answers

chown is not changing symbolic link

I'm trying to change the user/group of a symbolic link with the command: $ chown -h myuser:mygroup mysymbolic/ But it's not changing. I'm logged in as root. The current user/group is set to root:root. What went wrong?
11 answers

If I know the PID number of a process, how can I get its name?

If I have the PID number for a process (on a UNIX machine), how can I find out the name of its associated process? What do I have to do?
  • 6,981
  • 14
  • 37
  • 46
19 answers

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 least monitor the tunnel automatically, I could…
  • 6,094
  • 8
  • 36
  • 62
12 answers

How do I select all text in Vi/Vim?

Using VI tool for editing config files. How can I select all the text in a file (around 1000 lines), copy it, then paste into Google Docs?
Daniel t.
12 answers

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. What's the easiest way to force that process to…
Dustin Boswell
  • 2,471
  • 4
  • 19
  • 11
6 answers

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

I'm confused with the terminology. What is the difference between shell, console, and terminal?
  • 4,229
  • 15
  • 46
  • 62
12 answers

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 easier if there was an argument for cd that takes the…
  • 4,424
  • 6
  • 26
  • 44
2 3
99 100