[ubuntu]wake on lan設定

參考網址:https://www.itread01.com/content/1547482884.html

登入需要遠端喚醒開機的目標機器,執行ethtool命令檢視網絡卡是否支援Wake On Lan

[root@localhost]# ethtool eth0

看這兩行

Supports Wake-on: pumbg

Wake-on: d

若Wake-on為d,表示禁用Wake On LAN,需要啟用它。

 

[root@localhost]# ethtool -s eth0 wol g

如果已經是g就說明目標機器的網絡卡已經支援Wake On LAN。

 

https://www.itread01.com/content/1550410051.html

當機器重啟後,eth0的設定又會回覆到Wake-on: d 狀態,
這個問題怎麼解決?
兩個辦法:第一個,也是我們的慣性思維;
把/sbin/ethtool -s eth0 wol g 這條命令附加到/etc/rc.local這個檔案中,
則下次開機後會自動執行

第二個: 編輯/etc/sysconfig/network-scripts/ifcfg-eth0
(eth0網絡卡的配置檔案),新增上一行:
ETHTOOL_OPTS=”wol g”

 

TG-3468網卡設定
https://www.tp-link.com/tw/support/download/tg-3468/
 如何消除 TG-3468 的等待畫面 https://www.tp-link.com/tw/support/faq/331/
當電腦一開始啟動並顯示一些基本資訊時,按下 [Shift+F10] ,然後會出現 TG-3468 網路卡的設定功能表

 

小麥部落 linux 使用 wake on lan

https://wiki.debian.org/WakeOnLan#Hardware

 

systemctl  https://necromuralist.github.io/posts/enabling-wake-on-lan/

which ethtool
In my case the path was /sbin/ethtool, so once you know this you can create a file at /etc/systemd/system/wol.service (I think you can use another systemd sub-folder, and you can name the file anything you want, within reason, but this one seems to work well enough). In this file you put settings that look something like this:

[Unit]
Description=Enable Wake On Lan

[Service]
Type=oneshot
ExecStart = /sbin/ethtool --change enp4s0 wol g

[Install]
WantedBy=basic.target
The only thing specific to my machine is enp4s0, the name of the ethernet interface, although it's possible that the path to the ethtool executable might be different too… but it should be the same on Ubuntu 20.10, anyway.

Enable The Service
To enable it you can do this:

sudo systemctl daemon-reload
sudo systemctl enable wol.service
Where wol.service is the name of the file you created with the settings. You can check its status if you want.

systemctl status wol

 

發表於 Linux系統 | 發表迴響

[sublime]開啟BIG5檔案

sublime text 開啟excel 產生的csv檔案時會顯示亂碼,這時可以用File > Reopen with Encoding >BIG5 來解決這個問題
然後再用File > Set File Encoding to > utf8 存成 utf8的檔案格式

BIG5 的編碼在 sublime text 似乎也可以稱為Western(Windows 1252)

發表於 程式設計, 軟體使用 | 發表迴響

[excel]sport寫了兩個巨集,方便編輯賽程表

參考網址:如何在Excel中刪除括號中的內容?

ctrl+m 處理計時決賽(複製本身這一列,然後改成預賽和決賽)
 

Sub a()
'
' 巨集1 巨集
' 將計時決賽分成預賽與決賽
'
' 快速鍵: Ctrl+m
'
    ActiveCell.Rows("1:1").EntireRow.Select
    Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
    ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select
    Selection.Copy
    ActiveCell.Offset(-1, 0).Rows("1:1").EntireRow.Select
    ActiveSheet.Paste
    ActiveCell.Offset(0, 1).Range("A1").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = ActiveCell.Offset(1, 0).Value & "A"
    ActiveCell.Offset(0, 4).Range("A1").Select
    ActiveCell.FormulaR1C1 = "預賽"
    ActiveCell.Offset(1, 0).Range("A1").Select
    ActiveCell.FormulaR1C1 = "決賽"
    ActiveCell.Offset(1, 0).Range("A1").Select
End Sub

 

ctrl+b 去除混合運動的(1)
 

Sub b()
'
' b 巨集
' 去除混合運動的(1)
'
' 快速鍵: Ctrl+b
'
    Cells.Replace What:="(*)", Replacement:="", LookAt:=xlPart, SearchOrder _
        :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
End Sub

 

發表於 程式設計 | 發表迴響

[php]一個很奇怪的問題

當連結為score_input_new.php?act=edit 傳的參數為edit時,網頁會無法正常運作,以前就沒發現這個問題。

