[use linux] - memo 1

来源:互联网 发布:云计算代表企业 编辑:程序博客网 时间:2024/05/29 02:26
1. laptop-mode-tools
laptop-mode /etc/laptop-mode/...    .conf
auto-hibernate.conf
cat /proc/sys/vm/laptop_mode
acpi to view battery status, fans ,,,....

2. network
/etc/network/interfaces
wap_supplicant
firmware-iwl
wpa_passphrase

ifconfig, iwconfig needs root accout; locates in /usr/sbin

ifconfig eth0 192.168.1.1 netmask 255.255.255.0
route add default gw 192.168.1.1

ip link set wlan0 up
iwconfig wlan0 power on
iwconfig wlan0 txpower auto

dhclient wlan0

man wireless
man interfaces

3. $(HOME)/.bashrc
set alias
and $PS1

4. man pager = less , -P parameter can select pager program.
need install less.

5. apt-get install
/etc/apt/sources.list
deb mirrors.163.com/debian /squeeze main contrib non-free

6. man bash
HOME/profile .bashrc , /etc/

7. /etc/init.d/...

8. pw-utils package..
pw-hibernate, pw-suspend

9. lynx

10. debian iso usb boot
cat file.iso > /dev/sdX

11. ifup, ifdown ==> call ifconfig,route;
based on the /etc/network/interfaces.
man ifup interfaces
status :  /etc/network/run/state

12. apt-get install linux-doc-html
install HOWTOs

13. apt-get install xorg xterm xclock xpdf
xinit

14. pdf in console
linux frame buffer
/etc/default/grub
GRUB_GFXMODE=640x480
GRUB_GFXPAYLOAD_LINUX=keep

update-grub

/boot/grub/grub.cfg


install fbgs to view the pdf in console.

if in X, use xpdf


2. X, install X and mplayer
xorg documentation
apt-get install xorg xinit twm xterm xclock X11-common X11-utils
...

$(HOME)/.xsession

xterm&
exec twm

3. how to auto connect wifi?
/etc/network/interfaces
use the wpa-* option

/usr/share/doc/wpasupplicant/README.debain.gz

4. boot up hdcp dicovery, make slow bootup
disable hdcp... use static ip addr


1. display chinese
dpkg-reconfigure locales
select the zh_CN and ...

install chinese fonts

xfonts-wqy
search xfonts in apt

for xfce4,  can install the xfce4-terminal.

firefox --> preference. set the language and default character encoding


2. chinese input method
ibus ibus-pinyin
ibus-setup

3. grub rescue. file not found
assue grub is installed in (hd0,7)

set root=(hd0,7)
set prefix=(hd0,7)/boot/grub
insmod /boot/grub/normal.mod
normal

here may be change the kernel's partition, if partition table is changed..

after boot into linux,

update-grub
grub-install /dev/sda


=======
20130319

1. setup the console font
/etc/default/console-setup
setupcon


2. frame buffer

3. console screen resolution

4. sed replace
/  or  @ or :
sed 's@/path/to/somewhere@another/&@' src
sed 's:/path/to/somewhere:another/&:' src


20130420
1. vim clipboard.  reg + and *
not supported...   
vim --version | grep xterm_clipboard

apt-get remove vim
compile & install vim

read README.txt and README_unix.txt
./configure --help
edit the src/Makefile

apt-get install libncurses5-dev
apt-get install libgtk2.0-dev libatk1.0-dev libx11-dev libxt-dev


make distclean
./configure --with-features=big --enable-gui=gtk2 --with-x
make
sudo make install

uninstall:
sudo make uninstall


also can try:
sudo apt-get install vim-gnome
2. mount --bind
mount --bind fol1 fol2
fol1 will be mirrored to fol2.
umount fol1 will release the binding.

3. mknod
crate the device node.
mknod -m <mode> path/name c/b <major> <minor>
eg. mknod -m 666 /dev/null c 1 3
c: charater device
b: block device
fol2 w


4. swap
swapon -s  to view the status of swap usage
swapon -a turn on all swap

/etc/fstab
UUID can be refered by blkid command
or list the files of /dev/disk/by-uuid

5. install firefox
download the binary package from website
unpack & uncompress it. cp to the dir. such as /opt/firefox
create a link in the /usr/bin

6. install flash player plugin of firefox
read the readme!
cp the lib to firefox/plugins
cp the usr to /usr