Ubuntu使用技巧
命令
获取系统安装包的编译源码及脚本
apt-get source package
查询端口被占用的进程
lsof -i:端口号
配置
配置阿里源
# mv /etc/apt/source.list /etc/apt/source.list.bak
# vim /etc/apt/sources.list
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
SSH允许ROOT登入
### 编辑配置文件,修改'PermitRootLogin without-password'为'PermitRootLogin yes'
# vim /etc/ssh/sshd_config
### 重启ssh服务
# service ssh restart
切换成GNOME界面
# apt-get install gnome-shell
# apt-get install gnome-panel
# apt-get install gnome-terminal
# apt-get install plymouth-label
# apt-get install open-vm-tools
切换窗口管理器
# dpkg-reconfigure gdm
apt源更新报错
E: Failed to fetch cdrom://Ubuntu-Server 16.04 LTS _Xenial Xerus_ - Release amd64
### 删除apt配置文件对应源 deb cdrom:XX
# vim /etc/apt/sources.list
启动VNC服务
### Ubuntu 14.04 TLS
# vnc4server -geometry 1600x1080 :2
# vnc4server -kill :2
时间同步
### 修改时区
# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
### 安装NTP并同步时间
# apt install chrony
# chronyc sources
Ubuntu Server添加中文支持
### 安装language support
# apt install language-pack-zh-hans
# apt install language-selector-gnome
### language support的键盘输入模式系统选择iBus
### Region & Language的Input Sources添加Chinese(SunPinyin)
### 最后必须关机
# halt
软件自动更新设置
### 编辑自动更新配置文件,去掉需要自动更新的软件注释
# vim /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
// "${distro_id}:${distro_codename}-updates";
// "${distro_id}:${distro_codename}-proposed";
// "${distro_id}:${distro_codename}-backports";
};
### 开启软件自动更新
# vim /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "1"; //显示更新包列表,0表示停用设置
APT::Periodic::Download-Upgradeable-Packages "0"; //下载更新包,0表示停用设置
APT::Periodic::AutocleanInterval "0"; //N日后自动清理软件包
APT::Periodic::Unattended-Upgrade "1"; //启用自动更新,0表示停用自动更新
安装rabbitmq-server
### 安装rabbitmq
# apt-get install rabbitmq-server
# systemctl start rabbitmq-server
# systemctl enable rabbitmq-server
### 开启web访问
# vim /etc/rabbitmq/rabbitmq.config
[{rabbit, [{loopback_users, []}]}].
# rabbitmq-plugins enable rabbitmq_management
# systemctl restart rabbitmq-server
Ubuntu使用技巧的更多相关文章
- 【Ubuntu日常技巧】【解决】Ubuntu 16 右上角的音量调节通知框不停地闪烁问题
一. 先上干货 解决问题 1.1 安装工具alsa-tools-gui sudo apt-get install alsa-tools-gui 1.2 通过hdajackretask设置 直接执行命令 ...
- 【Ubuntu日常技巧】VirtualBox多网卡路由配置,保障虚拟机连接上外网
[背景]: 配置Ubuntu 虚拟机双网卡,一个是Host-Only网络,一个是桥接网络.当在虚拟机中同时连接到两个网络后,虚拟机能够ping通内部网络,不能ping通外部网络,如www.baidu. ...
- Ubuntu 小技巧
一.获得当前文件夹的路径: 在目标文件夹下,按Ctrl+l此文件的路径会被选中 之后Ctrl+c复制.要复制到终端(Terminal),选中终端按鼠标的滚轮就粘贴到了Terminal命令行中了. 二. ...
- 2016021901 - ubuntu截图技巧
ubuntu系统自带截图功能使用介绍 ubuntu自定义截图快捷键:Shift+PrtSc 截取当前窗口快捷键:Alt+PrtSc 保存全屏截图:PrtSc
- Ubuntu小技巧——怎样安装谷歌Chrome浏览器
对于刚刚开始使用Ubuntu并想安装谷歌Chrome浏览器的新用户来说,本文所介绍的方法是最快捷的.在Ubuntu上安装谷歌Chrome的方法有很多.一些用户喜欢直接在谷歌Chrome下载页面获得 d ...
- ubuntu小技巧(不定期更新)
1.gedit打开windows保存的txt出现乱码 默认情况下,用ubuntu打开windows保存含有中文的txt文件时会出现乱码. 只需在终端运行以下两条命令则可解决. gsettings se ...
- ubuntu常用技巧积累
1.修改root密码,一般与用户密码不同 python@ubuntu:~$ sudo passwd[sudo] password for python: 输入新的 UNIX 密码: 重新输入新的 UN ...
- VMware虚拟机 Ubuntu 实用技巧 (1) -- 安装VMware Tool
1.用VM安装Ubuntu后屏幕太小? 2.Ubuntu中的文本与window中的文本不能互相复制黏贴? 如果你遇到以上问题,可以通过在VMware里安装“VMware Tool”插件解决!! 安装步 ...
- ubuntu实用技巧
添加alias ~/.bash_alias文件: alias go="python /Users/xhat/Downloads/goagent/local/proxy.py" ~/ ...
随机推荐
- QT MVC 模型/视图
1. 模型视图实例一, QFileSystemModel QTreeView ,model/view示例. #include <QApplication> #include <QF ...
- Android GreenDao 中文表名,中文字段DAO生成乱码的问题
在gradle.properties 文件中加入编码类型 # Project-wide Gradle settings. # IDE (e.g. Android Studio) users: # Gr ...
- linux学习-文件打包与压缩
- java.sql.SQLException: Column count doesn't match value count at row 1 Query: insert into category values(null,?,?,?) Parameters: [1111111, 1111, 软件]
java.sql.SQLException 问题: java.sql.SQLException: Column count doesn't match value count at row 1 Que ...
- 京东自营,你TM太坑了。
双12来了,京东自营好坑.昨天(12月6日)看的一条秋裤,89元,今天准备买,居然涨到了119,他大爷的. 京东你大爷的.
- 【leetcode刷题笔记】Construct Binary Tree from Preorder and Inorder Traversal
Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that ...
- GridView有用的小方法--2017年2月13日
原文:http://blog.csdn.net/21aspnet/article/category/285354更多:http://blog.csdn.net/21aspnet/article/cat ...
- webpack打包APP的后端地址处理
PC端我们用webpack打包,只需要写相对路径,发布的时候和后端接口在同一目录下即可. 但是做过APP或者混合开发的同学都知道,APP不需要发布的,如果后端地址还是用相对路径的话,可想而知,调用后端 ...
- RabbitMQ队列,Redis\Memcached缓存
RabbitMQ RabbitMQ是一个在AMQP基础上完整的,可复用的企业消息系统. MQ全称Message Queue,消息队列(MQ)是一种应用程序对应用程序的通信方式.应用程序通过读写出入队列 ...
- TModJS:template
ylbtech-TModJS: 1.返回顶部 2.返回顶部 3.返回顶部 4.返回顶部 5.返回顶部 6.返回顶部 作者:ylbtech出处:http://ylbtech. ...