欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

ubuntu操作系統(tǒng)常用FAQ詳解

  發(fā)布時間:2017-03-19 14:52:11   作者:佚名   我要評論
今天小編將為大家?guī)淼氖莡buntu操作系統(tǒng)常用FAQ詳解!希望對大家會有幫助,有需要的朋友一起去看看吧

一、記錄一下如何ubuntu server如何查看crontab日志

crontab記錄日志

修改rsyslog

sudo vim /etc/rsyslog.d/50-default.conf

cron.* /var/log/cron.log #將cron前面的注釋符去掉

重啟rsyslog

sudo service rsyslog restart

查看crontab日志

less /var/log/cron.log

二、ubuntu 重設(shè)crontab -e的默認編輯器

Ubuntu System Admin 在一線上服務(wù)器上設(shè)置計劃任務(wù), 不小心選擇了nano, 由于以前接觸的是redhat系列的, 不習(xí)慣用nano, 于是想重設(shè)下, 網(wǎng)上查了下, 貌似沒有。。

無奈之下,重裝一臺服務(wù)器測試, 發(fā)現(xiàn)當你第一次crontab -e選擇編輯器的時候就會提醒你: 以后若要該改變選擇, 輸入select-editor 唉,還是不夠細心啊。。 sudo select-editor 選擇vim 搞定。。

root@ubuntu:/var/www# select-editor

Select an editor. To change later, run 'select-editor'.

1. /bin/ed

2. /bin/nano <---- easiest

3. /usr/bin/vim.basic

4. /usr/bin/vim.tiny

選擇的數(shù)字是“3”, /usr/bin/vim.basic。

三、ubuntu dash shell 改為 bash

ubuntu shell 下默認的腳本解析器是dash, 會使一些bash腳本執(zhí)行失敗.

通過如下方式改回bash:

sudo dpkg-reconfigure dash

選擇NO

四、如何修改resolv.conf

unbuntu每次重啟會重置resolv.conf

1.把/etc/network/interfaces文件里的dns-nameservers寫入resolv.conf

2.把/etc/resolvconf/resolv.conf.d/base的內(nèi)容復(fù)制到resolv.conf

因此我們要保證每次重啟后resolv.conf不變的話我們就要從如上兩個文件著手修改

五、如何修改IP

修改如下配置文件即可

cat /etc/network/interfaces

# This file describes the network interfaces available on your system

# and how to activate them. For more information, see interfaces(5).

# The loopback network interface

auto lo

iface lo inet loopback

# The primary network interface

auto eth0

iface eth0 inet static

address 192.168.1.100

netmask 255.255.0.0

network 192.168.0.0

broadcast 192.168.255.255

gateway 192.168.1.1

# dns-* options are implemented by the resolvconf package, if installed

dns-nameservers 192.168.0.1

六、修改主機名

修改如下兩個文件即可

/etc/hostname

/etc/hosts

相關(guān)文章

最新評論