Make your own free website on

Short Q & A



To help a new/regular user getting her/his job done in an easy/quick/effective and productive way, I decided to write this FAQ. The FAQ is a collection of my ideas and experiences, as well as tips from books and the internet/newsgroups. It weights mostly towards all the "trivial" questions that a new user would ask. The further you go down the FAQ the more advanced the questions will become. The nearby bottom part is for X Window, and the bottom part is for new hints. For helping you to get around the jungle, please use the Key index, use it together with the find-function in your browser.

This FAQ will NOT do all the work for you. It neither helps you to install a TV-card, burn a CD nor solve diverse problems on some specific Linux applications. But it will give you some ideas as to how you can solve the problem. All the places where I wrote <filename> means that you just write the filename without the <>. Be aware that some of the commands require the root password and some of them need to be installed from either Redhat's CD1, CD2, CD3 or from the
RPMfind or from the RPMSeek. It will take a short time to remember all the commands and understand the scripts, just keep practice (for the long & winding script split it to a new line each time there is a semicolon for easy reading).

This "Uncover the Secrets" is dedicated specially to my supporting and dear parents, I owe them everything... With no doubt, I owe the inspirations to Richard Stallman, Linus Torvalds, the LINUX/GNU developers/maintainers, the HOWTO project, the Newsgroup linux.redhat and not least the publications from SSLUG Denmark.

Enjoy...I hope it saves you some time and I hope you use some of the surplus time to develop something even better.

