Whats is a shell?

im about to sign up for a dreamhost account and these guys keep talking about “shells” what are they?

Hooked on foniks werked four mee.

A shell prompt looks like an MS-DOS screen. Users type commands at a shell prompt, the shell interprets these commands, and then the shell tells the OS what to do.

These are more common on unix-based machines where there isn’t a history of graphical interface being available. Nowdays, they are still widely used however, to allow remote access via SSH or Telnet and to execute commands faster. More often than not, typing a few commands into the shell is much faster than opening a few graphical windows.

You can also write shell scripts that will execute a batch of code to do what you want. It is also very handy to debug your scripts and to do general adminsitration.


Web Developer

sry, this isnt my specialty- can you give me a layman’s term version of this?

Hooked on foniks werked four mee.

If you have a shell account, it simply means you can telnet into the server at Dreamhost and run commands. If you are smart, you use an SSH program instead, which is the secure version of telnet. (Telnet communicates passwords in plain text, and in theory, someone could grab them.)

With a shell account, you can create directories with the mkdir command and change file permissions with the chmod command. That’s about all most people ever do - and you can do that much from many FTP programs.

If you write your own CGI programs, you can telnet in and run them from the command line. If the program bombs when you try to run it from a browser, all you get is a 500 Internal Server Error, but if you run it from the command line, it will tell you that there are ^M characters at the end of the lines (that means you FTPed a DOS file in binary instead of ascii mode) or it will tell you that there is a problem with something at line 37. When you check the file, you will find that there is actually a semi-colon missing at the end of line 36 - and that is a lot easier than scratching your head and wondering why the program bombed with a 500 error.

If you write your programs in C instead of Perl, you can run the compiler from the command line. Or you can use grep to find text in several files of many, or use sed to make the same search-and-replace edit in several - or many - files.

Asking what a shell account is good for is like asking “but what is it good for?” of the mother of a newborn baby. All it does is make noises at one end and messes at the other - but eventually, something good can come of that baby. Same with a shell account.

It helps to learn something about linux (or unix, which may as well be the same thing, as far as you are concerned) if you are going to be a webmaster. Hint: on any computer-related topic, the best bet when you head for the library or the bookstore is to keep an eye out for “O’Reilly & Associates” on the book spine. One book of theirs is worth a dozen by any other publisher…

In a nutshell, shell access is a way to interact with the server computer. You’re probably familiar with FTP - basically, that’s just a way to upload and download files to and from the server.

If you need to run programs on the server, manage your files beyond what your FTP program can do, or debug CGI scripts/programs on the server, you need to use a shell.

Otherwise - if you just want to update your site - you probably don’t need it (though if you’re ever bored you might want to learn more, since it’s pretty powerful/useful stuff!).

  • Jeff @ DreamHost
  • DH Discussion Forum Admin

thanks guys, looks like i’ve got some reading to do :slight_smile:

Hooked on foniks werked four mee.

Maybe the GUI wasn’t as widely used with unix, but hasn’t it been
available about as long as for DOS/PC’s/Mac’s?


That’s an interesting thought. I don’t think the X Window System really counts as a GUI - it’s just a windowing system. There have been GUIs for UNIX for quite some time, although not in quite the same way as with PCs or Macs, since the GUI isn’t really on the operating system level (and since most management tasks are still usually performed from the command line).

I’m not a huge expert on this stuff, so someone feel free to correct me :>

[quote]Speaking of using X-win, does anybody use cygwin/xfree86 to get on DH
servers, or will it work? I recently tried it to access a local workstation,
but was wondering if it would work across the continent to DH? Not that
putty or ssh don’t do everything I need…


Define ‘get on’… You can’t really run X (or X apps) directly off of our servers, either directly over the network, or via ssh port forwarding (I suppose you could if you installed them in your user space). It would be really slow if it did work (trust me - I have run X apps from my home machine on my work machine and vice-versa).

We keep our servers pretty stripped down - I think the only stuff in /usr/X11R6/bin/ on the web machines are the imagemagick apps. The basic X11 libraries and include files are there…

The Cygwin stuff is great to have installed, though, if you’re running windows - being able to ssh and scp as if you were on a UNIX machine is great, and the terminal . The Cygwin XFree86 server / client isn’t too bad either… although most of the Windows users here use Exceed (commercial product) for X sessions instead.

[quote]When I use Starnet’s X-Win32 to access an HP workstation, I see/use
the normal console GUI (with file manager, notepad, etc. equivalents - oh
So I was thinking on the DH server maybe you could use KDE desktop
or something. Sounds like probably not.


Yup - not really practical for us (or for you). We do this all the time within our office network though - there are 2 or 3 X servers that people use (as well as those of us who run *nix on the desktop with X running locally). On a LAN the speed is fine, but you wouldn’t want to do it from an outside network.

[quote]What about Exceed is worth paying for?


Well, it’s supposedly a bit faster. Also, I believe there’s a way to cut and paste between Windows and X with Exceed; there’s a program that’s designed to do this with Cygwin, but I haven’t had much luck. I think a lot of people that I work with are used to Exceed at this point too, so they’re reluctant to change at this point.

I think there are some other minor issues with the Cygwin X server, but I don’t remember them off the top of my head. I’ve actually even managed to compile fvwm on Cygwin and ran X natively on Windows, which is pretty cool (although not really worth it for actual use).

Somewhat relevant thread on slashdot from a week or so ago; some of the comments have good comparisons (in both directions) between various commercial products and the Cygwin / XFree86 server…

[quote]Yup - not really practical for us (or for you). We do this all
the time within our office network though - there are 2 or 3
X servers that people use (as well as those of us who run
*nix on the desktop with X running locally). On a LAN the
speed is fine, but you wouldn’t want to do it from an
outside network.


Definitily not. I’m running a similar setup to access my work machine from home, and over a DSL link at home and into a 10meg link at work it’s sitll slow to say the least. Well, maybe slow isn’t the word, think jaggered, clumsy, irratating. Well, you get the idea…


  • wil