ubuntu


ubuntu修改root密码
sudo passwd root

 

ubuntu 20.04修改ip 

sudo vi /etc/netplan/00-installer-config.yaml

network:
  ethernets:
    enp2s0:
      dhcp4: no
      addresses: [192.168.10.122/24]
      gateway4: 192.168.10.1
      nameservers:
              addresses: [8.8.8.8, 114.114.114.114]
  version: 2

sudo netplan apply

  

 ssh允许root用户

sudo vim /etc/ssh/sshd_config

PermitRootLogin prohibit-password
改为
PermitRootLogin yes

sudo service sshd restart

  

ubuntu20开机自动启动某服务

systemctl enable acpid

  

 ubuntu共享文件夹

apt install samba
mkdir /home/share
chmod 777 /home/share
vim /etc/samba/smb.conf

[ubuntu-share]
path = /home/share
public = yes
writable = yes
#valid users = root
create mask = 0644
force create mode = 0644
directory mask = 0755
force directory mode = 0755
available = yes

# 设置root用户的密码(打开上面的注释需要设置密码)
#smbpasswd -a root

#/etc/init.d/samba-ad-dc restart
service smbd restart
service smbd status

  

# 开启SMB1.0
vim /etc/samba/smb.conf
# 在[global]下加入下面一行
server min protocol = CORE

service smbd restart

  

aria2

https://www.10bests.com/deploy-aria2-webui-on-ubuntu-and-debian/

https://blog.csdn.net/Erwinl/article/details/111856324

 

修改时区

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

  

 

 

 

E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

 1 ps -A | grep apt
 2 # 1234 aptd
 3 kill -9 1234
 4 
 5 rm /var/lib/dpkg/lock
 6 dpkg --configure -a
 7 
 8 rm /var/lib/apt/lists/lock
 9 rm /var/cache/apt/archives/lock
10 apt update

 

 

posted on 2022-08-30 15:46  floud  阅读(126)  评论(0编辑  收藏  举报