เปลี่ยน default editor บน ubuntu


จากประสบการณ์ที่ผ่านมา default editor บน linux และ *bsd มักจะเป็น vi ซึ่งตามปกติแล้ว system administrator (sysadmin) จำเป็นต้องใช้ default editor ของ os ในหลายๆ เหตุการณ์ เช่น ใช้ในคำสั่ง crontab เป็นต้น

หลังจากที่ติดตั้ง Ubuntu 8.04 hardy ก็พบว่า default editor ไม่ใช่ vi ที่ผมคุ้นเคย กลับกลายเป็น nano editor หน้าตาเหมือนกับ pineapple สมัยที่ linux ยังไม่เฟื่องฟู (pine e-mail client) ไม่รู้ว่าคนแก่แถวๆ นี้มีใครนิยมกิน pine บ้างครับ … เพื่อไม่ให้ยืดเยื้อไปกว่านี้ เรามาเปลี่ยน default editor บน ubuntu กันดีกว่าครับ


แปลงร่างเป็น root หรือใครถนัดใช้ sudo ก็ข้ามไปใช้ sudo ตามสะดวกครับ

su -

ทีนี้ก็เปลี่ยน default editor ตามนี้ครับ

update-alternatives --config editor

There are 4 alternatives which provide `editor’.

Selection Alternative
———————————————–
1 /usr/bin/vim.tiny
2 /bin/ed
+ 3 /bin/nano
* 4 /usr/bin/vim.basic

Press enter to keep the default[*], or type selection number:

แฟนพันธุ์ vi ก็ต้องเลือกหมายเลข 4 อยู่แล้ว … เพื่อนๆ เลือกหมายเลขอะไรกันครับ

Related Posts

Tags: , , , , , , , , , ,


3 Responses to “เปลี่ยน default editor บน ubuntu”

  1. perng Says:

    ขอบคุณครับกำลังฝึกเล่น ubuntu อยู่พอดีเลย แต่ก็งงมากมาย

  2. iSEVEN Says:

    ติดปํญหาอะไรก็ปรึกษาได้นะครับ …

  3. pom Says:

    สวัสดีครับ

    ผมขอปรึกษาหน่อยครับ

    ปกติ ผมมี radius server (ubuntu 9.04)
    ผมมี client xp authen ด้วย pGina login ปกติ
    ต่อมาผมมี client ubuntu ต้องการ authen กับ radius server บ้าง ทำไม่เป็นครับ ต้องลง อะไรบ้าง
    ขอคำแนะนำด้วยครับ
    ขอบคุณครับ

Leave a Reply

IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

What is 4 + 7 ?
Please leave these two fields as-is: