分享页面
已经找到“” 的记录2696条
Ubuntu18.04系统如何配置单网卡多IP
 

ubuntu18.04中如何配置单网卡多ip呢?本文给出详细说明。

1.在网卡eth0上增加一个192.169.100.2ip

sudo ifconfig eth0:0 192.168.100.2 netmask 255.255.255.0

2.查看增加ip后本机的ip信息

ifconfig

 

3.删除新增加的ip

sudo ifconfig eth0:0 down

4.查看删除后本机的IP信息

 

Ubuntu18.04系统如何临时修改MAC地址
 

ubuntu18.04中如何临时修改MAC地址呢?本文给出详细说明。

1.首先查看网卡信息

2.关闭网卡

sudo ifconfig eth0 down

3.修改mac地址

sudo ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE

4.开启网卡

sudo ifconfig eth0 up

5.查看修改后的网卡信息

Ubuntu18.04系统如何禁止sshd服务使用tcp转发
 

ubuntu18.04中如何禁止sshd服务使用tcp转发呢?本文给出详细说明。

1.打开sshd_config文件

vi /etc/ssh/sshd_config

2.#AllowTcpForwarding yes改为 AllowTcpForwarding no后保存退出

Ubuntu18.04系统如何禁用密码登录
 

ubuntu18.04中如何禁用密码登录呢?本文给出详细说明。

1.打开sshd_config文件

vi /etc/ssh/sshd_config

2.#PasswordAuthentication yes改为PasswordAuthentication no后保存退出

Ubuntu18.04系统如何禁用公钥登录
 

ubuntu18.04中如何禁用公钥登录呢?本文给出详细说明。

1.打开sshd_config文件

vi /etc/ssh/sshd_config

2.#PubkeyAuthentication yes改为PubkeyAuthentication no后保存退出

Ubuntu18.04系统如何进行网络测速
 

Ubuntu18.04系统中,如何进行网络测速?本文将针对此问题进行详细说明。1.首先更新软件列表

sudo apt-get update

2.下载测试脚本

wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py

3.修改脚本权限

chmod 755 speedtest.py

将脚本放到系统命令文件中

mv speedtest.py /usr/bin/

4.运行命令

speedtest.py

可以看到测试结果

 

Ubuntu18.04系统如何后台运行程序
 

ubuntu18.04中如何使程序后台运行呢?本文给出详细说明。

1.后台运行程序

nohup 程序 &

2.查看正在后台运行的程序

jobs -l

3.停止正在后台运行的程序

kill -9 pid

Ubuntu18.04系统如何禁用root用户登录
 

ubuntu18.04中如何禁用root用户登录呢?本文给出详细说明。

1.打开sshd_config文件

vi /etc/ssh/sshd_config

2.PermitRootLogin yes 改为 PermitRootLogin no后保存退出

说明:在禁止root用户登录之前,请先确认已存在其他可以ssh登录的账户

Ubuntu18.04系统如何操作关机重启相关命令
 

Ubuntu18.04系统中,如何进行关机重启?本文将针对此问题进行说明。

 

1.shutdown

格式:shutdown -选项 时间

说明:不指定选项和参数,默认表示 1 分钟之后关闭电脑

常用命令示例

# 重新启动操作系统,其中 now 表示现在

$ shutdown -r now

# 立刻关机,其中 now 表示现在

$ shutdown now

# 系统在今天的 20:25 会关机

$ shutdown 20:25

# 系统再过十分钟后自动关机

$ shutdown 10

# 取消之前指定的关机计划

$ shutdown -c

 

2.poweroff

立刻关机

 

3.reboot

立刻重启

 

4.init

 

ubuntu系统的运行级别分为7

0 代表系统停机也就是关机状态

1 代表单用户或者系统维护状态

3 代表命令行

5 代表图形界面

6 代表重新启动

 

因此init 0可以用来关机

init 6可以用来重启

Ubuntu18.04系统如何安装typescript
 

TypeScriptJavaScript类型的超集,它可以编译成纯JavaScript。那么在ubuntu18.04中如何安装TypeScript呢?本文给出详细说明。

1.首先更新软件列表

sudo apt-get update

2.安装node.jsnpm

sudo apt-get install nodejs

sudo apt-get install npm

3.安装typescript

sudo apt-get install node-typescript

4.查看typescript版本

tsc -v

安装完成

扫码添加专属客服

扫码关注公众号