Slashdot Mirror


Learn How UNIX Multitasks

BlueVoodoo writes "On UNIX systems, each system and end-user task is contained within a process. Learn how to control processes and use a number of commands to peer into your system."

45 of 160 comments (clear)

  1. exciting by Anonymous Coward · · Score: 5, Funny

    Wow! ps, top, sleep, kill, PIDs? This is some pretty groundbreaking stuff here!

    1. Re:exciting by Anonymous Coward · · Score: 5, Interesting

      Don't forget to set the I_WANT_A_BROKEN_PS environment variable!

    2. Re:exciting by PPH · · Score: 2, Funny

      Now, that wasn't very nice.

      --
      Have gnu, will travel.
    3. Re:exciting by morgan_greywolf · · Score: 4, Funny

      I especially liked this one:

      $ ls -l /usr/bin/top
      -r-xr-sr-x 1 root tty 19388 Mar 20 2005 /usr/bin/wall

      Wow. That's a neat trick.

    4. Re:exciting by Matt+Perry · · Score: 4, Funny

      Don't forget to set the I_WANT_A_BROKEN_PS [rt.com] environment variable!
      POSIX_ME_HARDER would have been a much better variable name.
      --
      Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
    5. Re:exciting by cortana · · Score: 3, Informative

      Bear in mind that the various devices may do different things on different operating systems.

      On Linux, /dev/tty refers to the controlling terminal of the process that opened it. Therefore there is no reason to restrict its permissions... in fact to do so would prevent processes from writing to the terminal (if they wanted to do so directly to read a password, for instance, rather than relying on reading from stdin). /dev/tty[0-9]+ are the actual virtual consoles that one logs in on. They are owned by root:root until someone logs in on one whereupon they become owned by $user:tty. /dev/pts/[0-9]+ are pseudo terminals that are created by a terminal emulator such as xterm, or a remote login server such as ssh. They are also owned by $user:tty

  2. Next... by ari_j · · Score: 4, Funny

    Learn how UNIX stores files. This revolutionary new article will show you how to use ls and cd, and you will walk away with a complete understanding of how files are stored. More magic demystified, indeed!

  3. please, hepl by Anonymous Coward · · Score: 5, Funny

    I get
    "ps: Command not found"

    What do to? Heeeeeelp.

    1. Re:please, hepl by EricTheGreen · · Score: 4, Funny

      Try this instead:

      "c:\program files\internet explorer\iexplore.exe" http://www.ubuntu.com/getubuntu/download

      Hope this hepls....

  4. Incredible! by Wuhao · · Score: 5, Funny

    With several businesses now owning their own Unix mainframes, and with some futurists speculating that hobbyists may one day have full-fledged Unix systems in their basements, a detailed understanding of Unix operation -- including its intricacies, like these "processes" -- becomes increasingly important, even for people not charged with the operation of one of these computational goliaths. I for one plan to study these "processes" carefully.

    1. Re:Incredible! by 0racle · · Score: 3, Funny

      Na, not behind the times, just missing something.

      It's called a sense of humour.

      --
      "I use a Mac because I'm just better than you are."
    2. Re:Incredible! by Wuhao · · Score: 3, Funny

      I envision there one day being a vast network of computers, accessible to all, containing limitless mountains of data -- and on this network, the common man will finally be able to communicate with his kinsmen worldwide and transcend all borders. Finally, free of the tyranny of governments and liberated from the logistics of contemporary communication, Mankind shall at last realize his full artistic potential. No more need a man hide his drawings of the horribly mutated, furry Mr. Spock and Captain Kirk engaged in sadomasochistic intercourse as they eject feces from their hermaphroditic nipples; it shall be available to all, stumbled across by those just trying to fi--

      You know, now that I think about it, you're right. If you can get some torches and pitchforks together, I'll rally the townspeople, and we can storm Bell Labs.

  5. Use the Firehose! by 644bd346996 · · Score: 5, Insightful

    If you think this article is stupid and an insult to your technical prowess, go to the firehose and vote it down.

    1. Re:Use the Firehose! by gEvil+(beta) · · Score: 5, Funny

      Mod Parent Up! Vote Article Down!

      --
      This guy's the limit!
    2. Re:Use the Firehose! by jellomizer · · Score: 3, Interesting

      Yea you are a big man now. You read an article and you understood it before you read the article. So you feel inclined to instult the fact that some people may not know this.
      Yes this is Basic Unix Command Line suff. But a lot of Unix users don't go beyond typing the command to run the program. Forking, Piping, Scripting, is more then what they really use. An some of the times these people who don't understand this are actually smarter then most of us. Say a Physicist who uses Unix to test their math or run complex simulations. Also there are a lot of people using Linux/Unix who were never formally taught how to use it. So they stick in the GUI, or Find and install programs that a simple small script can acomplish. I know you want to do your "I am an Alpha Geek" while thumping your chest. But if an article gets posted and you really don't care, then don't read it and move along. Because getting an article on information that you already know isn't a big deal, this is far more mature then say the latest Cool PC Mods.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    3. Re:Use the Firehose! by Vellmont · · Score: 4, Insightful


      If you think this article is stupid and an insult to your technical prowess, go to the firehose and vote it down.

      Not everyone on Slashdot is at the same level as everyone else. While I've known all the stuff in the article for 10-12 years, I'm certain there's a significant number of people here that have no idea about process forking, or what the init process is.

      --
      AccountKiller
    4. Re:Use the Firehose! by Fezmid · · Score: 2

      Yeah, but should we really have basic articles like that on this site? Maybe we should have an algebra primer? 2x+4=12, show me how to solve for x. Or using your physicist example, should we have an article describing the coefficient of friction for us? No, because it doesn't really fit with the site.

      Nobody's saying that the article isn't useful, but it's not a /. article.

  6. random? by flynt · · Score: 4, Funny

    Is it just me, or is this one of the most random Slashdot articles ever posted? A link to Chapter 8 of an IBM manual on Unix development, really?

  7. They don't know how to spell "UNIX".... by Kadin2048 · · Score: 3, Insightful

    Sadly though, there are probably people graduating from "computer science" programs who only know of 'processes' as something you get after pressing Ctrl-Alt-Del and clicking on the "Task Manager" button.

    You're vastly overestimating the CS curriculum, at least at my local State uni, if you think that UNIX anything is taught in the 100-level courses.

    --
    "Ladies and gentlemen, my killbot features Lotus Notes and a machine gun. It is the finest available."
    1. Re:They don't know how to spell "UNIX".... by chrism238 · · Score: 2, Insightful

      That may all be true, but you don't graduate with just the 100-level courses!

    2. Re:They don't know how to spell "UNIX".... by loconet · · Score: 3, Insightful

      I think one of the big problems is not so much the lack of content offered in the classroom. The bigger problem I see IMHO is the lack of interest from students as a result of a poor introduction into what UNIX really is and how it will come to play in their careers (ie: beyond their gaming desktop).

      I have recently gone back to school to finish up my CS degree after having worked in the industry for several years and I'm surprised at the ignorance of UNIX/Linux's usefulness from people who have already taken a UNIX/Linux course in my school. It seems profs are jumping straight into bash scripting without properly introducing what UNIX really is, what the difference between UNIX and Linux is, how it is used today, why it is important to learn it, how it is different than Windows, the philosophy behind UNIX, how it is useful as a tool, etc. All students are being exposed to is a command line and some scripting. No context in the technology whatsoever. It is then not surprising that students come out of those courses thinking UNIX and Linux are useless since Windows/Macs do it better, easier. This results in them erasing whatever little knowledge they acquired as soon as exams are done with.

      --
      [alk]
    3. Re:They don't know how to spell "UNIX".... by chrism238 · · Score: 2, Insightful

      Perhaps "The Art of Unix Programming" should just become required reading?

  8. Gee Whizzes by helixcode123 · · Score: 5, Insightful

    I have mod points, but I thought I'd post instead: Look genuises. Not every slashdot reader is a Unix guru. I think this is an excellent article and does a great job explaining some of the core workings of Unix/Linux. I've been fortunate enough to be using Unix since 1981 and I actually enjoyed reading the article. It offers our Windows-centric Slashdot breatheren a nice overview.

    --

    In a band? Use WheresTheGig for free.

    1. Re:Gee Whizzes by squiggleslash · · Score: 3, Insightful

      While there will always be space for newcomers, there's a standard underneath it becomes somewhat pointless and adds needlessly to the signal to junk/noise ratio to consider adding an article. A newcomer's guide to Unix is one thing, but a brief overview of a small part of the system which will be useless to the majority of Slashdot readers, and will be too lacking in context for newcomers, fits well below that standard.

      --
      You are not alone. This is not normal. None of this is normal.
    2. Re:Gee Whizzes by loconet · · Score: 4, Funny

      It offers our Windows-centric Slashdot breatheren a nice overview

      John and Mark don't have net access on Mondays so they wouldn't have been able to read this article anyways.

      --
      [alk]
  9. Digg? by loconet · · Score: 5, Funny

    Did I mistype the URL? No, it does say slashdot.org. Odd... I should go back to bed.

    --
    [alk]
  10. Re:What the flying f*ck? by NeoPaladin394 · · Score: 5, Insightful
    This is an article in a series (labeled Introductory to Intermediate) designed to introduce to the O/S. The first article in the series talks about how to use find! You can't point at an O'Reilly book and call Stupid because you know what it talks about. The article is well written and explains processes perfectly for the intended audience, and not everyone is born with the intrinsic knowledge of how every O/S in the world works. Readers on this site want a world of O/S choices, but are so willing to bash an article that will help accomplish just that? And just because it gives a quick, sentence overview of PS and LS? Unbelievable.

    The article may or may not belong on the front page, but claiming someone's illiterate for not knowing stuff like this, especially if they were in an Apple or MS shop? Heaven forbid.

  11. Stop bitchin' please by guruevi · · Score: 3, Insightful

    Really, the article is great in explaining your manager how Unix processes work. It's a down-to-earth introductory explanation of processes and has some interesting information (which we all know, because we're all POSIX guru's) for newbie's and junior sysadmins switching to Linux/Unix/AIX

    --
    Custom electronics and digital signage for your business: www.evcircuits.com
  12. Re:Woop-tee-doo. by billcopc · · Score: 3, Insightful

    It's called "here's a slashdotting to boost my pagerank". Whenever you see useless tripe on the internet, chances are it's designed to generate idiot traffic and/or ad revenue. Thank Google for this glut.

    --
    -Billco, Fnarg.com
  13. In Other News... by Ikcor · · Score: 5, Funny

    How to master the "other half" of the keyboard using the newly discovered SHIFT key.

  14. No, psDoom is more interactive: Re:Lavaps by Marc_Hawke · · Score: 2, Interesting

    This is an intuitive way to monitor the processes on your system. It's just "point and click"...I mean "point and shoot."

    http://psdoom.sourceforge.net/

    --
    --Welcome to the Realm of the Hawke--
  15. Segfaults by Anonymous Coward · · Score: 5, Funny

    If it helps, you can think of a process as its own sovereign nation, with borders, resources, and gross domestic product.
    Does this mean that illegal immigrants are responsible for my processes segfaulting?

    1. Re:Segfaults by Anonymous Coward · · Score: 2, Funny

      This is the traditional method. However, the new school of thinking is to use the "wall" program to limit access. E.g.,:

      [gwb@usa] wall
      Stay out, all of you!
      ^D

      Message from gwb@usa:
      Stay out, all of you!

      On a side note, the new school of thinking works great with typical hack attempts. For example, if a user from systema (afgst) launches a remote exploit attempt, the new school suggests that you launch an attack against systemIRQ (interrupt request, for example). SystemIRQ has nothing to do with the attack, but that doesn't matter.

  16. I need some help by corecaptain · · Score: 2, Funny

    I tried this program:

    int main()
    {
        while(1) fork();
    }

    but nothing happens?

    1. Re:I need some help by fuo · · Score: 2, Funny

      this should fix it: int main() { while(fork() || !fork()) fork(); }

  17. Re:How to learn unix... by bberens · · Score: 3, Funny

    Switch your shell to one with auto-completion and go through each letter of the alphabet, hitting tab after each one and then viewing the manual page for each command you don't already know.

    How about: Bathe, get a girlfriend, go outside, read a 20 minute FAQ and learn more than most *nix sysadmins seem to know.
    --
    Check out my lame java blog at www.javachopshop.com
  18. IBM had better be careful.. by Morky · · Score: 5, Funny

    Doesn't SCO own the rights to this information?

  19. Re:How to learn unix... by p3d0 · · Score: 2, Interesting

    I used to run "w" and see what other people were doing, then look at the man page for that.

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  20. Re:How to learn unix... by Ngarrang · · Score: 4, Funny

    How about: Bathe, get a girlfriend, go outside, read a 20 minute FAQ and learn more than most *nix sysadmins seem to know. My wife might have a problem with the second item...
    --
    Bearded Dragon
  21. A few days ago by Tyr_7BE · · Score: 4, Funny

    I saw slashdot transformed into Digg, with "slashdotit" links everywhere. That was supposed to be a joke, right? Because it's only funny the first time.

  22. Re:Woop-tee-doo. by ukemike · · Score: 4, Insightful

    It's a basic primer on UNIX job control. Whee. Not that it isn't well done or useful to the target audience -- but how is this 'news', never mind 'stuff that matters'?
    "Looks like someone has a case of the mondays!"

    I thought that the slashdot community was supportive of people migrating away from windoze to the linux world. TFA covers things that are not obvious to people that don't have *nix experience. It was a nicely written article. It might spur discussion on further basic knowledge needed to deal with linux. The whole community of "nerds" includes slide-rules to slashdot. Not every nerd is a sysadmin. To me this was useful. I already had learned 75% but had forgotten some and a bit was new and might be handy. That is "stuff that matters" to me. If nothing else cranky sysadmins, when posed with a question about something this basic, could roll their eyes condescendingly and give a link to this handy page.

    The better question is why is this posted under "devcelopers"?
    --
    -- QED
  23. Re:How to learn unix... by bberens · · Score: 2, Interesting

    Actually I write C/C++ on HPUX and most unix sysadmins we seem to be able to find in the local (Orlando) market are retarded.

    --
    Check out my lame java blog at www.javachopshop.com
  24. Re:What the flying f*ck? by TheNetAvenger · · Score: 2, Interesting

    Ok, agree with one exception.

    If you hire someone who is supposed to be working with Windows/*NIX interoperability and hadn't a clue how UNIX works, then you have a problem and, yes, the new guy is illiterate for the task he is given. If you hire a developer to make a .NET application for a specific Windows architecture, then I wouldn't consider the user illiterate for not knowing the processes and binary code Unix launches on startup. At least, not in the incompetent sense that the word is being used here.


    I am more demanding than this on developers and techs. I don't care if the project is 100% MS and .NET, if they have little knowledge outside of the specific job they are completing then their creativity is severly limited and fundamental insights they should just have are not there.

    I have worked with many projects like ASP and .NET web development and when the develoeprs have no understanding of OSes and even *nix concepts they are nothing more than monkeys cranking out code that is dictated to them.

    Another problem with such closed knowledge is even in little things, like in the example of Web development. I 'inherited' a tech that was supposed to be a great Web developer(MS tools), and when parts of the project were moved to Linux servers, the person literally did not understand why upper & lower case mixed reference tags were failing. And as scary as that sounds it very common.

    But this is just like my personal stand on people in the OSS *nix world that have fallen so far away from MS that they fail to understand the newer MS OSes and what things are done right in the NT architecture that *nix has never done very well at. Techs will mislead clients because they don't understand 'easier' concepts that other people are using that came from the MS world even though they could be implemented on *nix.

    This is also especially true for OSS *nix developers, if they don't know what else is out there, they could be recreating wheels that companies like MS, Sun, etc have already solved. And sadly I find this a lot even in some very well known and good OSS projects. There is something to be said for learning from your competition or people that have gone before you.

    Maybe it is more like the difference between knowledge and understanding.

  25. slownewsday tag by superdude72 · · Score: 2, Interesting

    The existence of tags like "duh" and "slownewsday" creates a perverse incentive to approve articles like these.

  26. So we all know this already, BUT... by thorsday · · Score: 2, Insightful

    Yes, we all know about ps, sleep, kill, pid, etc. But when I began to frequent Slashdot, I was a technical dunderhead. What made Slashdot so interesting for me is that it oriented me to computer technology and operating systems, and clued me in on where technology was going. It gave me links to websites that, IMO, are generally above average in informational reliability. It still does. This article would have been useful to me several years ago. I am sure that there are people (like my former self) that are virtually computer illiterate and will appreciate any information they can get to improve their competence.

    I don't want to see Slashdot dumbed down. But an occasional article that gives reliable information on the basics will not cause Slashdot to slide down that slippery slope. I will begin to worry when I can no longer find news here that is helpful to me. As far as I can tell that is a long way off.

    Just keep things RELIABLE and ON TOPIC and I will be happy. I still have much to learn.

    "Die Lösung des Rätsels des Lebens in Raum und Zeit liegt außerhalb von Raum und Zeit."
            -Ludwig Wittgenstein, Tractatus Logico-Philosophicus