国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統(tǒng) > Ubuntu > 正文

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

2020-10-18 20:34:58
字體:
供稿:網(wǎng)友

一、記錄一下如何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的默認(rèn)編輯器

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

無奈之下,重裝一臺服務(wù)器測試, 發(fā)現(xiàn)當(dāng)你第一次crontab -e選擇編輯器的時候就會提醒你: 以后若要該改變選擇, 輸入select-editor 唉,還是不夠細(xì)心啊。。 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 下默認(rèn)的腳本解析器是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

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 庆安县| 青海省| 历史| 怀远县| 五常市| 南康市| 仙桃市| 都江堰市| 云安县| 康保县| 织金县| 盐源县| 定襄县| 交城县| 宁河县| 辽宁省| 全椒县| 灌云县| 东辽县| 翁牛特旗| 观塘区| 涟源市| 沛县| 阿鲁科尔沁旗| 三台县| 灵璧县| 安龙县| 当雄县| 凌海市| 大同县| 新民市| 孙吴县| 辽中县| 旬邑县| 云龙县| 信宜市| 龙胜| 通州市| 仲巴县| 吉木萨尔县| 九龙县|