<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takuya_1st</author_name>
  <author_url>https://blog.hatena.ne.jp/takuya_1st/</author_url>
  <blog_title>それマグで！</blog_title>
  <blog_url>https://takuya-1st.hatenablog.jp/</blog_url>
  <categories>
    <anon>ubuntu</anon>
  </categories>
  <description>ubuntu の設定を変えずに vim を使いたい sudo をしたときに、nanoが自動的に開いていしまう系のコマンドでvim を使いたい。 update-alternatives をすればいいだろうが、影響が大きいときにどうするか。 環境変数を使う。 環境変数EDITORを sudo 以降で実行する。 sudo EDITOR=vim visudo 他の解決方法 sudo したときだけ vim を使いたい場合 sudoers の記述で環境変数を渡すということもできる。 Defaults editor=/usr/bin/vim 参考資料 https://askubuntu.com/questi…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakuya-1st.hatenablog.jp%2Fentry%2F2021%2F02%2F14%2F132742&quot; title=&quot; sudo / visudo で、一時的にvim を使い nano を使わない。 - それマグで！&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-02-14 13:27:42</published>
  <title> sudo / visudo で、一時的にvim を使い nano を使わない。</title>
  <type>rich</type>
  <url>https://takuya-1st.hatenablog.jp/entry/2021/02/14/132742</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
