新增root账户
sudo passwd root
然后设置root的密码
----------------------------------------------------------------------------------------------------------
安装软件 命令apt
在Ubuntu下,apt-get近乎是最常用的shell命令之一了,因为他是Ubuntu通过新立得安装软件的常用工具命令。
本文列举了常用的APT命令参数:
-
apt-cache search package 搜索软件包
-
apt-cache show package 获取包的相关信息,如说明、大小、版本等
-
sudo apt-get install package 安装包
-
sudo apt-get install package --reinstall 重新安装包
-
sudo apt-get -f install 修复安装
-
sudo apt-get remove package 删除包
-
sudo apt-get remove package --purge 删除包,包括配置文件等
-
sudo apt-get update 更新源
-
sudo apt-get upgrade 更新已安装的包
-
sudo apt-get dist-upgrade 升级系统
-
apt-cache depends package 了解使用该包依赖那些包
-
apt-cache rdepends package 查看该包被哪些包依赖
-
sudo apt-get build-dep package 安装相关的编译环境
-
apt-get source package 下载该包的源代码
-
sudo apt-get clean && sudo apt-get autoclean 清理无用的包
-
sudo apt-get check 检查是否有损坏的依赖
------------------------------------------------------------------------------------------
安装git 、vim、Chrome浏览器
root下面
apt install git
apt install vim
安装Chrome浏览器
下载Chrome 的 deb包
dpkg -i file.deb
安装
----------------------------------------------------------
配置vim 、git
git用git config 配置
然后git clone自己的仓库
vim
----------------------------------------------------------
配置java开发环境
解压放到/etc/opt/自己建立文件夹 下
然后配置全局环境变量
-------------------------------------------------------------------------------------
iftop 一个小工具 可用于查看实时的流量
---------------------------------------------------------------------------------------
摘录自http://www.linuxdiyf.com/linux/16710.html
ubuntu15.10允许ssh远程登录(开通22端口)
当我们安装好ubuntu,用ssh远程登录时,会出现如下错误。
[c:\~]$ ssh 192.168.142.84 Connecting to 192.168.142.84:22... Could not connect to '192.168.142.84' (port 22): Connection failed. Type `help' to learn how to use Xshell prompt. 错误显示,该IP地址的22端口连接失败。 解决方法如下: (1)关闭防火墙,执行sudo ufw disable nii@nii:~$ sudo ufw disable [sudo] password for nii: Firewall stopped and disabled on system startup (2)安装OpenSSH,执行sudo apt-get install openssh-server openssh-client命令。 (3)执行netstat -tnl命令,查看22端口是否开通。 nii@nii:~$ netstat -tnl Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 ::1:631 :::* LISTEN 倒数第二行可以看到22端口已经处于LISTEN状态。 ssh远程登录服务器时提示‘Permission denied (publickey)‘的解决:http://www.linuxdiyf.com/linux/15699.html Linux下SSH远程连接服务慢解决方案:http://www.linuxdiyf.com/linux/12318.html 采用SSH远程执行命令:http://www.linuxdiyf.com/linux/6110.html Ubuntu下SSH远程连接:http://www.linuxdiyf.com/linux/4436.html |
Ubuntu下远程连接需要用到openssh-client,openssh-server。故名思意,连接方只要装上openssh-client就可以了,被连方需要装openssh-server,当然也可以都装上,这样每一方都可以是服务器或客户端以便实现互连。
装上以后,启动ssh服务,运行sudo /etc/init.d/ssh start
查看ssh是否启动成功 netstat -tlp
最后运行命令ssh -l remote_username remote_serverip即可,如ssh -l test 192.168.1.222
--------------------------------------------------------------------------------------