ubuntu学习笔记<二>

本文介绍了如何使用xrandr命令调整Ubuntu系统的屏幕显示设置,包括分辨率、刷新频率及多显示器配置等。此外,还提供了添加Windows启动项、更改计算机名称、安装vim编辑器以及更新软件源的方法。
命令:xrandr
当该命令不带参数时:
 xrandr 可以查看当前屏幕分辨率和刷新频率
当该命令带参数时,详细用法如下:
 xrandr --output VGA --same-as LVDS --auto 打开外接显示器(最高分辨率),与笔记本液晶屏幕显示同样内容(克隆)
 xrandr --output VGA --same-as LVDS --mode 1024x768 打开外接显示器(分辨率为1024x768),与笔记本液晶屏幕显示同样内容(克隆)
 xrandr --output VGA --right-of LVDS --auto 打开外接显示器(最高分辨率),设置为右侧扩展屏幕
 xrandr --output VGA --off 关闭外接显示器
 xrandr --output VGA --auto --output LVDS --off 打开外接显示器,同时关闭笔记本液晶屏幕(只用外接显示器工作)
 xrandr --output VGA --off --output LVDS --auto 关闭外接显示器,同时打开笔记本液晶屏幕 (只用笔记本液晶屏)
(最后两种情况请小心操作,不要误把两个屏幕都关掉了....)
添加Windows 7启动:sudo gedit /boot/grub/menu.lst
title Windows Seven
root (hd0,0)
makeactive
chainloader +1
更改计算机名称:
sudo gedit /etc/hosts
sudo gedit /etc/hostname
reboot
安装与配置vim:sudo apt-get install vim-gtk vim-doc cscope
更新软件源:sudo gedit /etc/apt/sources.list
#搜弧源
deb http://mirrors.sohu.com/ubuntu/ jaunty main restricted
deb-src http://mirrors.sohu.com/ubuntu/ jaunty main restricted
deb http://mirrors.sohu.com/ubuntu/ jaunty-updates main restricted
deb-src http://mirrors.sohu.com/ubuntu/ jaunty-updates main restricted
deb http://mirrors.sohu.com/ubuntu/ jaunty universe
deb-src http://mirrors.sohu.com/ubuntu/ jaunty universe
deb http://mirrors.sohu.com/ubuntu/ jaunty-updates universe
deb-src http://mirrors.sohu.com/ubuntu/ jaunty-updates universe
deb http://mirrors.sohu.com/ubuntu/ jaunty multiverse
deb-src http://mirrors.sohu.com/ubuntu/ jaunty multiverse
deb http://mirrors.sohu.com/ubuntu/ jaunty-updates multiverse
deb-src http://mirrors.sohu.com/ubuntu/ jaunty-updates multiver
#网易源
deb http://mirrors.163.com/ubuntu/ intrepid main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ intrepid-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ intrepid-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ intrepid-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ intrepid main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ intrepid-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ intrepid-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ intrepid-backports main restricted universe multiverse
#台湾官方源
deb http://tw.archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu intrepid-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu intrepid-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu intrepid-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu intrepid-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-proposed main restricted universe multiverse
  

命令:xrandr
当该命令不带参数时: 

   xrandr 可以查看当前屏幕分辨率和刷新频率
当该命令带参数时,详细用法如下: 
   xrandr --output VGA --same-as LVDS --auto 打开外接显示器(最高分辨率),与笔记本液晶屏幕显示同样内容(克隆)
  xrandr --output VGA --same-as LVDS --mode 1024x768 打开外接显示器(分辨率为1024x768),与笔记本液晶屏幕显示同样内容(克隆)
   xrandr --output VGA --right-of LVDS --auto 打开外接显示器(最高分辨率),设置为右侧扩展屏幕
   xrandr --output VGA --off 关闭外接显示器
   xrandr --output VGA --auto --output LVDS --off 打开外接显示器,同时关闭笔记本液晶屏幕(只用外接显示器工作)
   xrandr --output VGA --off --output LVDS --auto 关闭外接显示器,同时打开笔记本液晶屏幕 (只用笔记本液晶屏)
(最后两种情况请小心操作,不要误把两个屏幕都关掉了....)

 

添加Windows 7启动 <适用于Windows 7 下硬盘安装ubuntu 9.04>

  在终端中输入命令:sudo gedit /boot/grub/menu.lst,然后将以下内容添加进去:

  title Windows Seven

  root (hd0,0)

  makeactive

  chainloader +1


更改计算机名称:

  sudo gedit /etc/hosts

  sudo gedit /etc/hostnamereboot


安装与配置vim:

   sudo apt-get install vim-gtk vim-doc cscope

更新软件源:

   sudo gedit /etc/apt/sources.list

#搜弧源

deb http://mirrors.sohu.com/ubuntu/ jaunty main restricted

deb-src http://mirrors.sohu.com/ubuntu/ jaunty main restricted

deb http://mirrors.sohu.com/ubuntu/ jaunty-updates main restricted

deb-src http://mirrors.sohu.com/ubuntu/ jaunty-updates main restricted

deb http://mirrors.sohu.com/ubuntu/ jaunty universe

deb-src http://mirrors.sohu.com/ubuntu/ jaunty universe

deb http://mirrors.sohu.com/ubuntu/ jaunty-updates universe

deb-src http://mirrors.sohu.com/ubuntu/ jaunty-updates universe

deb http://mirrors.sohu.com/ubuntu/ jaunty multiverse

deb-src http://mirrors.sohu.com/ubuntu/ jaunty multiverse

deb http://mirrors.sohu.com/ubuntu/ jaunty-updates multiverse

deb-src http://mirrors.sohu.com/ubuntu/ jaunty-updates multiver
#网易源

deb http://mirrors.163.com/ubuntu/ intrepid main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ intrepid-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ intrepid-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ intrepid-proposed main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ intrepid-backports main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ intrepid main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ intrepid-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ intrepid-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ intrepid-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ intrepid-backports main restricted universe multiverse
#台湾官方源

deb http://tw.archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse

deb http://tw.archive.ubuntu.com/ubuntu intrepid-security main restricted universe multiverse

deb http://tw.archive.ubuntu.com/ubuntu intrepid-updates main restricted universe multiverse

deb http://tw.archive.ubuntu.com/ubuntu intrepid-backports main restricted universe multiverse

deb http://tw.archive.ubuntu.com/ubuntu intrepid-proposed main restricted universe multiverse

deb-src http://tw.archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse

deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-security main restricted universe multiverse

deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-updates main restricted universe multiverse

deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-backports main restricted universe multiverse

deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-proposed main restricted universe multiverse

转载于:https://www.cnblogs.com/ipaper/archive/2010/04/23/1717663.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值