sudo gzip -d initrd.gz sudo cpio -idm < initrd ...(Modify content) sudo find . | cpio -o -H newc > initrd
2012年2月28日 星期二
Modify initrd.gz content
2012年2月21日 星期二
avahi
Publish current information:
Collect information:
sudo avahi-publish -h ${host_name} -d ${domain_name} -s _${service_name}._tcp ${port_number} comment_1=${comment_1_context} comment_2="${comment_2_context_with_space}"
Collect information:
sudo avahi-browse -a -d ${domain_name} -r -p -t
2012年2月8日 星期三
Useful screen commands in byobu
CommandDescription
Ctrl + a, ?Show screen commands
Ctrl + a, |Split screen vertical
Ctrl + a, QShow current screen only
Ctrl + a, Ctrl + ISwitch focus screen
Ctrl + a, NumberSwitch to screen number X
Ctrl + a, CClean screen
Ctrl + a, x or Ctrl + xLock screen
Ctrl + a, k or KKill screen
2012年2月6日 星期一
Using lftp to mirror folder
Mirror CentOS repository from ftp.nchc.org.tw to local folder
sudo lftp -c mirror --continue --delete ftp://ftp.nchc.org.tw/pub/Linux/CentOS/ /mnt/mirror/CentOS/
sudo lftp -c mirror --continue --delete ftp://ftp.nchc.org.tw/pub/Linux/CentOS/ /mnt/mirror/CentOS/
2012年2月5日 星期日
Ubuntu wireless access point
Install hostaptd with command "sudo apt-get install -y hostapd"
Edit files as following.
File: /etc/default/hostapd
Content:
File: /etc/hostapd/hostapd.conf
Content:
Start service with one of the commands.
Edit files as following.
File: /etc/default/hostapd
Content:
RUN_DAEMON="yes" DAEMON_CONF="/etc/hostapd/hostapd.conf" DAEMON_OPTS="-dd"
File: /etc/hostapd/hostapd.conf
Content:
interface=wlan0 # Please reference to your wireless device name. driver=nl80211 # All support 802.11 spec. device can use the common driver. hw_mode=g channel=11 ssid=MySSID # Please input SSID name that you would like to use. wpa=1 wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP CCMP wpa_passphrase=MyPassword # Please input your password for wireless access point.
Start service with one of the commands.
1. sudo service hostapd start 2. sudo hostapd -dd /etc/hostapd/hostapd.conf
2012年2月2日 星期四
Search linux command history by PageUp and PageDown
Edit /etc/inputrc and unmark lines as following.
”\e[5~”: history-search-backward
”\e[6~”: history-search-forward
”\e[5~”: history-search-backward
”\e[6~”: history-search-forward
2012年2月1日 星期三
Ubuntu Orchestra server config files
Global settings: /etc/cobbler/settings
Config path: /var/lib/cobbler/config
Template path: /etc/cobbler/*.template
Config path: /var/lib/cobbler/config
Template path: /etc/cobbler/*.template
訂閱:
文章 (Atom)