發表於 程式設計 | 發表迴響

[rasp]pi4升級chromium-browser

參考網址:

先移除 apt remove chromium-browser

再安裝 
apt update
apt install chromium-browser

下載:1 http://archive.raspberrypi.org/debian buster/main armhf chromium-browser-l10n all 92.0.4515.98~buster-rpt2 [4,073 kB]
下載:2 http://archive.raspberrypi.org/debian buster/main armhf chromium-browser armhf 92.0.4515.98~buster-rpt2 [118 MB]
下載:3 http://archive.raspberrypi.org/debian buster/main armhf chromium-codecs-ffmpeg-extra armhf 92.0.4515.98~buster-rpt2 [1,589 kB]

 

另一種安裝方式,用snap

https://snapcraft.io/install/chromium/raspbian

On a Raspberry Pi running the latest version of Raspbian snap can be installed directly from the command line:

sudo apt update
sudo apt install snapd

You will also need to reboot your device:

sudo reboot

After this, install the core snap in order to get the latest snapd:

sudo snap install core

Install chromium

To install chromium, simply use the following command:

sudo snap install chromium
發表於 Linux系統 | 發表迴響

[ubuntu]20.04安裝chrome瀏覽器

參考網址:https://ywnz.com/linux/6978.html

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

apt install ./google-chrome-stable_current_amd64.deb

 

 

發表於 Linux系統 | 發表迴響

[ubuntu]建立快照(還原點)

參考網址:https://kab49acb.pixnet.net/blog/post/344913032-create-a-snapshot-on-ubuntu-linux—在ubuntu上製作備份

sudo apt-add-repository -y ppa:teejee2008/ppa

sudo apt update

sudo apt install timeshift

選擇你的snapshot要存在哪裡,最好是選不是你放系統檔案的那個磁碟分割

 

另一個軟體systemback
https://ubuntuqa.com/zh-tw/article/10012.html
 

add-apt-repository "deb http://ppa.launchpad.net/nemh/systemback/ubuntu xenial main"

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 382003C2C8B7B4AB813E915B14E4942973C62A1B

apt update

apt install systemback

 

 

發表於 Linux系統 | 發表迴響

[rasp]瀏覽器更新

參考網址:https://ddeevv.com/question/my-chromium-version-is-really-old-qa8aa5.html

pi 4 用了一陣子了,原本安裝昀系統是Raspberry Pi Desktop Debian version: 10 (buster)
瀏覽器chromiun是 V74 已經太舊,有些google的服務跑不起來,想要更新。
 

sudo apt-get update

sudo apt-get upgrade chromium-browser

下了以上指令,系統更新好久,期間也出現馬一些錯誤,最後也沒有成功。
linux軟更新牽涉到許多的相性,真是不容易。

 

chromium 套件下載

https://chromium.woolyss.com/

 

deb arm
https://deb.debian.org/debian/pool/main/c/chromium/

 

發表於 Linux系統 | 發表迴響

[hinet]P880 Wake On Wan

參考網址:https://dokumen.tips/technology/p880-wake-on-wan.html

https://dokumen.tips/documents/p880-wake-on-wan-5654aea2d64b4.html

發表於 硬體維修, 軟體使用 | 發表迴響

[ubuntu]Ubuntu 20.04 上的 PPPoE 設定(含11.04)

參考網址:https://cjk.aiao.today/ubuntu-20-04-pppoe/

sudo apt install pppoeconf

sudo pppoeconf

手動撥接

sudo pon dsl-provider

中斷連線

sudo poff -a

確認撥接狀態及IP

執行 ip address show ppp0 紅框內就是 IP。

在 /etc/ppp 目錄下,chap-secrets 和 pap-secrets 兩個檔案裡,可以查到撥接的帳號、密碼。

 

在11.04的環境中,安裝完PPPOE之eth0的ipv4設定會不見,
解決方法:
原本在mini server中網路的設定是用NetworkManage管理的
設定完pppoeconf 之後卻變成用networking管理,並且把iface eth0 inet 改成manual
所以得到/etc/network 修改interface檔案

Static 設定方式:

auto eth0
iface eth0 inet static
address 192.168.1.90
netmask 255.255.255.0
gateway 192.168.1.254

 

接著設定 DNS:

sudo vi /etc/resolv.conf
 

輸入:

nameserver 168.95.1.1

然後重新啟動網路服務:

sudo /etc/init.d/networking restart

 

發表於 Linux系統 | 發表迴響