Linux FAQ - Section 7
How do I do this or find out that ... ?


Question 7.1. How can I get scrollback in text mode ?

With the default US keymap you can use Shift with the PageUp and PageDown keys (NB: these must be the grey ones, not the ones on the numeric keypad !). With other keymaps check the maps in /usr/lib/keytables; you can remap the scroll up and down keys to be whatever you like --- for example, in order to remap them to keys that exist on an 84-key AT keyboard.

You can't increase the amount of scrollback, because of the way it is implemented using the video memory to store the scrollback text, though you may be able to get more scrollback in each virtual console by reducing the total number of VC's --- see <linux/tty.h>.

Question 7.2. How do I switch virtual consoles ? How do I enable them ?

In text mode, press Left Alt-F1 to Alt-F12 to select the consoles tty1 to tty12; Right Alt-F1 gives tty13 and so on. To switch out of X windows you must press Ctrl-Alt-F1 etc; Alt-F5 or whatever will switch back.

If you want to use a VC for ordinary login you need to list it in /etc/inittab, which controls which terminals and virtual consoles have login prompts. NB: X needs at least one free VC in order to start.

Kernels earlier than around 1.1.59 have a compiled-in limit on the number of consoles, for which the default is 8. See NR_CONSOLES in linux/include/linux/tty.h. Newer kernels allocate them dynamically, up to a maximum of 63.

Question 7.3. How do I set the timezone ?

Change directory to /usr/lib/zoneinfo; get the timezone package if you don't have this directory. The source can be found on sunsite.unc.edu in /pub/Linux/system/Admin/timesrc-1.2.tar.gz.

Then make a symbolic link named localtime pointing to one of the files in this directory (or a subdirectory), and one called posixrules pointing to localtime. For example:

   ln -sf US/Mountain localtime
   ln -sf localtime posixrules
This change will take effect immediately - try date.

Don't try to use the TZ variable - leave it unset.

You should also make sure that your Linux kernel clock is set to the correct GMT time - type date -u and check that the correct universal time is displayed.

Question 7.4. What version of Linux and what machine name am I using ?

Type:
   uname -a

Question 7.5. How can I enable or disable core dumps ?

Linux now has corefiles turned off by default for all processes.

You can turn them on or off by using the ulimit command in bash, the limit command in tcsh, or the rlimit command in ksh. See the manpage for the shell for more details.

That command affects all programs run from that shell (directly or indirectly), not the whole system.

If you wish to enable or disable coredumping for all processes by default you can change the default setting in <linux/sched.h> - see the definition of INIT_TASK, and look also in <linux/resource.h>.

1.2.13 will produce a.out core dumps [Q8.2 `What's all this about ELF ?'].

Question 7.6. How do I upgrade/recompile my kernel ?

See the Kernel HOWTO or the README which comes with the kernel release on ftp.cs.helsinki.fi, in /pub/Software/Linux/Kernel and mirrors thereof [Q2.5 `Where can I get Linux material by FTP ?']. You may already have a version of the kernel source code installed on your system, but if you got it as part of a standard distribution it is likely to be somewhat out of date (this is not a problem if you only want a custom-configured kernel, but it probably is if you need to upgrade.)

Remember that to make the new kernel boot you must run LILO after copying the kernel into your root partition -- the Makefile in recent kernels has a special zlilo target for this; try make zlilo.

Kernel version numbers with an odd minor version (ie, 1.1.x, 1.3.x) are the testing releases; stable production kernels have even minor versions (1.0.x, 1.2.x). If you want to try the testing kernels you should probably subscribe to the linux-kernel mailing list [Q2.8 `What mailing lists are there ?'].

Russel Nelson posts summaries of what changes in recent kernel patches to comp.os.linux.development, and these are archived on ftp.emlist.com in /pub/kchanges.

Question 7.7. Can I have more than 3 serial ports by sharing interrupts ?

Yes, but you won't be able to use simultaneously two ordinary ports which share an interrupt (without some trickery). This is a limitation of the ISA bus architecture.

See the Serial HOWTO for information about possible solutions to and workarounds for this problem.

Question 7.8. How do I make a bootable floppy ?

Make a filesystem on it with bin, etc, lib and dev directories -- everything you need. Install a kernel on it and arrange to have LILO boot it from the floppy (see the LILO documentation, in lilo.u.*.ps).

If you build the kernel (or tell LILO to tell the kernel) to have a ramdisk the same size as the floppy the ramdisk will be loaded at boot-time and mounted as root in place of the floppy.

See the Bootdisk HOWTO.

Question 7.9. How do I remap my keyboard to UK, French, etc. ?

For recent kernels, get /pub/Linux/system/Keyboards/kbd-0.90.tar.gz from sunsite.unc.edu. Make sure you get the appropriate version; you have to use the right keyboard-mapping package to go with your kernel version. 0.90 should work with kernel versions from 1.0.

For older kernels you have to edit the top-level kernel Makefile, in /usr/src/linux.

You may find more helpful information in the Keystroke HOWTO, on sunsite.unc.edu in /pub/Linux/docs/HOWTO/Keystroke-HOWTO.

Question 7.10. How do I get NUM LOCK to default to on ?

Use the setleds program, for example (in /etc/rc.local or one of the /etc/rc.d/* files):
   for t in 1 2 3 4 5 6 7 8
   do
        setleds +num < /dev/tty$t > /dev/null
   done
setleds is part of the kbd package (see Q7.9 `How do I remap my keyboard to UK, French, etc. ?').

Alternatively, patch your kernel. You need to arrange for KBD_DEFLEDS to be defined to (1 << VC_NUMLOCK) when compiling drivers/char/keyboard.c.

Question 7.11. How can I have more than 128Mb of swap ?

Use several swap partitions or swapfiles - Linux supports up to 16 swap areas, each of up to 128Mb.

Very old kernels only supported swap area sizes up to 16Mb.


Next: Miscellaneous information and questions answered.
Back: Solutions to common miscellaneous problems.
Return to contents.

Ian Jackson / ijackson@gnu.ai.mit.edu - 06 March 1996

Extracted from Linux Frequently Asked Questions with Answers, Copyright Ian Jackson 1996.