【自用】Ubuntu 安装后配置

【自用】Ubuntu 安装后配置

1. 开启SSH服务

 

网上有很多介绍在Ubuntu下开启SSH服务的文章,但大多数介绍的方法测试后都不太理想,均不能实现远程登录到Ubuntu上,最后分析原因是都没有真正开启ssh-server服务。最终成功的方法如下:

sudo apt-get install openssh-server

Ubuntu缺省安装了openssh-client,所以在这里就不安装了,如果你的系统没有安装的话,再用apt-get安装上即可。

然后确认sshserver是否启动了:

ps -e |grep ssh

如果只有ssh-agent那ssh-server还没有启动,需要/etc/init.d/ssh start,如果看到sshd那说明ssh-server已经启动了。

ssh-server配置文件位于/ etc/ssh/sshd_config,在这里可以定义SSH的服务端口,默认端口是22,你可以自己定义成其他端口号,如222。然后重启SSH服务:

sudo /etc/init.d/ssh resar

 

2. 安装python-opencv

 sudo apt-get install python-opencv

3.安装VIM

  sudo apt-get install vim

4.配置开机系统启动次序

ubuntu/linux升级后编辑多核心的启动菜单并修改默认菜单为windows

备份一下源文件: cp /boot/grub/menu.lst /boot/grub/menu.lst.backup

编辑菜单文件: sudu gedit /boot/grub/menu.lst

然后会打开文本编辑器:

在不要的核心启动项目的行前面添加#即可,例如

#title           Ubuntu, kernel 2.6.17-10-generic

#root            (hd0,2)

#kernel          /boot/vmlinuz-2.6.17-10-generic root=/dev/sda3 ro quiet splash locale=zh_CN

#initrd          /boot/initrd.img-2.6.17-10-generic

#quiet

#savedefault

#boot

#title           Ubuntu, kernel 2.6.17-10-generic (recovery mode)

#root            (hd0,2)

#kernel          /boot/vmlinuz-2.6.17-10-generic root=/dev/sda3 ro single

#initrd          /boot/initrd.img-2.6.17-10-generic

#boot

最后一段的window复制到引导段的最前端:

# This entry automatically added by the Debian installer for a non-linux OS

# on /dev/sda1

title           Microsoft Windows XP Professional

root            (hd0,0)

savedefault

makeactive

chainloader     +1

分割段复制到第二段,也可以删除:

# This is a divider, added to separate the menu items below from the Debian

# ones.

title           Other operating systems:

root

其中各个段的title就是启动菜单项目的名称,可以自己修改,例如

title           Other operating systems:

可以修改为:

title           --------------------------------

这样更加清晰一些.

启动菜单还有颜色可选择,默认是被注释掉的,详情请查看相关注释,好像是#color那一行.默认有蓝白/黑白模式,也可以自己填入其他颜色

 

 

方法2:

1、打开命令行终端;
2、输入:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bak
sudo gedit /boot/grub/menu.lst
注: 第一句做备份用。
3、假设文件内容如下:
-------------------------------------------------------------
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,2)
#          kernel /vmlinuz-version ro root=/dev/hda5
#          initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
title Fedora Core (2.4.22-1.2115.nptl)
root (hd0,2)
kernel /vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ hdc=ide-scsi rhgb
initrd /initrd-2.4.22-1.2115.nptl.img
title winxp
rootnoverify (hd0,0)
chainloader +1

-------------------------------------------------------------
现在default值为0,意即启动排行第一的操作系统,这里代表的就是Ubuntu, kernel 2.6.15-23-386。
现在把它修改成“default 1”,那么XP就成为默认的操作系统了。
因为从零数起,以title打头的Microsoft Windows XP Professional这一行排序为1。
另外我们还可以通过修改timeout的值来变更默认等待时间。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值