linux command

usermod – Linux Command คำสั่งเปลี่ยนแปลงข้อมูลของ user

usermod Linux Command – usermod ใช้ในการเปลี่ยนแปลงข้อมูลของ user   คำสั่ง usermod -d <user homepath> <username> $ usermod -d /home/exampleusernew exampleuser   โครงสร้างคำสั่ง  usermod [options] LOGIN   รายละเอียด เป็นคำสั่งที่ใช้ในการเปลี่ยนแปลงข้อมูลของ user   Option  -a, –append Add the user to the supplementary group(s). Use only with the -G option. -c, –comment COMMENT The new value of the user’s password file…

Read More
linux command

useradd – Linux Command คำสั่งสร้าง user และจัดการ user บนระบบ

ueradd Linux Command – useradd ใช้ในการสร้าง user และจัดการ user บนระบบ   คำสั่ง 1. แสดงรายละเอียดของ user ที่ใช้งาน $ sudo useradd -D GROUP=100 HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/sh SKEL=/etc/skel CREATE_MAIL_SPOOL=no   2. สร้าง user บน ระบบ useradd <username> $ useradd newperson   โครงสร้างคำสั่ง  useradd [options] LOGIN useradd -D useradd -D [options]   รายละเอียด เป็นคำสั่งที่ใช้ในการสร้าง user และจัดการ user บนระบบ จำเป็นต้องใช้…

Read More
linux command

units – Linux Command คำสั่งในการแปลงค่าหน่วยวัด

units Linux Command – units ใช้ในการในการแปลงค่าหน่วยวัด   คำสั่ง unit prompt $ units Currency exchange rates from www.timegenie.com on 2015-10-14 2919 units, 109 prefixes, 88 nonlinear units You have: mile You want: km * 1.609344 / 0.62137119 You have: furlongs per fortnight You want: m/s * 0.00016630986 / 6012.8727 You have: (400 W/m^2 / stefanboltzmann)^(1/4) You have:…

Read More
linux command

uniq – Linux Command คำสั่งในการจัดเรียงข้อมูลแบบไม่ซ้ำกัน

uniq Linux Command – uniq ใช้ในการจัดเรียงข้อมูลแบบไม่ซ้ำกัน   คำสั่ง ตัวอย่าง file test $ cat test hello world HEllo WorlD 2 Bye 1 bYe   ทำการ sort ข้อมูล $ cat test |sort > test.sort $ cat test.sort 1 2 bYe Bye hello HEllo world WorlD   1. จัดเรียงข้อมูลไม่ซ้ำกัน uniq <file> $ uniq test.sort 1 2 bYe Bye…

Read More
linux command

unexpand – Linux Command คำสั่งเปลี่ยน space เป็น tab

unexpand Linux Command – unexpand ใช้ในการเปลี่ยน space เป็น tab   คำสั่ง ตัวอย่าง file test1 มี space เป็นตัวแบ่ง $ cat -vet test1 1 hello$ 2 world$ 3 bye$   ทำการเปลี่ยน space เป็น tab (^I) unexpand -a <file> $ unexpand -a test1 > test2 $ cat -vet test2 1^Ihello$ 2^Iworld$ 3^Ibye$   โครงสร้างคำสั่ง  unexpand [OPTION]… [FILE]…  …

Read More
linux command

uname – Linux Command คำสั่งแสดงชื่อระบบของ server

uname Linux Command – uname ใช้ในการแสดงชื่อระบบของ server   คำสั่ง uname $ uname Linux $ uname -a Linux xxxx 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux   โครงสร้างคำสั่ง  uname [OPTION]…   รายละเอียด เป็นคำสั่งที่ใช้ในการแสดงชื่อระบบของ server ทำงานคล้ายคำสั่ง arch แต่มีข้อมูลรายละเอียดมากกว่า   Option -a, –all print all information, in the following order, except omit -p…

Read More
linux command

tty – Linux Command คำสั่งแสดงชนิดของ terminal ที่ใช้งาน

tty Linux Command – tty ใช้ในการแสดงชนิดของ terminal ที่ใช้งาน   คำสั่ง tty $ tty /dev/pts/2   โครงสร้างคำสั่ง tty [OPTION]…   รายละเอียด เป็นคำสั่งที่ใช้ในการแสดงชนิดของ terminal ที่ใช้งานปัจจุบัน tty ย่อมาจาก teletype   Option -s, –silent, –quiet print nothing, only return an exit status –help display this help and exit –version output version information and exit   กลุ่มคำสั่ง –   Reference: คำสั่ง…

Read More
linux command

tsort – Linux Command คำสั่งจัดเรียงข้อมูลแบบ topological

tsort Linux Command – tsort ใช้ในการจัดเรียงข้อมูลแบบ topological   คำสั่ง ตัวอย่าง tpfile $ cat tpfile 3 8 3 10 5 11 7 8 7 11 8 9 11 2 11 9 11 10     tsort <file> $ tsort tpfile 3 5 7 11 8 10 2 9   โครงสร้างคำสั่ง  tsort [OPTION] [FILE]   รายละเอียด เป็นคำสั่งที่ใช้ในการจัดเรียงข้อมูลแบบ topological…

Read More
linux command

tr – Linux Command คำสั่งค้นหาและเปลียนแปลงข้อมูล text

tr Linux Command – tr ใช้ในการค้นหาและเปลียนแปลงข้อมูล text   คำสั่ง ตัวอบ่าง file1 $ cat file1 hello world Bye   1. ค้นหาและเปลี่ยนแปลงตัวอักษร $ cat file1 |tr ‘w’ ‘W’ hello World Bye $ tr ‘w’ ‘W’ < file1 hello World Bye   2. เว้นบรรทัดทุกคำ $ tr -cs “[:alpha:]” “\n” < file1 hello world Bye   3. เปลี่ยนตัวอักษรเป็นตัวใหญ่ (uppercase)…

Read More
linux command

traceroute – Linux Command คำสั่งแสดงเส้นทางการทำงาน network

traceroute Linux Command – traceroute ใช้ในการแสดงเส้นทางการทำงาน network   คำสั่ง traceroute <IP/Domain name> $ traceroute google.com traceroute to google.com (172.217.24.238), 30 hops max, 60 byte packets 1 10.10.1.1 (10.10.1.1) 0.174 ms 0.170 ms 0.185 ms 2 10.253.224.1 (10.253.224.1) 38.580 ms 38.592 ms 38.600 ms 3 10.87.247.177 (10.87.247.177) 38.640 ms 38.669 ms 38.697 ms 4 58-97-83-137.static.asianet.co.th (58.97.83.137) 38.710…

Read More