Talking to users.
The users are the ones that are logged into your system and are some of them have their applications
running, some of them have databases running those other users that log into the Linux system and they
are oftentimes you do need to talk to them.
When I say talk to them not like face to face, but you do need to communicate to them that if you need
to bring down your Linux system or if there is a maintenance or if there are any commands or any application
that they are running that causing stress on the system, you do need to identify them command to find
out as just typing users.
Then there is a command called wall.
Wall is the command that is broadcast your message to everyone who is logged into the Linux system.
And then there is an last command, which is right, right.
Command is dedicated to a user, one specific user.
It does not go out or your message does not broadcast it to everyone is just one user to another.
So we'll log in to our Linux system and we will try all these commands one by one by one.
We will see how you could talk to other users.
I have my Linux machine up and running and I am logged in as myself and I could also see here I'm logged
in as myself.
The first command that I have is Wall.
So before I go into this first command, sorry, first command is user, let's find out who is logged
in to the system.
But what I was going to say is before we run this command, I will log into through another terminal
as a different user.
So to log into through another terminal, which would be the putty terminal, I would need the IP address
of this Linux machine.
Let's check the IP address.
You guys know that, right?
Yes, we can run F config.
And the reason I put it more, I'm sure you know that.
So I could see the output one page at a time.
I see my IP right here is 192 168 112 I will take that IP and I will put it into my putty session.
One I to 160 8.1. 12.
If you hit enter, it will prompt you for the server ssh keys that you wanted to save it.
You could just say click yes.
And now this time I want you to log in as a different user.
The user that I created earlier, I called it Spider and put in the password for the spider.
Now I'm logged in as a spider.
If you logged in as yourself on your terminal, you can log out or you open up another putty terminal
and log in to a different user.
And those users are the ones that we created earlier.
You can pick any user.
It doesn't really matter now.
We will see how many users are logged into our system.
The command to see is just type sorry users and you will see there are three users logged in.
Two of them are the ones sessions that are used by myself, and the third one is the spider.
Spider is the one is this one that I just logged into.
Now I'm here right now.
In this session I am logged in as myself.
In this session I'm logged in as spider.
So if I want to reboot this machine or I want to shut it down for some kind of maintenance, then I
have to let everyone know who is logged into my machine that, you know, I am shutting down this machine.
So please save your work.
If you are editing a file or whatever that you're doing, log off the system so I can reboot it.
And how do I broadcast that?
I will just type the command wall.
I'll hit enter and to one more time, if you want to put a space and then you could type whatever the
message that you want to type.
Here, I will type.
Please log off.
This system is coming down for maintenance.
Enron.
That's my message.
And once you have that, then you type control.
DX As soon as you type control, the you see on the left hand side, the message came up right away.
Please log off.
The system is coming down for maintenance.
So this message is not only directed towards Spider, the user spider, it is directed to anyone who
is logged in.
So it will go to everyone's terminal and let you see that message.
And now you notice you don't have a prompt.
You just you just inside of your message.
You simply hit enter.
You'll get your prompt back.
Now, what if I want to write a message to a specific user?
So in this case, who are the users right now?
I see the two sessions being used by I absolve and one session is used by Spider.
I want to send a message to a spider saying, Hey Spider, you are using some of the resources through
this script or through your application.
Can you please stop the application because it's causing stress on the system?
These are the type of messages you have to send it to the user when you become a system administrator
or you have a root privileges.
So to write to user, you just simply type A right and the username spider.
Then you hit enter.
As soon as you hit enter, you will see on the left hand side the spider is getting the message right
away from you.
I'll put Hi Spider.
Your web is getting bigger.
Please stop spreading your web.
It's just an example of funny sentence.
So I have written this.
I'll hit enter as soon as I hit enter.
You see, on the left hand side, I spider.
Your web is getting bigger.
Please stop spreading your web.
This message is not directed toward everyone who is logged in.
It's only going to the user spider.
And if you see right here, it's saying message from IE of salts.
It means it's coming from this user, from this machine.
Perfect.
Type, right?
I absolve and right here I say, okay, Imran, I will try my best.
Thanks, Spider.
And then control.
That's it.
That's how you communicate with each users.
And I have communicated through ISIL, of course, and most of the time that communication takes place
through the user route.
Route is the one who sends those messages because Route has the highest level of permissions, higher
level to reboot the system, to bring it down to to perform the maintenance.
That's why we run these commands.
So again, uses wall write.
You can log in to three different sessions, try these commands.
It's going to be fun writing back and forth.
And if you have if you're already in an environment where you're working with a corporate, you could
type these write messages to other users just to try out just for fun.