windows7 install ubuntu server
恢复 grub
hp 安装 ubuntu 以后没有 grub 菜单
- 找到你安装ubuntu的安装光盘或u盘
- 进入liveCD模式,启动后打开终端(ctrl + alt +T)
- sudo -i ,进入根用户下。
- fdisk -l ,查看你的ubuntu系统安装位置,我的是sda3.
- mount /dev/sda3 /mnt ,挂载上硬盘。
- grub-install —root-directory=/mnt /dev/sda,把启动项安装到硬盘启动信息中(注意/mnt和/dev/sda有个空格)
- 重启电脑
- sudo update-grub2 ,更新启动列表,引导其它系统。
成功解决,这个很蛋疼的问题,其它品牌电脑没有这样的问题。其实上述步骤也解决
grub损坏的问题。
恢复 grub 里的 windows 启动项目
sudo update-grub
设置无线为固定ip
auto wlan0 iface wlan0 inet static address 192.168.0.2 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1 dns-nameservers 192.168.0.1 192.168.0.2 8.8.8.8 wpa-ssid <Your Wifi Network SSID> wpa-psk <Your HEX encoded Wifi WPA password>
多个 dns 之间用 空格 分开
开关网卡
sudo ifdown wlan0 sudo ifup wlan0
或者
sudo service networking restart
安装 nodejs
sudo apt-get install python-software-properties sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs
关机
启用高级电源管理
apt-get install acpid
命令集
sudo init 0
sudo init 6 #为重新启动
sudo shutdown -h now
sudo poweroff #关闭
sudo reboot #重启
sudo shutdown -r now #重启
如果切换到root权下 直接输入命令 免sudo
shutdown -h #是关机,最终是调用halt命令关机。
poweroff #只是做了磁盘同步就直接切断了电源,对于运行后台服务的服务器来说不太合适。
more
- ratchet mobile for iphone
- jekyll ruby static html generator
- csshake css 抖动
nanobar 不需要 jquery 的简单
🎸🎸🎸🎸 mac 输入法 吉它 出现的图形文字
- baidu brainmap (漂亮)
添加用户
useradd 和 adduser 区别是
useradd 是系统自带。adduser 是前者的 perl 脚本,后者更好用!
显示所有组
cat /etc/group
但前用户所在组
groups
加用户 guoshuang(带home目录)
sudo adduser guoshuang
把 guoshuang 加到 这些组中
sudo usermod -G adm,cdrom,sudo,dip,plugdev,sambashare,lpadmin -a guoshuang
注意:ssh 连接的话,还需要退出重新连接一次!!!
-G, —groups GROUP1[,GROUP2,…[,GROUPN]]]
A list of supplementary groups which the user is also a member of.
Each group is separated from the next by a comma, with no
intervening whitespace. The groups are subject to the same
restrictions as the group given with the -g option.
If the user is currently a member of a group which is not listed,
the user will be removed from the group. This behaviour can be
changed via the -a option, which appends the user to the current
supplementary group list.
停掉自启动服务
sudo update-rc.d apache2 disable
打开自启动
sudo update-rc.d apache2 enable
web html ios
html class=”no-js”
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="/assets/img/nc-icon/namecheap-icon-152x152.png" /><link rel="apple-touch-icon-precomposed" sizes="144x144" href="/assets/img/nc-icon/namecheap-icon-144x144.png" /><link rel="apple-touch-icon-precomposed" sizes="120x120" href="/assets/img/nc-icon/namecheap-icon-120x120.png" /><link rel="apple-touch-icon-precomposed" sizes="114x114" href="/assets/img/nc-icon/namecheap-icon-114x114.png" /><link rel="apple-touch-icon-precomposed" sizes="76x76" href="/assets/img/nc-icon/namecheap-icon-76x76.png" /><link rel="apple-touch-icon-precomposed" sizes="72x72" href="/assets/img/nc-icon/namecheap-icon-72x72.png" /><link rel="apple-touch-icon-precomposed" href="/assets/img/nc-icon/namecheap-icon-57x57.png" /><meta name="viewport" content="width=device-width,initial-scale=1" />