当前位置:   article > 正文

ubuntu18.04常用操作_remmina rdp plugin

remmina rdp plugin

安装 chrome

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

sudo dpkg -i google-chrome-stable_current_amd64.deb
  • 1
  • 2
  • 3

安装网络工具

 sudo apt install -y net-tools
 sudo apt install -y iputils-ping
 sudo apt install -y telnet
  • 1
  • 2
  • 3

安装 vim

sudo apt install -y vim
  • 1

启动 springboot 程序

nohup java -Xdebug -Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=8100 -jar coffee-1.0.jar --spring.config.location=application.yml,application-dev.yml --logging.config=logback.xml 2>&1 &
  • 1

查询进程并 kill

kill -9 `ps -ef|grep coffee-1.0.jar | grep -v grep|awk '{print $2}'`
ps -ef | grep hello | grep -v grep | awk '{print $2}' | xargs kill -9
  • 1
  • 2

dos2unix

sudo apt install -y dos2unix
dos2unix t.sh
dos2unix *
  • 1
  • 2
  • 3

修改mydir 目录所属用户和组

chown -R mm:mm mydir
  • 1

kvm

# 查看镜像信息
qemu-img info bionic-server-cloudimg-amd64.img
# 把 vmware 虚拟机转化成 qcow2 
qemu-img convert -f vmdk -O qcow2 Windows_Server_2019_1909-disk1.vmdk w2019.img
  • 1
  • 2
  • 3
  • 4

ssh

终端与服务器保持心跳,编辑文件

 vim /etc/ssh/ssh_config
  • 1

添加配置

 ServerAliveInterval 30
 ServerAliveCountMax 10
  • 1
  • 2

hash计算

md5sum master.ova
  • 1

不能与主机共享剪贴板(vmware)

apt update
apt install open-vm-tools open-vm-tools-desktop
reboot
  • 1
  • 2
  • 3

搜索日志

cat xxx.log | grep key
grep -a key xxx.log  #解决Binary file (standard input) matches
grep -rn "xxx" * #递归搜索所有文件,并且显示行号
  • 1
  • 2
  • 3

查看安装软件的版本

dpkg -l | grep nfs
  • 1

开启远程桌面

在这里插入图片描述
开启后,客户端包安全错误,可取消加密

gsettings set org.gnome.Vino require-encryption false
  • 1

连接windows server 2012 r2 远程桌面

使用 Remmina, 可远程连接 windows系统桌面,如下图:
ubuntu 18.04 连接 windows系统桌面

连接出错解决

如果连接出现如下错误:
You requested an H264 GFX mode for server app.localhost.com, but your libfreerdp does not support H264. Please check Color Depth Settings
解决:

# 添加 remmina 仓库
sudo apt-add-repository ppa:remmina-ppa-team/remmina-next
sudo apt update

#重新安装 remmina
sudo apt install remmina remmina-plugin-rdp remmina-plugin-secret

#关掉所有 remmina 进程
sudo killall remmina
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

参考:https://blog.csdn.net/Joker00007/article/details/112950609

切换到root

#使用当前用户环境
sudo -s
#同时切换到root用户环境
sudo su
  • 1
  • 2
  • 3
  • 4

git linux和windows换行符差异解决

大部分时候在windows上开发,有时候需要在linux上调试。因为换行符的差异,linux上看到所有文件都被改变了。在linux系统上项目目录下,执行命令

git config core.autocrlf input
  • 1

测试磁盘读写速度

 time dd if=/dev/zero of=t.img bs=32k count=102400 #写速度
 time dd if=t.img of=/dev/null bs=32k
  • 1
  • 2

openssl

 openssl pkey -in apiserver.key -noout -text #查看秘钥
 openssl x509 -in apiserver.crt -noout -text #查看证书
  • 1
  • 2

ubuntu云镜像设置root用户密码

sudo apt install libguestfs-tools
#把root密码设置为123456
virt-customize -a focal-server-cloudimg-amd64.img --root-password password:123456
  • 1
  • 2
  • 3

锁定内核版本

sudo apt-mark hold linux-image-5.4.0-148-generic
sudo apt-mark hold linux-headers-5.4.0-148-generic
sudo apt-mark hold linux-modules-5.4.0-148-generic
sudo apt-mark hold linux-modules-extra-5.4.0-148-generic
  • 1
  • 2
  • 3
  • 4

ubuntu历史版本

https://old-releases.ubuntu.com/releases/20.04.4/
  • 1

#dhcp refresh ip

sudo dhclient -r enp0s8
sudo dhclient enp0s8
  • 1
  • 2

查看系统状态

cpu

top 1
  • 1

or

mpstat -P all 1
  • 1

内存

vmstat 1
  • 1

磁盘

iostat -d -k 1
  • 1

进程

pidstat -t -p xx 1 #thread
pidstat -w -p xx 1 #上下文切换
  • 1
  • 2

查看 docker 绑定

docker inspect xxx|grep Pid
taskset -c -p yyy
  • 1
  • 2
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/402890
推荐阅读
  

闽ICP备14008679号