新装debian常用操作

时间ntp

bash 复制代码
apt-get update
apt-get install ntp
#编辑配置
nano /etc/ntp.conf

填写内容如下:

bash 复制代码
server your-ntp-server
#(可选)如果您的网络中有本地的 NTP 服务器,您可以添加以下行以使用本地服务器
server your-local-ntp-server iburst
#重启
systemctl restart ntp
#检查 NTP 服务器的状态
systemctl status ntp
#检查系统时间和同步状态
date

安装 OpenSSH 服务器

bash 复制代码
sudo apt update
sudo apt install openssh-server
sudo systemctl status ssh

#要确保 SSH 服务器在系统启动时自动启动,可以运行以下命令:
sudo systemctl enable ssh

设置固定ip

bash 复制代码
sudo nano /etc/network/interfaces

配置如下 eht1更具需要修改

iface eth1 inet static

address your_static_ip

netmask your_subnet_mask

gateway your_gateway_ip

dns-nameservers your_dns_server_ip

重启网卡

bash 复制代码
sudo systemctl restart networking
相关推荐
Lacrimosa&L1 小时前
操作系统概述
运维
Guheyunyi1 小时前
风险感知中枢:监测预警系统的架构与核心
大数据·运维·安全·重构·架构·自动化
东城绝神1 小时前
《Linux运维总结:基于X86_64+ARM64架构CPU使用docker-compose一键离线部署consul 1.21.5容器版集群》
linux·运维·docker·架构·consul
wheeldown2 小时前
【Linux】Linux进程间通信:命名管道(FIFO)的模拟实现重要知识点梳理
linux·运维·服务器
Crazy________2 小时前
34部署LNMP架构详细解析
linux·运维·服务器·nginx
刺客xs2 小时前
linux GDB调试器
linux·运维·windows
ONE_SIX_MIX3 小时前
Debian 的 网络管理器 被意外卸载,修复过程
服务器·网络·debian
板鸭〈小号〉3 小时前
connect 的断线重连
运维·服务器
黄昏晓x4 小时前
Linux----权限
linux·运维·服务器