Linux - chanandrew96/MyLearning GitHub Wiki
在使用SSH連線時,如果發現了現有的連線與以往在電腦上的紀錄不同時會出現WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
的警告。
如果這是一個已知的原因,可以通過清除對應的紀錄。
ssh-keygen -R <IP-Address>
rm -rf /root/.ssh/known_hosts
vim /root/.ssh/known_hosts
SSH連線出現錯誤 WARNING REMOTE HOST IDENTIFICATION HAS CHANGED
systemctl
用於控制systemd系統和管理系統上運行的服務
apt
用於取代apt-get
,apt
對於處理每個套件的依賴上有更好的處理,會判斷以正確順序安裝套件的複雜相依性鏈結,同時會提供可升級的套件
apt
整合了apt-get
和apt-cache
的功能
兩者間更多的差異可參考aws上的文件
列出块设备信息
lsblk
lsblk命令 – 查看系统的磁盘使用情况
磁盘分区
cfdisk命令 – 用于磁盘分区
Linux上使用Service Unit來建立與Windows Service類似的服務,要建立Service Unit我們先要建一個.service
檔案
Automount need to use with Mount
Quota from Mount vs automount systemd units: which one to use for what?
automount units are optional; but, when they exist, corresponding mount units must also exist.
- Running a .NET application as a service on Linux with Systemd
- How To Use Systemctl to Manage Systemd Services and Units
- How to start program at Linux boot automatically
- How to Specify a Working Directory for a systemd Service
- Systemd Unit File Permissions
- Chapter 10. Managing Services with systemd
- automount(8) - Linux man page
- Automatic mounts with systemd
- systemd.service
- systemd.mount
- How to mount partition using systemd unit file?
- Where do I put my systemd service? [duplicate]
- Unix Timestamp sample:
1704271981
- Unix DateTime sample:
2024-01-03T07:20:50.022686119Z
Command | Purpose |
---|---|
DateTimeOffset.FromUnixTimeSeconds(Timestamp).DateTime |
Convert Unix Timestamp to DateTime in C# |
DATEADD(s, CAST(Timestamp as float), '1970-01-01') |
Convert Unix Timestamp to DateTime in SQL Server |
CAST(Timestamp as datetime2) |
Convert Unix DateTime to DateTime2 in SQL Server |
(Get-Date -Date "1970-01-01 00:00:00Z").toUniversalTime().addSeconds(1704272015) |
Convert Unix Timestamp to DateTime in PowerShell |