ubuntu22.04上手指南(更新阿里源、安装ssh、安装chrome、设置固定IP、安装搜狗输入法)

ubuntu22.04上手指南(更新阿里源、安装ssh、安装chrome、设置固定IP、安装搜狗输入法)

一、更新并安装基础软件

shell 复制代码
#切换root用户
sudo su -

#更新
apt update 

#升级
apt upgrade

#install vim
apt install vim

#install net-tools
apt install net-tools

二、安装ssh并设置开机自启动

shell 复制代码
#install ssh
apt install openssh-server
apt install openssh-client

#重启ssh服务
service ssh restart

vim /root/.bashrc
#文件末尾增加一条记录service ssh start
service ssh start

#将PermitRootLogin的值改为yes,/搜索即可,超级简单
vim /etc/ssh/sshd_config
PermitRootLogin yes

#放开22端口
ufw allow 22

三、安装chrome浏览器

chrome官网下载chrome的deb安装包

shell 复制代码
#使用wget命令下载最新版chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

#安装chrome
dpkg -i google-chrome-stable_current_amd64.deb

#也可以手动下载,然后切换到下载目录
cd /home/jason/Download

#install chrome
dpkg -i google-chrome-stable_current_am64.deb

四、设置ubuntu更新源为阿里源

shell 复制代码
#更换阿里源
vim /etc/apt/sources.list

#清除原有文件内容
:%d

#把下面的贴过去
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

#更新
apt update 

#升级
apt upgrade

五、命令行设置静态IP地址

shell 复制代码
#进入网络管理目录
cd /etc/netplan

root@kelsen-ubuntu-desktop:/etc/netplan# ls
01-network-manager-all.yaml

vim 01-network-manager-all.yaml

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    ens33:      #ens33可根据命令ifconfig -a 显示的网卡名
      dhcp4: false
      addresses:
        - 192.168.1.114/24  # 将此处的IP地址替换为你想要设置的静态IP地址
      optional: true
      routes:
        - to: default
          via: 192.168.31.1  # 将此处的网关地址替换为你家庭路由器的网关地址
      nameservers:
        addresses: [192.168.31.1,8.8.8.8,8.8.4.4]  # 可根据需要修改为你常用的DNS服务器地址

# 设置600的文件权限,否则会报错Permissions for /etc/netplan/01-network-manager-all.yaml are too open. Netplan configuration should NOT be accessible by others.
chmod 600 /etc/netplan/01-network-manager-all.yaml

#应用
netplan apply

六、安装搜狗输入法

shell 复制代码
#下载输入法网址 http://pinyin.sogou.com/linux/

#安装fcitx并设置开机启动
apt install fcitx fcitx-table-wbpy
cp /usr/share/applications/fcitx.desktop /etc/xdg/autostart/

#卸载ibus
apt purge ibus

#安装搜狗拼音
dpkg -i sogoupinyin_4.2.1.145_amd64.deb
 
#安装输入法依赖
apt install libqt5qml5 libqt5quick5 libqt5quickwidgets5 qml-module-qtquick2  -y
apt install libgsettings-qt1 -y

#重启电脑
reboot

#右上角输入法图标 -- confing -- + -- 搜索sogou



相关推荐
鸿蒙布道师14 分钟前
OpenAI为何觊觎Chrome?AI时代浏览器争夺战背后的深层逻辑
前端·人工智能·chrome·深度学习·opencv·自然语言处理·chatgpt
袈裟和尚19 分钟前
如何在安卓平板上下载安装Google Chrome【轻松安装】
前端·chrome·电脑
hgdlip2 小时前
关闭IP属地显示会影响账号的正常使用吗
网络·网络协议·tcp/ip·ip属地
中云时代-防御可测试-小余2 小时前
高防IP是如何防护DDoS攻击和CC攻击的
运维·服务器·tcp/ip·安全·阿里云·ddos·宽度优先
Zz_waiting.2 小时前
网络原理 - 7(TCP - 4)
网络·网络协议·tcp/ip
爱编程的鱼3 小时前
Windows 各版本查找计算机 IP 地址指南
人工智能·windows·网络协议·tcp/ip·tensorflow
??? Meggie4 小时前
Selenium 怎么加入代理IP,以及怎么检测爬虫运行的时候,是否用了代理IP?
爬虫·tcp/ip·selenium
xxy!5 小时前
OSI七层模型和TCP/IP四层模型
网络·网络协议·tcp/ip
unique_pursuit5 小时前
CS144 Lab 6 实战记录:构建 IP 路由器
网络·tcp/ip·智能路由器
我的golang之路果然有问题8 小时前
给git配置SSH(github,gitee)
经验分享·笔记·git·学习·gitee·ssh·github