Results 1 to 9 of 9

Thread: what does the "sh" process do?

  1. #1
    Join Date
    Mar 2009
    Location
    Kalamazoo, MI
    Beans
    174
    Distro
    Ubuntu 10.04 Lucid Lynx

    what does the "sh" process do?

    i was looking at my process in system monitor and i saw one that i never say before: "sh". what does it do? why did it suddenly appear?

  2. #2
    Join Date
    Oct 2008
    Location
    Philippines
    Beans
    1,195
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: what does the "sh" process do?

    sh stands for shell, the standard command language interpreter

    Quoting from Open Group

    The sh utility is a command language interpreter that shall execute commands read from a command line string, the standard input, or a specified file. The application shall ensure that the commands to be executed are expressed in the language described in Shell Command Language.
    Some kinda technical term
    advocating Free and Open Source Software, supporting the Open Web
    fight for your right to party and get your free cloud storage now

  3. #3
    Join Date
    Mar 2009
    Location
    Kalamazoo, MI
    Beans
    174
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: what does the "sh" process do?

    what does it do? its a process that shows up in my system monitor...

  4. #4
    Join Date
    Oct 2008
    Location
    Philippines
    Beans
    1,195
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: what does the "sh" process do?

    Actually, I really don't know exactly what it does. It also shows in my System Monitor and pointing to it, it shows /bin/sh -c /usr/bin/compiz-decorator
    advocating Free and Open Source Software, supporting the Open Web
    fight for your right to party and get your free cloud storage now

  5. #5
    Join Date
    Apr 2008
    Location
    Michigan, USA
    Beans
    183
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: what does the "sh" process do?

    Code:
    man sh
    Quote Originally Posted by man sh
    dash is the standard command interpreter for the system. The current version of dash is in the process of being changed to conform with the POSIX
    1003.2 and 1003.2a specifications for the shell. This version has many features which make it appear similar in some respects to the Korn shell, but
    it is not a Korn shell clone (see ksh(1)). Only features designated by POSIX, plus a few Berkeley extensions, are being incorporated into this shell.
    This man page is not intended to be a tutorial or a complete specification of the shell.
    [ECS 770 AMD Motherboard] [AMD Phenom II X2 3.0GHz Dual-Core Processor] [Kingston 2GB DDR3 SDRAM]
    [Nvidia GeForce 8800GT Graphics Card] [Creative X-Fi XtremeGamer Sound Card] [Western Digital 500GB Hard Disk Drive]

  6. #6
    Join Date
    Mar 2009
    Location
    Kalamazoo, MI
    Beans
    174
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: what does the "sh" process do?

    why did i never see it before? for mem usage it says n/a... almost like its doing nothing...

  7. #7
    Join Date
    May 2006
    Location
    Anchorage, Alaska
    Beans
    1
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: what does the "sh" process do?

    Perhaps a more helpful snippet from the man page is this:
    The shell is a command that reads lines from either a file or the terminal, interprets them, and generally executes other commands. It is the program that is running when a user logs into the system...
    If you really want to know what that particular shell process is doing, you might try using `lsof` against the process ID.
    Code:
    sudo lsof -p PID

  8. #8
    Join Date
    Mar 2009
    Location
    Kalamazoo, MI
    Beans
    174
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: what does the "sh" process do?

    maybe i just never noticed it before... speaking of processes, what does "zombie mode" mean?
    Last edited by thomz92; September 17th, 2009 at 02:24 AM.

  9. #9
    Join Date
    Feb 2007
    Location
    Tuxland
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: what does the "sh" process do?

    Quote Originally Posted by thomz92 View Post
    maybe i just never noticed it before... speaking of processes, what does "zombie mode" mean?
    A process which is done executing but is still in the process table because it's caller hasn't requested it be removed.

    The UNIX process model is very different from the Windows one for example. Processes are logically arranged in a tree like structure. The root of the tree is called "init", it's the only process directly called by the kernel itself.

    All processes then are forked from init, usually including the login manager process. The login manager then forks a login shell (called "sh"). Sh can fork more processes and so forth. Other processes can call other processes. When "sh" is killed, so any processes it forked are also killed.

    Fundamentally the model is a tree, not a list.
    Proud GNU/Linux zealot and lover of penguins
    "Value your freedom or you will lose it, teaches history." --Richard Stallman

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •