How to use find and grep in linux

ตัวอย่าง การใช้ find ในการค้นหาไฟล์
[root@64 ~]# find / -name hostname

ตัวอย่าง การใช้ grep ในการค้นหาข้อความในไฟล์นั้นๆ
[root@64 ~]# grep -n 183.90.168 /etc/sysconfig/network-scripts/ifcfg-ens192

 1,565 total views

Basic config CentOS 6

สำหรับ CentOS 6 เมื่อติดตั้งเสร็จ จะใช้เป็นสิทธิ root เลย

ifconfig
system-config-network

 

 

 

 

 

 

vi /etc/sysconfig/network-scripts/ifcfg-eth0
Modify the file to look similar to the example below.

DEVICE=eth0
 TYPE=Ethernet
 ONBOOT=yes
 BOOTPROTO=none
.

service network restart
ping 8.8.8.8

 982 total views