มาเรียนรู้การคำนวณ IP Address version 4 ด้วยเทคนิคการใช้ตารางมหัศจรรย์ซึ่งทำให้ศิษย์นำไปใช้ในการทำงานและการสอบ Cert.IT ได้อย่างดีเยี่ยม
Basic Linux Command ตอนที่ 1 (ls,cat,vi)by Jodoi
มาเรียนรู้การใช้ Linux Command เบื้องต้นกันครับ เริ่มต้นด้วย command ls , cat และ vi ซึ่งปัจจุบันมีความจำเป็นต้องเรียนรู่อย่างยิ่งเพราะหลายๆองค์กรมีการใช้ Linux Server กันมากขึ้น
[user1@jodoi-server ~]$ su - user2
Password:
Last login: Wed Jul 26 10:43:58 +07 2023 from 192.168.2.200 on pts/3
[user2@jodoi-server ~]$
[user2@jodoi-server ~]$ su -
Password:
Last login: Wed Aug 2 10:40:52 +07 2023 on pts/0
[root@jodoi-server ~]#
โดยปกติแล้ว Username ธรรมดาจะไม่สามารถทำการ Start หรือ Stop Service ต่างๆได้ ต้องใช้ command sudo ช่วยในการ Start หรือ Stop Service
[user2@jodoi-server ~]$ sudo service network restart
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for user2:
user2 is not in the sudoers file. This incident will be reported.
[user2@jodoi-server ~]$ sudo service httpd restart
[sudo] password for user2:
user2 is not in the sudoers file. This incident will be reported.
[user2@jodoi-server ~]$
แต่ถ้าเป็น Username root จะสามารถทำได้
[user2@jodoi-server ~]$ su -
Password:
Last login: Wed Aug 2 11:32:57 +07 2023 on pts/0
[root@jodoi-server ~]#
[root@jodoi-server ~]#
[root@jodoi-server ~]# service network restart
Restarting network (via systemctl): [ OK ]
[root@jodoi-server ~]#