![]() |
|
Tutorial Beginning Linux – User and Process Management - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Computers (https://sinister.ly/Forum-Computers) +--- Forum: Operating Systems (https://sinister.ly/Forum-Operating-Systems) +--- Thread: Tutorial Beginning Linux – User and Process Management (/Thread-Tutorial-Beginning-Linux-%E2%80%93-User-and-Process-Management) |
Beginning Linux – User and Process Management - §herlock - 01-12-2016 This is the third chapter of the Beginning Linux series. Here is the link to the first chapter and here to the second. What is in this Chapter?
Sources:
Changing your password In the last chapter, we forgot to add this part, so we are adding it here. To change your password, use the passwd tool. You will need to enter your current password and a new password to replace it with. For security purposes, neither the old nor the new password is echoed to the screen as you type it. To change your password, type: Code: $ passwdCode: $ passwd <username>User Activity Here we will see some simple commands for finding out who we are currently sharing the system with and what they are doing. Listing your username Use whoami command to output the username of the user that is logged in at the terminal. It's useful to determine whether or not it is your account that you are messing with. To output your username: Code: $ whoami
geekizerListing Logged in Users Use who command to see the list of all the users that are currently logged in to the system. The output has minimum of three columns, listing username, terminal location, time of login for all users. Fourth column maybe there if a user is logged using the X Window System; it lists the window location of the user's session. To see the logged in users: Code: $ who
geekizer tty1 Oct 20 20:09
helpo tty2 Oct 21 14:37
sherlock tty3 Oct 21 15:04
sherlock ttyp1 Oct 21 15:04Listing Who is on and what they are doing The w tool is similar to who, but it shows more detail. It gives a header line that contains information about the current system status, including the current time, the amount of time the system has been up and running, and the number of users on the system. It then outputs a list of users currently logged in to the system, giving eight columns of information for each. These columns include username, terminal location, X session (if any), the time of login, the amount of time the user has been idle, and what command the user is running. (It also gives two columns showing the amount of time the system's CPU has spent on all of the user's current jobs (JCPU) and foreground process (PCPU). To see who is currently logged in and what they are doing, type: Code: $ wAs you can see, the command's output shows the current system time, system uptime, and the logged in users along with what they are doing. Finding last time a user logged in Use last tool to find out who has recently used the system, which terminal they used and when they logged in or out. Code: $ lastCode: $ last geekizerListing System Activity When you run a command, you are starting a process on the system. Every process is given a unique number, called its process ID or 'PID'. Use ps command to list processes on the system. It displays information about processes that includes process ID, name of command being run, user who is running that program, and how long the process has been running. By default, ps outputs 5 columns; PID, Terminal name, Status ((S)leeping, ®unning, (Z)ombie process: process that has already died) total amount of time CPU has spent on the process since its start and name of the command being run. ![]() ![]() I had to do the last section in image because apparently you can't write the linux command to list all the processes in MyBB forums that is powered by Cloudflare and what ever version you are using. I have made a post on MyBB community regarding that:
http://community.mybb.com/thread-187969.html RE: Beginning Linux – User and Process Management - Bish0pQ - 01-12-2016 Good, detailed tutorial. Keep it up! RE: Beginning Linux – User and Process Management - meow - 01-12-2016 What about killing processes? Just gonna include this since you didn't, good tutorial nevertheless I guess - To kill a process by its PID Code: $ kill {pid}To kill a process by its name Code: $ killall {name here}Also, there are many flags you can include in a kill command to make it do different things. RE: Beginning Linux – User and Process Management - §herlock - 01-13-2016 (01-12-2016, 11:45 PM)meow Wrote: What about killing processes? Just gonna include this since you didn't, good tutorial nevertheless I guess - Thanks! I will include this in my next tutorial. RE: Beginning Linux – User and Process Management - XWorm - 03-03-2016 I liked the tutorial. Short and digestable. RE: Beginning Linux – User and Process Management - meow - 03-03-2016 (03-03-2016, 05:12 PM)XWorm Wrote: I liked the tutorial. Short and digestable. Now this shit is grave digging. I don't care if the thread has been replied on in the past 3 months. RE: Beginning Linux – User and Process Management - mothered - 03-04-2016 (03-03-2016, 11:39 PM)meow Wrote: Now this shit is grave digging. I don't care if the thread has been replied on in the past 3 months. Care to explain how a reply just over 7 weeks old to the last post, Is classed as grave digging? |