0. What should I do first to get the most benefit for my Linux-effort? Read carefully the useful "RELEASE-NOTES", the "Installation Guide" and the "Getting Started Guide" from Redhat boxed set or read them from Redhat Manuals
1. How many mount points do I need for a Linux installation, and what about multiple boot? Clicking here
2. Any good file manager a la Norton Commander? (you can't do anything if you don't know what you have) Yes, use Midnight Commander (mc-4.5.x.i386.rpm) OR krusader (X-application a la Total Commander). Type: mc in a console. Use F3/F4 as a text editor in Midnight Commander.
3. How to start X Window from console? startx
4. How to use copy and paste? Copy a text by marking it (no click), paste it with the right button (in X Window you need to click both buttons or a third button; reconfigure your mouse with the mouseconfig command)
5. Howto shutdown my linux? init 0 ; Use init 6 or CTRL+ALT+DEL for reboot ; shutdown +5 "Achtung, achtung the server is going on strike in 5 minutes sharp. The strike will be over in about 20 minutes"
6. Howto use a command? man (man=manual, try: man ls; man mount) OR in X Window: Alt+F2 and type #ls
7. Which commands do they have in Linux? info; pinfo; ls /bin; ls /usr/bin; mc /usr/sbin ; mc /usr/X11R6/bin (for X Window) ; xman (X Window)
8. Howto list ALL the Linux commands I am allowed to use? Press <Esc> and then press *
9. Are you realized that there is file completion in Linux? Type one or two letter of a command and then press <TAB> twice
10. Which commands should I learn in the beginning? You can almost get everything with your mouse in X just like in Windows. If you like the challenge I suggest that you try: ls, locate (find), grep, rpm and vi.
11. I know a good command in Windows, do they have it in Linux? apropos XXX | more ;where XXX is the good command (build the database with /usr/sbin/makewhatis for the first time)
12. What is the good/fast editor? Use F3 or F4 in mc (mcedit) or kedit
13. Now I can shutdown a Linux server, it is the time, I wannabe a GURU. To become a Guru and do not forget to buy some Linux books when you go shopping :-).
14. Where are the documentations about the Linux system? khelpcenter (X Window) and Documentations from
15. Where are the most technical documentations about a Linux/PC system? ls -l /usr/src/linux-2.4/Documentation
16. Howto understand the start-up init scripts at /etc/rc3.d? more /usr/share/doc/initscripts-7.XX/sysvinitfiles
17. Howto understand the settings of the global system and the network in /etc/system? less /usr/share/doc/initscripts-7.XX/sysconfig.txt
18. Which applications/programmes do I have on my PC? redhat-config-packages OR rpm -qa |more OR more /var/log/rpmpkgs
19. Howto install a new application? redhat-config-packages OR using the powerfull rpm (many times better than TRU64 setld, Solaris pkg*, AIX lslpp) try: rpm -Uvh <the RPM file>
20. Howto uninstall the application doom? 1)Find the package name: rpm -qa| grep doom 2)Uninstall with: rpm -e <name of the package from step 1>
21. Do I have the webserver apache application? rpm -qa | grep httpd
22. Howto find from which package a file is from? rpm -qf </path/filename>
23. Howto list the container of a RPM file? Use mc OR rpm -qpl XXX.rpm OR rpm2cpio XXX.rpm |cpio -t
24. I interest in sound/music, how to find any thing about it? apropos sound | more ;(build the database with /usr/sbin/makewhatis for the first time)
25. Where can I find a MP3 player? xmms, need to install it from the internet (or from RH7.3 CD, works OK. Do a "ln -s /usr/lib/ /usr/lib/" and "rpm -e xmms-1.2.7-21.p --nodeps" and then "rpm -ivh xmms-1.2.7-1.i386.rpm --nodeps" (from RH7.3 CD))
26. Howto rip and encode CD audio to mp3 (or ogg format; needs grip*.rpm)? grip (needs lame)
27. Howto get a DVD/VCD player? xine (get it from RH7.3 CD), mplayer
28. What is the kernel version? uname -r OR procinfo (procinfo is from procinfo*.rpm)
29. What is my Redhat version? cat /etc/redhat-release
30. Howto list hidden files? ls -a (all hidden files start with a dot in Linux)
31. How to get a file's property? stat <file> (stat*.rpm)
32. Why can I not delete my file? (maybe because of the "not-delete" attribute setting in your file by the command chattr) chattr -i -V <your file>
33. The boot procedure went so fast, I could not read all the messages. dmesg OR redhat-logviewer OR more /var/log/messages
34. How can I get console messages? xconsole (test it with: "echo ocean >/dev/console")
35. Howto change foreground/background colour/color of my console? setterm -term linux -foreground blue; setterm -term linux -background magenta
36. Where do the Linux peoples hide all the log files? cd /var/log (web-, ftp-, samba-, mail-, ssh-log etc)
37. What are running right now? ps -ax
38. What is my process status? procinfo (procinfo is from procinfo*.rpm)
39. Which interrupts, I/O ports are unoccupied? lsdev OR procinfo OR cat /proc/interrupts (lsdev is from procinfo*.rpm)
40. Which hardware devices does the OS (Operative system) recognize? more /etc/sysconfig/hwconf ; lspci ; lspnp ; lsusb
41. How does the OS install a new hardware device? kudzu (kudzu runs at startup) , it saves infos in /etc/sysconfig/hwconf
42. I want to change my keyboard layout. redhat-config-keyboard (X Window)
43. Howto install/change a mouse? mouseconfig ; redhat-config-mouse (X Window)
44. What is my PC hardware specifications? cat /proc/cpuinfo AND hwbrowser
45. Howmany RAM/memory do I have? free -k ; more /proc/meminfo
46. Howto find which architecture my kernel configuration is using? (use it when you want to find the right kernel config file) rpm -q --qf '%{ARCH}\n' `rpm -qa|grep kernel-2`
47. What is the time for last boot ?(howlong I had been working?) uptime
48. A quick way to check the connection between the PC and the modem (look at the TxD/RxD leds) cat /bin/sync > /dev/modem
49. What is my enviroment? env ; set
50. What shell do I use? set | grep SHELL
51. Howto see all my last commands? (like F7 in DOS) history or the up/down keys
52. Howto clear the history? history -c
53. Does Linux have a calendar? cal 9999 OR gcal -K 1-3 2004 ; try: cal 9 1752 (what is wrong?)
54. Howto find which week we are in? date +%W OR gcal -K
55. Howmuch diskspace do I have? df
56. Howmuch diskspace does the directory /home occupy? (rounded up to the number of blocks) du -hs /home OR du -chx --max-depth=1 /home
57. Howmany files am I allowed to write on a partition? df -i (one file/directory uses one inode)
58. How to change the user right/permission on a file/directory? man chmod; man chown; man chgrp
59. Howto mount/use a CDROM? (you need to mount the device at a directory, e.g. /mnt/cdrom) mount -t iso9660 /dev/cdrom /mnt/cdrom ; (if you get any error, try the next hint and look at the softlink (man ln) of /dev/cdrom)
60. I got the error message when mounting a cdrom "/dev/cdrom is not a valid block device", what should I do? depmod -a
61. I cound not unmount/reject my CDROM with "umount /dev/cdrom", I got the error "Device is busy" fuser -muv /dev/cdrom ;it shows you who "locks" the device, ask/kill then that user/process to goaway from the CDROM mountpoint before retry umount.
62. Howto mount an iso file? (a la isobuster) mount -t iso9660 file.iso -o ro,loop /mnt
63. Howto mount a floppy? Click the FLOPPY icon on the desktop OR type "mount /dev/fd0 /mnt"
64. Howto format a floppy with a king-format? fdformat /dev/fd0u1680 (or fd0u1760 etc)
65. Howto mount a dos partition? mount -t vfat /dev/hda1 /dos/dosc (make new directory with: mkdir /dos/dosc)
66. Which partitions are mounted? mount
67. Howto mount my disk automatically at boot? cat /etc/fstab ; man fstab
68. Howto make a bootdisk? mkbootdisk `uname -r`
69. I am tired of mounting my CDROM, howto avoid it? (using it by enter: cd /auto/cdrom; unmount it by waiting 60s or using umount /auto/cdrom) Click the CDROM icon on the desktop OR Add "/auto /etc/auto.misc --timeout=60" in /etc/auto.master (without quotas); add "cdrom -fstype=auto :/dev/cdrom" in /etc/auto.misc; service autofs restart
70. Howmany partitions do I have? fdisk -l OR sfdisk -l
71. I want to have more informations of my hard drive hdparm -i /dev/hda
72. Howfast is my brand-new hard drive? hdparm -t /dev/hdX ; where X is the device for your new hard drive
73. Howto install a sound card? redhat-config-soundcard
74. Is there a Sound Studio to record my old tapes? (via line-in from my SoundBlaster) record OR sox OR SoundStudio-1.0.3-5.i386.rpm
75. Howto easily install an internet connection with a modem? Clicking here
76. How to install a printer? printconf-tui ; printconf-gui (in X Window)
77. I have so many problems with my printer. man lpc ; man lpinfo and visit linuxprinting
78. How to install a network card? Clicking here
79. Howto set my NIC to full duplex? (required a new NIC with MII interface) mii-tool -F 100baseTx-FD eth0
80. What is the ethercode (the uniq HW address of a networking interface; "ifconfig") for the networking manufacturer D-Link? grep -i D-Link /var/arpwatch/ethercodes.dat (try "grep 0:50:4 /var/arpwatch/ethercodes.dat")
81. Howto install DNS? bindconf (bad, I prefer vi :-) )
82. Where is the configuration files for DNS? /etc/named.conf and /var/named and resolv.conf
83. Does the kernel support USB2? lsusb ; hwbrowser
84. How can I use/mount a USB memory stick? (Linux emulates it as a scsi device) mount -t auto /dev/sda1 /mnt/usb-memstick (try sdb1 or sdc1 if you already have SCSI device on your system)
85. Does the kernel support NTFS? more /proc/filesystems (in this file you can see which FS the kernel supports)
86. Howto build a module to support the NTFS filesystem? Build NTFS from Jim Hayward
87. Howto adjust the system clock? date -s HHMM and then hwclock -w to update the CMOS/hardware clock
88. Howto adjust my clock with a reference/atomic clock? ntpdate (remember to run "hwclock -w" to passe the setting to the CMOS clock)
89. My PC is slow, why? gnome-system-monitor ; top ; ps -ax (try to find which processes eat your CPU clock) ; free, iostat, vmstat (check the RAM/swap)
90. Howto measure the total running time of a command? time <command>
91. How much memory does my application used? memusage <your application>; memprof
92. Why is my hard drive keep running in the background? Move all the jobs in /etc/crond.* to an another place
93. What more can I do to improve the system performance? On a non-production PC disabling all the following services (chkconfig XXX off): kudzu, sendmail, crond, anacron, apmd, pcmcia, nfs
94. What is the real size of my huge /var/log/wtmp? ls -s /var/log/wtmp
95. What is TOP25 of the most CPU-eating on my PC? clear;top -b -S|head -25
96. Can I work without the command top? Of course you can, "needs get peoples to spindle". Use: ps aux|sort -nk3 (sortering the CPU util column)
97. Howto list all the parents and children of a process? ps -A --forest OR pstree -p XXX (pstree from psmisc-20.*.rpm)
98. What is the name of the program I had just started from the KDE Windows menu? ps -Af --sort start_time
99. Howlong does it take for a Linux installation and howlong does it take to start KDE with startx, Konqueror and Mozilla? On a 350Mhz AMD/128MB with RH7.2 server/KDE with many Linux applications: about 25 minutes for the installation (bad CDROM media, bad/old CD drive and old/slow hard drive will extend the installation time essentially); 35 seconds to start KDE, 5s to start Konqueror and 14s for Mozilla. Take a look at /var/log/messages if the last three apps take long time.
100. I wonder where are all the files belong to a package, say apache? 1)Find the package name: rpm -qa| grep apache 2)Show the files: rpm -ql <name of the package>
101. Where is the autoexec.bat? /etc/rc*.d ; use khelpcenter (the lifebelt icon) to learn more about this subject.
102. What services/daemons start at boot? chkconfig --list OR ls /etc/rc.d/rc3.d/S* OR ls /etc/rc.d/rc5.d/S* if you use X-login
103. Howto restart a service? service <name of the service> restart ; replace restart with stop if you want to stop a service
104. I want to record all my actions into a text file and send it to a developer. script report.txt ; break with CTRL+D
105. Howto direct output on the screen to a log file? use >& ; for example startx >& x.log will log all the output from startx into a file called x.log
106. Howto print the lines between 10 and 55? sed -n '10,55p' <your_file>
107. Who are on the system at the moment? who ; w
108. Who am i? whoami
109. Who are you? finger <user account>
110. What is my IP-address and MAC-address for my network card? ifconfig
111. Which files control the network (with DNS)? /etc/hosts, /etc/host.conf, /etc/resolv.conf and /etc/sysconfig/network-scripts/ifcfg-eth0
112. I do not have a network card, I get some warning with the hostname in sendmail and something with a strange host name. Make sure that there is a line " localhost.localdomain localhost machine-name <the strange hostname>" (without quotes) in that file. Please read "man hosts".
113. Does the OS install my PCI soundcard/netcard (eth0) module? lsmod
114. Where is the module configuration file (for loading a driver for a device on the fly)? /etc/modules.conf (man modules.conf)
115. Where can I find all the HW drivers (as module), which Redhat supports? Use modprobe or insmod to load it. ls -l /lib/modules/2.4.20-8/kernel/drivers
116. Now I have mounted partition C. I want to use the old-Dos-fashioned notation way, just like c: in stead of cd /dos/dosc. alias c:='cd /dos/dosc' (for permanent solution: write the same in the end of the file ~/.bashrc)
117. Howto save a long command string? Use alias; see the trick above
118. Howto reverse the priority of an alias and a command? Use \ in front of the command, try \vi, \rm
119. Please show me some of the useful aliases. (so if I type: "r net" , I get all the packages with the word "net" inside. net is corresponded to $1, it means the first argument after the command r ; s xinetd restart means restart service xinetd) alias h='history' ; alias c:='cd /dos/dosc'; alias cd='pushd $1' ; alias cdrom='mount /dev/cdrom /mnt/cdrom1'; alias g='grep -lis $1 $2' ; alias log='tail -f /var/log/messages'; alias r='rpm -qa|grep $1'; alias rl='rpm -ql $1'; alias rc='cd /etc/rc.d/init.d' ; alias RPM='cd /mnt/cdrom1/RedHat/RPMS' ; alias s='service $1 $2'
120. Howto split a big file to diskettes? (get my_split<PREFIX>) split -b 1400000 <filename> my_split
121. My younger sister deletes my joystick devices in /dev, howto recreate them? /dev/MAKEDEV js ; man MAKEDEV
122. How can I set up a ftp/telnet service? (a threat for security, use ssh instead) Update disable=no in /etc/xinetd.d/wu-ftpd (or just enter: chkconfig wu-ftpd on) ; restart the service inetd with: service xinetd restart (same procedure for /etc/xinetd.d/telnet)
123. How can I secure my ftp connection? man ftpaccess
124. Howto set the timeout for a ftp connection? (wu-ftp) At the server_args line in /etc/xinetd.d/wu-ftpd add "-t 1800" (for 30min), restart xinetd with "service xinetd restart"
125. Want to remote control my linux just like with Norton Anywhere in Windows. telnet or ssh or vnc or using a X emulator
126. Is there a good ftp programme a la cute-ftp? gftp (X Window)
127. Does my webserver running? ps -ax | grep httpd
128. How can I restart a webserver? service httpd restart (start/stop/status)
129. I do not want the system start httpd on my server. chkconfig httpd off OR chkconfig --del httpd
130. Howto show which services start at which runlevel? chkconfig --list ; ntsysv (X Window)
131. I want to take a quick look on my web activity. tail -f /var/log/httpd/access_log
132. I want to have an another console window. <CTRL+ALT+F2> <CTRL+ALT+F3> <CTRL+ALT+F4> , etc
133. Somehow , my console becomes invisible, I can not see what I type. reset OR stty sane OR hit <CTRL+V> <CTRL+O>
134. Where are all the lib files? cd /usr and write: find . -name \*lib\* ; Or use Midnight Commander mc, press ALT+?
135. Howto quickly locate a file? locate <file name> ; NB: updatedb (/etc/crond*) must run everyday to update the database
136. By accident I delete some of the lib (.so) files, I do not know which RPM package it comes from. What should I do? rpmfind or rpm -qf </XXX/lib file> where XXX is the path of the file
137. Which protocols does service pop3 use? more /etc/services | grep pop3
138. Which port does http use? more /etc/services | grep http
139. Howto disable screensaver for a console? setterm -blank (add it at the second line in ~/.bashrc for permanent solution)
140. Howto turn on the NumLock on the console tty1 at boot? Add "setleds +num > /dev/tty1" (without quotas) at the second line in ~/.bashrc for permanent solution
141. Howto change the prompt on my console? export PS1=$'[\\u@\\h \\@ :-)]\\$ ' ; man bash; (add it at the second line in ~/.bashrc for permanent solution)
142. Howto get the key bindings (get a function by pressing a combination of keys) in bash? bind -p
143. Howto timeout an idle connection? Add "export TMOUT=1800" in /etc/profile (in seconds, only for bash and ksh)
144. Howto made a copy of my typing in a buffer in bash shell? Start: press <Ctrl+x> and then ( ; Stop: <Ctrl+x> and then ) ; Get the buffer: <Ctrl+x> and then e
145. Howto use a virtual mouse? (use it if your mouse's movement is choppy; only for X Window) Press <Ctrl+Shift+NumLock> to activate it, press it again to deactivate. Use the keypad to move the mouse. /5=left button; *5=middle; -5=right; 0=keep pressing; .=release
146. Howto convert lowcase letters to uppercase letters at the command line in bash shell? Go to the beginning of a word and press <Alt+u> (for lowcase press <Alt+l>
147. Howto close for login access on my server during the night (and at the weekends)? (avoiding nightly cracking activity; remember to patch all the security holes/exploit) Create a system admin account "sysadm" (check to see if you can "su" from it); add "account required /lib/security/" at /etc/pam.d/login ; add "login;tty*;!sysadm;Wk|2100-0600 " at /etc/security/time.conf
148. Howto convert from decimal to hex? (16^3 16^2 16^1 16^0 ; 0xF2A=(10*16^0) + (2*16^1) + (15*16^2) = 3882 ; A=10, B=11 ...F=15) echo "obase=16; XXX "|bc ; where XXX is the decimal number
149. Howto convert from hex to decimal? echo "ibase=16; XXX"|bc ; where XXX is the hexadecimal in UPPER case
150. Howto convert decimal to binary? (2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0 ; 110=(0*2^0) + (1*2^1) + (1*2^2) =7 ) echo "obase=2; XXX "|bc ; where XXX is the decimal (use ibase=2 to go the other way)
151. Howto convert decimal to octav? (..8^3 8^2 8^1 8^0 ; 567octav= (7*8^0) + (6*8^1)+ (5*8^2) = 375 ; In octav the number serie is from 0 to 7) echo "obase=8; XXX "|bc ; where XXX is the decimal (use ibase=8 to go the other way)
152. I want to convert decimal number to hexadecimal, octal and binary perl -lpe '$n=$_;printf "%d %#x %#o %#b\n", $n, $n, $n, $n'
153. Howto install a perl modul? cd to the fold, you have the modul, type: perl; make; make test; make install
154. Howto quickly convert a text to hex code? echo abcABC123|xxd
155. How to find the prime number/factors of an integer? factor 13 ; factor 9999999999999999999 (19 times!!! surprised??)
156. How to pack a whole directory? tar czfv output.tar.gz <your dir>
157. How to unpack a tar-gzip file? tar xzfv your-file.tar.gz -C /opt OR Gnozip ; use tar xvjf file.bz2 -C /opt (for bzip)
158. Howto read a postscript file? ps2pdf <> <output.pdf> OR ghostscript -g800x600 -r100 <>
159. Howto print a text file to a postscript printer? a2ps -P<your_printer> -r --font-size=8 --columns=2 --highlight-level none --print-anyway yes <your_file> OR using enscript
160. Howto convert my man/text page (groff format) to html format? cat <groff file> | man2html >& output.html
161. Howto schedule an application/a job? man crontab (crontab -e ; you need to know about vi)
162. Howto schedule a job/script to run every 3 hour? add "* */3 * * * <your script>" in your crontab (crontab -e)
163. Please show me some of the "often used" character sequences in vi/less/vim. (Hit Esc before enter the character sequence) 1G=home; G=End; 50%=half file ; /=search forward; ?=search backward; n=search again ; 0=begin of line; $=end of line ; word forward/backward=w/b ; quit=q! ; 25<SPACE>=jump 25 positions forward on a line ; :set nu= numbering lines ; for more execute "vimtutor"
164. Howto turn off the "syntax highlighting" in vim? create a file called ~/.vimrc and insert "syntax off" (without quotas) inside it
165. Howto get a file manager without having Midnight Commander or Konqueror? Just "vi" the directory; try: vi ~ (~ means your home directory)
166. Howto easily protect a love letter? vim -x <your letter> ; it then asks for a password
167. Howto spell-check a text file? aspell check -b <your file> (can not handle a html so well, in this case copy a html file to a file WITHOUT extension (f.eks my-file) and then do a aspell)
168. Which jobs are scheduled for the future? ls /etc/cron.* ; crontab -l; awk 'BEGIN{FS=":"};{print $1}' /etc/passwd|xargs -i crontab -l -u {} |more
169. Unfold a long line to 80 chars fold -w80 <file>
170. I want to compare two files (or directories) diff <file1> <file2>
171. Howto save a path so I could easily return to it? Use pushd in stead of cd ; pushd /etc ; dirs ; pushd
172. Howto find all my old files with the text "Odense" grep -lis -r -I odense .[!.]* ..?* * (thanks to Paul Jarc from; .[!.]* means NO ..)
173. The company gets a new mail address, howto update it in one shot on all the scripts/text? (you need perl: perl-5.6.0-17.i386.rpm) grep -sil "" *| xargs perl -i.old -pe 's/abc\\'; change from to
174. What is the most used commands in Linux? ls; find; grep; more; vi; df; du; top; history; kill; mkdir; which; env; ps; cp; rm; lpr; service; tar; emacs;ping; ftp; telnet; tail; rpm; who; lsmod; chmod; pwd; nslookup; netstat; mail; echo; wc; awk; md5sum; passwd; tcpdump; snort; strace; perl and of course startx. (and gcc; gdb; time; ddd for system developer.)
175. What is the ascii for a character? (you need perl: perl-5.6.0-17.i386.rpm) perl -lpe 'print ord()'
176. The ASCII code. perl -e 'foreach $n (1..255){print $n ." ".chr($n)."\t"}'
177. The alphabet. clear;perl -e 'foreach $n (65..90){print chr($n)." "};printf "\n\n\n"'
178. I have some special production files (starting with prodXXX; where XXX is the number). How can I find the total size of them? ls -l prod* | awk '{s=s+$5};END{print s}' ; (for clarity you can delete END)
179. How can I add a new path to my global enviroment? At the second line in /etc/profile add: PATH=<your new path>:$PATH ; e.g. PATH=/opt/chess/bin:$PATH
180. Howto add a new users? (get a new user abc with uid=600 and gid=600 ; Use 601, 602, 603 ... for a next user. If possible keep them in the same group) groupadd -g 600 sales (do it ONLY once) ; useradd -u600 -g600 abc ; passwd abc
181. Howto lock/block/quarantine a user? passwd -l <user account> (release it with passwd -u <user account>)
182. Howto delete a user account? userdel -r <user account>
183. Howto find which groups a user belongs to? awk 'BEGIN{FS=":"};{print $1 }' /etc/passwd |xargs groups |sort -k1|more
184. Howto share disk with Windows98? man samba ; more; man smbpasswd ; man smbclient ; man smbmount ; smbstatus
185. The systeminfo, the process-info please. (The number stands for PID) Everthing can be found in the pseudo directory /proc. This directory will be empty when you shut down the computer.
186. What is the command for control panel? /usr/sbin/setup (be carefull with X setup)
187. How can I find all the configuration commands? apropos conf | more
188. Why "ls -l" and "du" do not show me the same result for the same file? "ls -l" shows the real size of a file. "du" shows the effective size rounded up to the block. Please read the next question.
189. Howto define the block size on my disk? (the block is the MINIMUM amount in bytes the system can write to a disk, so a 10bytes file will occupy one 4096-block as a 4095bytes file. In dos they call it an "Allocation Unit") mke2fs -n -F /dev/hdXX | grep Block OR tune2fs -l /dev/hdXX |grep Block ; where hdXX is your Linux hard drive
190. Howto make a new ext3 filesystem on my new extra hard drive? (must use the journal option for ext3) mke2fs /dev/hdXX -j -L <label>
191. Howto get I/O statistics from a harddisk? iostat -d -x /dev/hda1 /dev/hda2 5 2
192. I got "invalid magic number in the Super Block" when booting my PC, what should I do? Super Block (infos about files, list of inodes, free blocks etc) is somekind like FAT tables in Dos. Boot in "linux rescue" from RedHat CD1. Type "mke2fs -n -F /dev/hdXX", where hdXX is your / (root) partition (or the defected partition) (use fdisk -l to find out). The command shows you the backup of the Super Block from the defected partition. Use one of them to repair the system: "e2fsck -b BBB /dev/hdXX", where BBB is the block with the Super Block informations you found from the first command.
193. Howto mark bad blocks on my hard drive? e2fsck -c /dev/hdXX
194. Howto install a SCSI control? Run kudzu, and then run "modprobe" on the module you find at the last line at /etc/modules.conf
195. Howto scan a SCSI bus? cdrecord -scanbus
196. Howto get some informations on a scsi device? scsi_info <the scsi device> (can find the device name of a HW device at /etc/sysconfig/hwconf)
197. How to create a mirror system/data disk (RAID)? (very good idea indeed, needs raidtools-XXX.rpm) man raidtab ; google infos about raidsetfaulty, raidhotremove, raidhotadd ; cat /proc/mdstat
198. Can I resize a partition like in Partition Magic? qtparted (v0.4.1, NB: there are still some limits)
199. Howto boot in single mode? Clicking here, search for the word "single"
200. Howto make a harddisk bootable? Clicking here
201. Howto make a backup of my whole partition hda1 to hdb2? (a la Ghost in Dos/Windows World) mount /dev/hdb2 /mnt ; dump 0f - /dev/hda1 | (cd /mnt; restore -xvf - )
202. Howto download a whole WWW site in one shot? (a la Offline Explorer) wget -p --progress=dot
203. What can I replace ASP with? Use PHP and MySql
204. Howto add f.ex. 22 days to the current date? (needs mysql server) echo "select date_add(curdate(),interval 22 day) Date;"|mysql
205. Howto subtract f.ex. 120 days from the current date? (needs mysql server) echo "select date_add(curdate(),interval -120 day) Date;"|mysql
206. Howmany days are there to Christmas? echo "select to_days('2004-12-24') - to_days(curdate()) 'See you in';"|mysql
207. How can I quickly test my php script from a console? echo "<?php phpinfo(); ?>"|php|lynx -stdin
208. What is Phonetic? Some kind like chat, shortening a sentence and cutting the vowel, e.g. "See you late = SYLTR" ; "I love NewYork = ILFNYRK"; try: echo "<?php echo metaphone('I love NewYork')?> "|php
209. Howto create ascii art? (a la those creative signatures you see from the underground. I use figlet-2.2.1-41.suse.i586.rpm; nice fonts: catwalk, crawford, fraktur, isometric, larry3d, roman, speed art) /usr/games/figlet -tcd /usr/share/games/ figlet/fonts/contributed -f broadway ascii OR cd /usr/share/games/
figlet/fonts/contributed ; /usr/games/figlist -d /usr/share/games/
figlet/fonts/contributed | xargs -i /usr/games/figlet -tf {} {} Art
210. Howto create a nice ASCII-box around a text? (needs boxes-1.0-1.i386.rpm) boxes -l AND /usr/games/figlet -tcd /usr/share/games/
figlet/fonts/contributed -f broadway ascii |boxes -ac -d dog
211. I am boring and exhausting, what should I do? (You do nothing and be exhausted, something wrong ;-); to everyone who experiences the same "trouble" as my cousin :-) ) Stop gaming, do some creativity like this one: "telnet", make your homework, help your mother and then go to the library
212. Howto Cesaer-code a message? (moving every letter a character ahead) echo "from cesaer to the mystery cleopatra" | tr '[a-z]' '[b-z]'
213. Who is Socrates? (you must connect to the internet) dict -h socrates
214. I have just been recruited by the CIA, the Foreign Affairs department. I need more infos about Iraq Wow, A spy who loves Linux. Ok connect your micro Linux satellite laptop to the web-channel, type: dict -h -d world02 -s prefix iraq
215. Howto get more info about an element? (you must be online) dict -h -d elements uranium; dict -h -d elements tungsten
216. What does the latin word "vita" mean in english? (you must be online) dict -h -d lat-eng vita ; dict -h -d eng-lat -s regexp \.wor\. ; AND dict -h -D -v
217. I know many Windows applications, can I find those in Linux? Linux - Windows equivalents
218. Is there an application a la Microsoft Money? gnucash
219. Is there an application a la Thumb Plus? gthumb
220. Is there an application a la Hyperterminal? minicom, tip, cu
221. Is there a good picture manipulation application a la PhotoShop/Picture Publisher? gimp
222. Is there a good drawing tool a la Corel Draw? xfig (very good) or dia for diagram (dia*.rpm)
223. Is there a "download accelerator" feature in Redhat? Konqueror and Netscape supports the resume operation, so the download starts at the point where it stopped
224. Does Linux has a good mail client? mutt, kmail, evolution, pine, elm
225. Is there a html editor a la FrontPage? quanta from KDE or Bluefish
226. How can I open/write a MS word document? OpenOffice, KOffice or StarOffice
227. Howto get a good picture viewer a la Acdsee32? kuickshow OR gqview --slideshow <path to your images>
228. Does Linux has something a la 3DStudio? The excellent blender3d from The Nederland ; AC3D; LinuxArtist
229. Is there a light application a la Paint Shop Pro? display
230. Howto quickly print the word hello 100 times? yes hello |head -100
231. I am alone 100m above the ground, my cell phone is broken, I want to call my colleague at the other end on the ground. write user ttyX ; e.g. write jane tty2
232. Howto print only lines with more than 10 characters? awk 'length > 10' <file name>
233. How can I read backward as good as Leonardo da Vinci? echo "mississippi impossible" |rev
234. How to say "Hello" to the aliens from the Xunil Galaxy? (use copy/paste) perl -e 'use POSIX;print $i=pack(c6,(36*2), ceil(100.68), (unpack(c,h)+4), (oct ("0b1101100")), ( hex("6f")) ,10); '
235. Howto convert a file from lowercase to uppercase? cat <file> | tr '[a-z]' '[A-Z]'
236. Howto make a dice? perl -pe 'use POSIX; print ceil(rand 6)."\n"'
237. Want a primitive elapse watch? while true; do clear;date; sleep 1; done
238. Howmany days since January 1, 1970? (use it to find the expired date from your passwd file) echo `date '+ %s'/86400`|bc
239. Howto reverse the output so bottom becomes top? tac <filename>
240. Howto read (not write) the CDs from Roxio/Adaptec's DirectCD (meaning the session is not closed)? mount -t udf /dev/cdrom /mnt/cdrom (mount the CD with the UDF filesystem; only for CDBurn without the "SCSI host adapter emulation" option in grub.conf)
241. Howto create an iso file? man mkisofs OR xcdroast
242. Howto get my hotmail/yahoo mails without opening a web browser? (run the perl script from the console, it downloads all the mails into your mailbox, you can then read them (offline) with kmail without any waiting. Very good.) gotmail (for Hotmail) ; FetchYahoo
243. What is the best spam killer? Try spamassassin-2.31-16.i386.rpm in cooperation with procmail
244. Howto collect status from remote hosts? rup (must install the rusers-server*.rpm package on all hosts)
245. Howto remote-mount a filesystem with Midnight Commander? Install the mcserv*rpm package (RH7.2) and restart the portmap service (if it fails, check your firewall) before starting the mcserv daemon. Run mc and press F9/Network link and then enter the remote IP addr.
246. Howto read/write linux ext2/ext3 partition in Windows98? John Newbigin's Explore2fs
247. Howto debug a korn/bash shell script? ksh -x filename.ksh (bash -x)
248. Howto create a BIG file for test purpose (ftp, hardware (time))? (XXX=filesize in Mbytes and XXX < total RAM ; ignore the warning; use copy/paste) ulimit -f `echo XXX*1000000/1024|bc` ;cat /proc/kcore > big_file ; ulimit -f unlimited (or just dd if=/proc/kcore of=/tmp/big_file)
249. Which libraries a particular application is using? ldd `which XXX` ; where XXX is the name of the application
250. Is there a tool for LDAP? gq
251. Howto write in colour on a text console? (BG;FG;Attribute ; 30=40=black 31=41=red 33=43=yellow etc ; 00m=default 04m=underline 05m=blink ) echo -en "\033[46;33;01m" Hello World "\033[00m\n"
252. Howto test my syslog facility and priority setting? (man syslog.conf) echo "Hello, goodbye" | logger -p kern.crit (then make a tail on /var/log/messages)
253. Howto test the speed of my new accelerator graphic card? glxgears ; glxinfo
254. Is there any tools for helping me to improve/check my "regular expression" skill? regexxer OR Use "Regular Expression Editor": Open a text file in Konqueror/<ctrl+F>/click "Regular Expression"/click Edit ; use the tools on the top to create your expression on the editing area, the result is at the bottom
255. I want to be a good text-manipulation-guru. man sed ; man awk ; (man perl)
256. Howto get a Linux system running without knowing anything about Linux, or anything about any configurations and do not have any hard drive? (good for a diskless enviroment, can use it to replace netbooting) Use the wunderbar Knoppix or DemoLinux
257. Howto connect to a terminal server? rdesktop (rdp protocol)
258. Howto get a higher resolution on a console? Append "vga=773" at the end of the line "kernel" of the Grub's /boot/grub/grub.conf
259. Howto find who owns a domain name/web site? whois
260. Howto test that I have a particular perl module? perl -e 'use XXX::YYY' ; where XXX::YYY is the perl module
261. What is the atomic weight of an element just like gold? units gold (vi /usr/share/units.dat)
262. Howto convert the different units like inch, meter, pound? (more /usr/share/units.dat) units 1in cm; units 1feet m; units 1pound kg; units 1mile meter; units 1gallons liter; units "2 days" seconds; units earthmass; units c (the speed of light); units match (sound speed); units metriccarat (jewel); units 20degC degF; units marathon; units electrichorsepower; units A4paper; units quarternote (music)
263. What is the country code for Vietnam? grep -i vietnam /usr/share/zoneinfo/ (who has IL? "grep -iw il /usr/share/zoneinfo/
264. What is the latitude and longitude in Copenhagen? grep -i copenhagen /usr/share/zoneinfo/
265. What is the TZ environment variable for Singapore? grep -i singapore /usr/share/zoneinfo/
266. Howto convert dos-text-format to unix-text-format? (the difference between Dos & Unix format is: "a dos new line" (an Enter) contains a LF (line feed) plus a CR (carrige return), when "a unix/linux new line" only has a LF) dos2unix <filename>
267. Howto print number for each output line? cat -n <filename>
268. Howto filter duplicate lines in a text file? sort -u <filename>
269. Is there a terminal calculator? bc -l (try 1/9; try 2^32 ; the doubling function for a population increment of 2% yearly: l(2)/l(1.02) (yes, in 35 years) ; for an increment of 0.7% yearly (Denmark): l(2)/l(1.007) equals 99 years
270. Howto lock my working console? vlock
271. Howto make a dialog box? kdialog --yesno "Let it be" ; dialog --calendar Hello 0 30 14 07 2003 ; dialog --yesno "Are you ready?" 10 20 ; xmessage -center "Hello World" -timeout 5
272. Howto quickly find the biggest files in a directory? (the unsort output saves in /tmp) du -k /home/ |tee /tmp/a.txt|sort -nk1
273. Advanced system admin files/directories /boot/grub; /etc/hosts; /etc/inittab; /etc/rc.d; /etc/xinetd;
/etc/sysconfig; /etc/X11/XF86Config; /var/log; /proc;
274. I have one runaway process, it spawns many other child processes with the same name. How to kill them at once? killall -9 XXX or ps -ax|grep XXX|awk '{print $1}'|xargs kill -9 ; XXX is the NAME of the runaway process. Test it without the last pipe to be sure you not kill the wrong one.
275. Howto make a backup on my home directory to a file? dump -0f my_backup -z4 /home/jane OR using afio OR amanda
276. How to restore the backup file? restore -xvf my_backup (enter 1 for the question "Specify next volume #:" ; use interactive -i (?,add,extract) if you only want to restore some files)
277. How can I tune/tweak the kernel? redhat-config-proc
278. How to find opened ports? (use firewall to protect them) nmap localhost ; netstat -tln
279. Does Linux have something a la Sun's ndd? ethtool
280. Howto list the statistic from my network? netstat -s
281. Howto find which application/daemon opens which port? (socklist is from procinfo*.rpm) socklist |sort -k2 -n
282. Howto close an opened port? To open a port means to have a service/application running (read the previous question). Just stop or kill the service then the port close. Test it with "nmap localhost"
283. Howto find which computers connect to my server? clear; tput smso;perl -e '$a="Foreign Address";$b="Local Port";printf"%-20s\t %-20s",$a,$b';tput rmso;echo -e '\n';netstat -tn|sed -n '3,$'p|awk '{printf("%-20s\t %-20s\n", $5,$4)}'|sort -n OR less /proc/net/ip_conntrack
284. Howto use signature for my web server and howto encrypt my mail? man gpg (try: gpg --list-keys)
285. Howto get security alert and howto update it? (required internet access) up2date (new security alert arrives via mail)
286. Howto install a firewall? redhat-config-securitylevel ; lokkit
287. What is the best tools to protect and improve my network against intruders, somekind of "Intrusion Detection Systems"? snort ; ethereal ; tcpdump ; nc; sniffit (use it with: swatch, netstat, socklist, nmap, nc)
288. Are there any good virus scan? Try clamscan, f-prot (very easy to use and install) and vexira.
289. Howto share a Redhat internet connection with windows clients? Clicking here
290. Howto use ipchains for my firewall? Clicking here
291. Howto quickly protect my PC against the internet (with iptables)? Use Jamin W. Collins's Firewall script. It is not a tutor, but an interface to iptables. Use 200 minutes then you are safe (and use tripwire fingerprint, chkrootkit then you can sleep during the night :-)).
292. Howto quickly make a fingerprint (a la tripwire; to make sure nobody has compromised your orginal system commands) of my important/vulnariable directories? (/bin, /sbin and /usr/sbin) Very simple, just make a list of the directory and save it on a floppy disk. a) ls -l /bin/* |gzip -c > /mnt/floppy/bin_dir.gz b) do it for other directories. When you want to check your system, just do step a and b again and compare those with the backup on the floppy. Use zdiff <bin_dir.gz> <bin_dir_new.gz>
293. Howto close for login access on my server during the night (and at the weekends)? (avoiding nightly cracking activity; remember to patch all the security holes/exploit) Create a system admin account "sysadm" (check to see if you can "su" from it); add "account required /lib/security/" at /etc/pam.d/login ; add "login;tty*;!sysadm;Wk|2100-0600 " at /etc/security/time.conf
294. I get error when starting portmap ;OR some of the applications/games do not work on the network. Your firewall is probably blocks for some of the port. Try to stop the firewall: service ipchains stop (or iptables).
295. Howto use/repair GRUB and howto use it as a boot manager (about MBR, disk structure)? Clicking here
296. Howto build a new kernel? Brian Ward's Kernel-HOWTO
297. How to avoid my bandwidth bombard with mp3 traffics, something like bandwidth limiting? Clicking here
298. Howto use spamassassin to filter spam mails? Clicking here
299. Howto synchronize my workstation's directory (a regular user, NOT root) with my laptop like Briefcase in Windows? (On both machines: chkconfig rsync on ;chkconfig rsh on ;service xinetd restart AND add the hostname you trust to /etc/hosts.equiv). Sync all files from /usr/fy on the workstation to the /home/fy on the laptop with the hostname bi. rsync -auvz /user/fy/* bi:/home/fy; rsync -auvz bi:/home/fy/* /user/fy (BTW the two actors Fy & Bi had given me many "happy hours" during my growing up).
300. Howto quickly distribute (close to "Remote Installation Service") a Redhat installation? ksconfig (Kickstart)
301. Is there any good IDE (Integrated Developer Enviroment) for Linux? kdevelop, CodeForge, Glade, Kylix, Dev-C++ and Motor
302. Is there a good documentation/code demo for Trolltech-Qt X-Window-programming (Kde)? qtdoc/assistant (qt-devel-3.1.1-6)
303. Is there a good code demo for Gnu-gtk X-Window-programming (Gnome)? gtk-demo (gtk2-2.2.1-4)
304. How can I collect system statistics from my server? run /usr/lib/sa/sa1 every 10min (use crontab; see /etc/cron.d/sysstat), it collects the statistics and appends them at /var/log/sa/saXX (XX is the date). Use "sar" to display the statistics (sar -A; sar -b) and "man sa2"
305. Show me a "chain" command that Richard Pryor will say "Wow" (remember RP in "Brewster's Millions"? The scene where he asked a decorator to spend thousand of dollars for decoration a "5 minute" rum); use copy/paste in Konqueror ; you need perl: perl-5.6.0-17.i386.rpm; replace the 2 last with "last -f /var/log/wtmp.x" for previous months. clear;last|tail -3|tail -1|awk '{print "Statistics from "$3" " $4" " $5"\n"}';last| perl -e 'while(<STDIN>){if (/^(\S*)\s*.*\((.*):(.*)\).*$/){ $h{$1} += $2; $m{$1} += $3;$l{$1}++;}} foreach $user(sort(keys %h)) {$h{$user} +=int($m{$user} / 60); $m{$user} %=60; printf"User %-8s login %05d:%02d hours, total logins %04d times\n", $user,$h{$user}, $m{$user},$l{$user};}'|sort -rk7
306. Do you have one for Gene Wilder too? (use copy/paste in Konqueror; you need perl: perl-5.6.0-17.i386.rpm). NB: there are in average 4-10 objects (gif, jpg, png etc) on a webpage. clear; head -1 `ls -tr /var/log/httpd/access_log*|head -1`|awk '{print "Statistics from " $4$5 "\n"}'; cat /var/log/httpd/access_log*| perl -e 'while(<STDIN>){if (/^(\S*)\s*.*/){ $logins{$1}++;}}foreach $pc(sort(keys %logins)){ printf "The machine %-15s got %05d objects from your web server\n",$pc, $logins{$pc};}'
307. The server's disk is filling and filling, the server will break down very soon. How can I find which process causes it? (do it twice and change 500000 with an another byte-size depending on your situation and replace the word "lib" with "ZZZ" if you want to have the lib files on the output) clear; perl -e '@data=`lsof`;foreach (@data) {@f=split;if ($f[6] > 500000 && $f[8] !~ "/lib/") {print $_;}}'
308. I am a romantic guy, howto define the date of moonlight? (The 15th in a month of the Chinese calendar is always a fullmoon day; Thanks to John Conway for his simple moon rule (85% of the results with 100% hit) and John Walker for his moontool). Replace YYYY with the year you want (2000-2019 only). Use copy/paste in Konqueror. echo YYYY|awk 'BEGIN{m=1;d=1;};{c=substr($0,1,2);y = substr($0,3); mod=y%c;mod*=11;mod%=30;printf("\nFull Moon %d (+/- 1day) ONLY for Feb2000-Dec2019\n\n",$0); while (m<13){ while(d<32){if(m<3){m2=m+2}else m2=m;fase=mod+d+m2;if(fase==53 ||fase==23){printf("%-2s: %d\n",m,d);d=1;break;}d+=1;}d=1;m+=1;}}' OR gcal -n --chinese-flexible-holidays
309. Howto control/limit my consuming of an internet connection? (say you get 120 minutes for each connection; if you have an another value change the b=120 to that value) ps -eo "%t %c"|grep pppd|awk '{print $1}'|awk 'BEGIN{FS=":";};{ if(NF==1){printf("You have 2 hours\n");exit}; if(NF==2){h=0;m=$1}; if(NF==3){h=$1;m=$2};t=h*60+m;b=120-t; h=b/60; m=b%60; printf("You have %d hours and %d minutes back\n",h,m);}'
310. Howto find the word frequency of a text file? (use it to find out how good your students are and how good you are to teach) cat <file name>| perl -e '$/ = " "; while(<STDIN>){ tr /A-Z/a-z/ ; @ww=split; foreach $w(@ww) { $t++; $ar{$w}++; }}foreach $w(sort (keys %ar)) {print "$w $ar{$w} \n";} print "$t total words found \n";'|sort -nrk2| more
311. How to rename my jpg files to sequential files (e.g. pic1.jpg, pic2.jpg, pic3.jpg etc)? Replace XXX with the name you want to use. perl -e '$n=1;@data=`ls $ARGV[0]`;foreach (@data) {@f=split(/\./);chop($a=$_);$c=$f[1];system "/bin/mv $a $ARGV[1]$n.$c";$n+=1;}' \*.jpg XXX
312. Howto get a TOP25 of downloaded files from my public ftp server? (use copy/paste) clear; echo -en "\033[40;32;01m";head -1 `ls -tr /var/log/xferlog*|head -1`|awk '{print "Statistics from " $2" "$3" "$5 "\n"}'; cat /var/log/xferlog*|perl -e 'while(<STDIN>){if (/^\s*.*\s+(\/.*)[ab]+.*/) {$n{$1}++;}} foreach $file(sort(keys %n)) {printf "File %-44s downloaded %04d times \n", $file, $n{$file};}'|sort -rk 4|head -25;echo -en "\033[00m"
313. Howto monitor my disk usage? (change 90 to an another value suit to your need; the value is in percent from the command "df"; put it in a script/crontab ; only for bash shell, use copy/paste) R=$(perl -e '@d=`df`;foreach(@d){@f=split;print "$f[0]\n" if$f[4] >90;}'); if [[ $R != "" ]] ;then echo Full Disk: $R ;else echo No problem;fi
314. Howto change the first lowcase character of a filename to an uppercase one? (reverse it by changing "y/a-z/A-Z/" to "y/A-Z/a-z/") perl -e '@data=`ls $ARGV[0]`;foreach (@data) {chop($a=$_);@f=split(/ */,$_,2);$f[0] =~ y/a-z/A-Z/;system "/bin/mv $a $f[0]$f[1]"}' <filename>
315. Why did the HomeBanking system not accept my "giro form" payment? (probably because the checksum on the giro-form is wrong (using modulus 2). Replace XXX with all the numbers (14 of them) from the giro, EXCEPT the LAST figure (the 15th). The last figur is the checksum, compare it with the result from the awk script. echo XXX |awk 'BEGIN{i=1}{while(i<=14){num=substr($0,i,1); if(i%2==0)n=num*2; else n=num;if(n>9) {s1=substr(n,1,1);s2=substr(n,2,1); n=s1+s2} s=s+n;i+=1}} END{print s;if(s%10==0) r=0; if(s<10)r=10-s;if(s>10 && s<20) r=20-s; if(s>20 && s <30)r=30-s; if(s>30 && s<40)r=40-s;if (s>40 && s <50) r=50-s;if(s>50 && s<60) r=60-s;if (s>60 && s<70)r=70-s;if(s>70 && s<80) r=80-s;if(s>80 && s<90) r=90-s;if(s>90 && s<100) r=100-s;if(s>100 && s<110) r=110-s;if(s>110 && s<120) r=120-s;if (s>120)r=130-s;print "The checksum is: " r}'
316. Howto stress-test my CPU? (use "top" to check it out; break with ctrl+c; more stress: change the number 4 to, say 9) while true; do if [[ `ps -ef|grep -w "/proc/kcore"|grep -v grep|wc -l` -lt 4 ]]; then {( dd if=/proc/kcore of=/dev/null &)} ;fi;done
317. Howto make a BIG ramdisk ( say 300MBytes ( I suggest only use 90% of the total RAM ) ; you are able to create 16 ramdisks : /dev/ram0 ,
/dev/ram1 .. /dev/ram15 ) ?
Add "ramdisk_size=300000" at the end of the "kernel" parameter at /boot/grub/grub.conf. Reboot your PC ; mkdir /mnt/ramdisk ; mke2fs /dev/ram0 ; mount /dev/ram0 /mnt/ramdisk
318. Howto stress-test my RAM? (needs a BIG ramdisk (see above) and use "ls -l /mnt/ramdisk/BIG" to check) while true; do if [[ ! `df -k /mnt/ramdisk/ | awk '{print $5}' | tail -1| awk 'BEGIN{ FS="%" } ; {print $1}'` -eq "100" ]]; then { (dd if=/proc/kcore of=/mnt/ramdisk/BIG) } else { (rm -f /mnt/ramdisk/BIG) }; fi; done
319. X X Magic
320. X Window Try to be familiarized with all the menus in the X Window.
321. Howto restore the KDE layout in Redhat9's BlueCurve? (possible with auto-login without password) Clicking here
322. How does the X-Window work? more `which startx`
323. Show me some shortcuts in KDE, please. Start-menu (ALT+F1); Run (ALT+F2) ; Show/unshow Desktop (CTRL+ALT+d); Switch between applications (ALT+TAB) ; Close application (ALT+F4) ;Switch between virtual screens (CTRL+F1 F2 etc) ; Process manager (CTRL+ESC) ; Lock PC (CTRL+ALT+l) ; Quit Window (CTRL+ALT+Backspace) for more see ~/.kde/share/config/kdeglobals
324. Please show me some great shortcuts in konsole. New session (<CTRL+ALT+n>) ; switch between session (<SHIFT+L/R keys>) ; Paste (<SHIFT+Insert>) ; Menu (<CTRL+ALT+m>) ; Name a session (<CTRL+ALT+s>) ; Search previous commands in history (<CTRL+r>)
325. What about some useful shortcuts in konqueror? Find (<CTRL+f>) ; Home (<CTRL+Home>) ; Goto address bar (<ALT+o>) ; Go back (<ALT+L/R keys>) ; New window (<SHIFT+CTRL+d>) ; Bookmarks (<F9>) ; Send link (<CTRL+l>) ; Google (<F6 and type gg: redhat FAQ tips)
326. I have installed KDE, GNOME and WindowMaker. Howto switch from the one to other? switchdesk OR less ~/.Xclients or less /etc/X11/xinit/Xclients
327. Howto change/add my Window menu? kmenuedit
328. My X Window could not start, I got a black screen or just an error. Wrong screen resolution or missing X config file or wrong mouse type. Rerun mouseconfig (start with a standard mouse) or rerun redhat-config-xfree86 (if you are doubt, set the VERTICAL SYNC between 50-70 for an old monitor. A good idea is to manually enter (not use the auto setting) the exact values for both HOR/VER sync from the Monitor's User's manual). Escape with <CTRL+ALT+Backspace> if the screen flicker too looong.
329. Where is the configuration file for X? /etc/X11/XF86Config (man XF86Config) ; good idea to make a backup of it. The log can be found at /var/log/XFree86*.log
330. Howto make a shortcut? Do it from the file manager Konqueror and drag the file to the desktop while keeping the left buttom down.
331. I want to make a backup of my bookmarks/link-favourite, where is it? cd ~/.kde/share/apps/konqueror/bookmarks.xml
332. I don't want to boot in X Window. I want to boot to a console. 1) Hit CTRL+ALT+F2 2)login as root 3)replace number 5 with number 3 at line
"id:5:initdefault:" of the file /etc/inittab
333. Where are the binary X files? cd /usr/X11R6/bin
334. Howto set preferences for the X display? man xset
335. Howto get a font viewer? kcharselect
336. Howto disable screensaver in Window? kcmshell kde-screensaver (X Window)
337. Where are the references/menu files for my Desktop? cd ~/Desktop ( "cd ~" means: go to your home directory)
338. How can I auto-start my application when entering X Window? Put a link in ~/.kde/Autostart . For example if you want to start "kmail" type the following at the mentioned directory "ln -s /usr/bin/kmail kmail", then a link will be created (use "which" to find the whole path for an application).
339. Where are the menu for X Window? /etc/X11/applnk-redhat/
340. Where are the references files for KDE? /usr/share/apps/
341. Howto change the fonts? kcmshell kde-fonts
342. What is the command of the KDE control center? kcmshell --list
343. I need a screendump application ksnapshot
344. Howto open a Windows help file? winhelp (need wine*rpm)
345. Howto get Windows Dos prompt? (needs Wine.XX.rpm and wine must set correctly at ~/.wine/config) wcmd
346. Howto get the informations from the Windows Registry Database? (needs Wine.XX.rpm) register
347. I had problem when running WINE in Redhat9, pourquoi? (download wine from the internet, maybe wine from RH8 is OK. The trick is to avoid the conflict with the new POSIX thread library in RH9) Type: export LD_ASSUME_KERNEL=2.2.5; wineserver -p1600 -f &; wine /dosc/windows/winmine.exe
348. Is it fast to use Wine emulator for Windows applications? Yes, it takes 2s for opening Agent, 3s for Downloading Accelerator, 5s for Oxford Dictionary, 4s for Notetab (on a 1.8GHz P4)
349. Is there any tool to help me with my poor imagination :-)? or Is there a good plot application to help me with my math? gnofract4D ; gnuplot (try: set polar <enter> plot [-.4*pi:12*pi] t <enter> ; Try them too: plot [-73*pi:.2*pi] t*sin(t) ; plot [-173*pi:1*pi] t*sin(t) ; plot [-.01*pi:74*pi] t*sin(t); plot [-36*pi:3*pi] .5+1*cos(t) AND FOR 3D: set parametric;splot u,v,u**2-v**2)
350. Howto add a new java plugin in Netscape/Konqueror? Use the enviroment variable NPX_PLUGIN_PATH (e.g. export NPX_PLUGIN_PATH=
Put it in /etc/profile at the second line)
351. I am an european accountant, how can I change the dot on the numeric keypad to a comma for easy my work? (NumLock is on; type the words in the quotes in ~/.xmodmaprc and add "xmodmap .xmodmaprc" in ~/.bashrc for permanent solution) xmodmap -e "keycode 91 = comma" ; X Window, to go back replace "comma" with "period"
352. Some funny/small X programmes? xeyes; xmail; xwininfo; ksnake; xmag; xsnow; tuxracer (needs an Accelerator graphic card) ; Maelstrom ; xboard
353. Does Linux have "Network Neighborhood" like in Windows? Yes, you need to install Samba and LinNeighborhood-0.6.X.rpm
354. Is there any good web admin tool?
355. Howto get a statistic page from a router/laserjet (via a web browser) without I need to do anything (crontab controls it)? Run Xvfb on DISPLAY "5" in the background (Xvfb :5 -screen 0 1024x768x8 -pixdepths 8 -fbdir /tmp), write a script to start the browser (for example: "konqueror -display :5 http://xxx-laser:1234/stat"), save the framebuffer from Xvfb (use option fbdir). To view the framebuffer use the command "xwud -in /tmp/Xvfb_screen0"
356. How to connect to a server via X? On the server: xhost +<name of the remote host> ; on the client: 1)startx 2)export DISPLAY=`uname -n`:0:0 3)telnet <server> 4)try xeyes
357. Howto use auto-login in X Window without using password? Clicking here
358. Howto configure my X-Window login? kcmshell System/kde-kdm
359. Howto configure my X-Window logout? kcmshell Components/kde-kcmsmserver
360. My konqueror (KDE) will not start, it just die after 30 seconds. No log no core dump. There are some corrupts in your references at ~/.kde. The easy way to solve this problem is to delete that directory (yes, you will lose all the old KDE setup, just like your modem setting, your personal background etc (a good idea to make a copy of ~/.kde before something go wrong). Something which are not important.).
361. Howto troubleshoot a problem that I can not find here? Read the log (output on the screen (use: command >& log) or at /var/log) at least 5 times, find some keywords in the log: 1) use apropos <keyword> 2) think twice 3) call Miss Google at 4) take a visit to Monsieur Newsgroup.
362. ----------------------- ---------------------------------------
363. ----------------------- ---------------------------------------
364. New hints since the last release R9.3 New hints since the last release R9.3
365. Where can I find the flags of the world? (needs the package wordtrans-1*) gqview --slideshow /usr/share/wordtrans/flags (use the two keys "PageUp" and "PageDown" to go quickly through image files)
366. Does Linux have a local dictionary? kwordtrans (it uses dictionary files at /usr/share/wordtrans; the best is the Germany-English book of Frank Richter)
367. From "uptime" the server has been up for a while, how to find the date I switched it on? echo "select date_sub(sysdate(),interval '139 22:52:0' DAY_SECOND) DATE;"|mysql
368. Howto add a number of seconds to a date? echo "select date_add('2004-05-29 18:00:00',interval '6:30:0' HOUR_SECOND) DATE;"|mysql
369. Howto measure temperature on my motherboard? XMBmon
370. Is there an application a la MS-project? MrProject ; Planner
371. Is there a chat client a la messenger gaim (V0.74) supports protocol AIM/ICQ, Yahoo, MSN, IRC, Jabber (support Groupchat), Napster; micq; Using Gnomemeeting for video conference
372. Howto print with columns? column; colrm; join; merge; paste - - -;
373. Howto watch changes of a webpage? (i.e. you want to update the news every 5min) watch -n 300 lynx -dump
374. I can't call my partners in LA, do they go bankrupt? :-) Relax, maybe your partners just have a day off for the national holiday, try: gcal -q AU_VI -n (for Australia) ; gcal -q TW -n (for Taiwan) ; gcal -q VN -n (Vietnam) ; gcal -q US_WA -n (USA) ; gcal -q AE -n (United Arab Emirates) ; gcal -q DE_BL -n (Germany) ; gcal -n -q GB_EN (UK) ; gcal -hh|more
375. When do my business partners celebrate their religion holidays? gcal -n --christian-holidays ; gcal -n --orthodox-new-holidays ; gcal -n --chinese-flexible-holidays ; gcal -n --islamic-civil-holidays ; gcal -n --hebrew-holidays ; gcal -n --persian-jalaali-holidays
376. How to colorize my log file? (needs logcoloriser-XXX.rpm) /var/log/messages|more OR loco /var/log/messages
377. Howto get a plain text version of a man page, without any control codes? man bash | col -b > man-bash.txt
378. I get some MAN pages which do not reside at the default MAN-path, how can I open them? Add a new MANPATH variable at /etc/man.config
379. Howto concatenate several physical hard disks (or raid devices) into a virtual storage pool? man lvm ; man pvcreate ; man vgcreate ; man lvcreate ; man mke2fs ; man pvscan ; cat /proc/lvm
380. Howto ray trace my own design? (needs povray-3.1g-6.i386.rpm) povray +I/usr/lib/povray31/scenes/arrays/array1.pov +Oscene.jpg +W400 +H360 +V -D +X ; gqview scene.jpg
381. Howto trim all my old temporary files (more than 3 weeks; put it in your crontab)? find /tmp -mtime +21 -exec rm {} \;
382. How can I use the different signals on a running process? man 7 signal
383. Howto see what an application doing? (a very strong command) strace <your app> >& trace.log
384. Howto find all programs with setuid (man setuid)? find / \( -perm +2000 -o -perm +4000 -o -perm +6000 \) -o -fstype nfs -prune
385. What is Doomsday? (it is the "same" day of the week for the following dates: 4/4, 6/6, 8/8, 10/10, 12/12, 5/9, 9/5, 7/11, 11/7 AND Jan/3, Jan/31 (for leap years it is Jan/4, Feb/1). Doomsday for 2004 is a Sunday, for 2005 it is a Monday. With the help of Doomsday you can quickly calculate the day of a week of a given day without a calendar, impress your girl friends at a party :-). Thanks to the Princeton mathematician John Horton Conway). Replace YYYY with the year you want (2000-2099 only)) a=$(echo YYYY| awk '{i=substr($0,3);q=int(i/12); r=i%12; q2=int(r/4); printf("%i",q+r+q2) }') ;echo "select DAYNAME(date_add('2004-01-06',interval $a day) )"|mysql


About Me
Islamic Sites
Earth Quake
Hardware Rate
SMS Jokes
Latest Games
About Adirai
Islamic Name
PC kural
Art Gallery
Latest IT News
Islamic Picture
About Linux
Latest Virus
Interview Tips
Ring Tones
Chennai Map
Longhorn O/S