Ubuntu

作者: 宋song一 | 来源:发表于2020-02-18 10:08 被阅读0次

linux 所有版本的vscode:
http://packages.microsoft.com/repos/vscode/pool/main/c/code/
ubuntu 20.04的ibp插件不支持vscode1.52版本,1.39版本可用
在 Linux上 安装 Docker:
curl -sSL https://get.daocloud.io/docker | sh

设置时区(19.04后): timedatectl set-timezone Asia/Shanghai

【Linux】Ubuntu 安装 openjdk8

sudo apt-get update
sudo apt-get install openjdk-8-jdk
ubuntu卸载命令,如何卸载vscode
搜索:apt-cache search 软件包名
查看软件包详情:apt-cache show 软件包名

Linux解压文件到指定目录

tar在Linux上是常用的打包、压缩、加压缩工具,他的参数很多,折里仅仅列举常用的压缩与解压缩参数

参数:
-c :create 建立压缩档案的参数;
-x : 解压缩压缩档案的参数;
-z : 是否需要用gzip压缩;
-v: 压缩的过程中显示档案;
-f: 置顶文档名,在f后面立即接文件名,不能再加参数

举例: 一,将整个/home/www/images 目录下的文件全部打包为 /home/www/images.tar

tar -cvf /home/www/images.tar /home/www/images ← 仅打包,不压缩
tar -zcvf /home/www/images.tar.gz /home/www/images ← 打包后,以gzip压缩
在参数f后面的压缩文件名是自己取的,习惯上用tar来做,如果加z参数,则以tar.gz 或tgz来代表gzip压缩过的tar file文件

1 将tgz文件解压到指定目录
tar zxvf test.tgz -C 指定目录
比如将/source/kernel.tgz解压到 /source/linux-2.6.29 目录

tar zxvf /source/kernel.tgz -C /source/ linux-2.6.29

2 将指定目录压缩到指定文件
比如将linux-2.6.29 目录压缩到 kernel.tgz

tar czvf kernel.tgz linux-2.6.29

查看IP地址
Ubuntu vi 命令大全 ,vi比vim要麻烦许多。也可以使用gedit编辑(打开速度太慢)
ifconfig 命令详解

一、Ubuntu更换成国内的源

先备份原来的源列表文件

mv /etc/apt/sources.list /etc/apt/sourses.list.backup

新建源列表文件

vim /etc/apt/sources.list

加入源地址(推荐用阿里云源)

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

更新软件列表

sudo apt-get update

更新软件(把已安装的软件与刚刷新的软件列表中的版本进行对比,如果发现已安装的软件版本太低,就会提示更新)

sudo apt-get upgrade

相关文章

网友评论

      本文标题:Ubuntu

      本文链接:https://www.haomeiwen.com/subject/bdowfhtx.html