FreeOS.com logo

FreeOS Most Popular
* Most Read stories
* Commented Stories
* Active Categories
* Non Linux Section
* User Submitters
* Top Polls
* Top Authors
* Top Reviews
* Top Rated
* Top Search Terms

Top Articles
* Writing a Linux device driver
* The Linux filesystem explained
* Samba NT Domain Controller
* Setting up Squid as your caching HTTP/FTP proxy
* Web server tutorial - Part 1

FreeOS Highlights
* Howtos (72)
* Reviews (20)
* Opinions (18)
* Interviews (8)
* News (3)

My FreeOS

Nick:
Pass:
Register

Forgot your password?

Contact Us
Contact Us

       

Project: Linux triangle Howtos triangle

Linux 2 Cent tips

By Trevor Warren <trevor@freeos.com>
Posted: ( 2001-01-11 11:44:13 EST by )

Not every task under Linux involves re-compiling the kernel or is accomplished in a minimum of 12 steps. Here is a FreeOS.com guide giving you the essential tips and shortcuts for dealing with various mundane tasks that anyone will have to perform on their Linux system. Valuable, if you want to get from A to B that much quicker.

This article is a practical guide giving you some shortcuts to ease your way around Linux. This is a compilation coming out of some reading on our part, references from various resources on the net and of course the many gray hairs that we have acquired -- administrating and using Linux. Apart from a whole lot of tips out here, we will also be dealing with some common commands that you will need while working on any *nix system. In general it would safe to say that almost all the commands mentioned here should work in the same manner on the other Unices out there. Well, almost.

Let's look at the syntax of the following statement. crtl+alt+f. What is meant by this statement is that you have to press the keys crtl, alt and f at the same time. Do as you would for ctrl+alt+del under Windows.

Common shortcuts you should know

Ctrl+Alt+'+': Using this command switches you to a higher resolution than your GUI started up in.

Ctrl+Alt+'-': Using this command switched the screen resolution lower.

Ctrl+Alt+Backspace': It kills the X server. Use it if your normal logout option does not work.

Shift+PageUp: Scrolls up through the terminal output. Use this and the one below to move through screenfuls of information.

Shift+PageDown: Scrolls down through the terminal output.

Ctrl+Alt+F1: Linux gives you the capability of working on more than one virtual terminal at a time. You can have any number of virtual terminals but most Linux system are setup for six that are accessible through 'ctrl + alt + f1' to 'ctrl + alt + f6'. So, basically f1-fn tells your system to switch to the virtual terminal corresponding to the function key number. You will be using this most often to jump from one terminal to another.

Ctrl+Alt+F7: While working in the Unix command line interface, if you want to get back into the GUI mode, all you have to do is issue this command.

Ctrl+C: This command halts a running process. Use this to quickly exit from any program that you are running.

Ctrl+D: This command is used to log you out of a particular terminal. It also issues an EOF (End Of File) to the program that you are working in.

Ctrl+Z: Sends a current process into the background. Also if your terminal is messed up because you 'cat' a binary file 'ctrl + z' will clear up the screen for you and give you a clean prompt.

Ctrl+S: Scroll lock. Your screen will not be updated.

Ctrl+Q: Remove the scroll lock set above. You will now be able to interact properly with your terminal.

Tab: One of the most used keys. Pressing the 'tab' key while typing the path to any directory or a filename is very helpful. Write the first few characters of the file or directory and press the tab key to complete the name or give you a list of possibilities. When pressed during an incomplete command, the 'tab' key completes the command for you.

Ctrl+Alt+Del: When used at the console it reboots the machine. Remember it causes a soft boot and not a cold boot. The system will shutdown all services before rebooting.

UP Arrow: In the terminal, it cycles through the list of commands that you have executed.

GPM: Let's look at copying data from one virtual terminal to another. This requires your mouse to be setup for GPM. Use mouseconfig under Red Hat and Yast under SuSE to set up your mouse correctly. Also make sure the package GPM is installed beforehand.

MiddleMouseButton: Just select the text you would want to copy using your mouse. Do as you would under Windows. Press and hold the right mouse button and then drag to select the text. Then switch to the terminal you want to copy to and click the middle mouse button. This will paste the text at the current cursor location.

~: This represents your home directory. Use this in a command and the `~` will get replaced by your home directory. cd ~/freeos . This command gets you to the 'freeos' directory, which is a sub-directory under your home directory.

Setting the speed of your mouse in X: Do a "man xset" and look at the option 'm'.

'Very Fast' xset m 7 10
'Normal(Fast)" xset m 3 10
"System Default" xset m default
"Glacial" xset m 0 10

The xset -m option takes two parameters: the first is the speed and the second is the threshold value. But these values will be reset as soon as you log out. To make this setting permanent, just add it to the ".xsession" file in your home directory.

Ctrl+Right-Mouse-button: Setting your Font Size in xterm. To set your font size in an Xterm you can make use of the command 'setfont' or simply just do the following. If you are in an xterm use 'ctrl + right mouse button. This will popup a menu where you can choose some (standard) font-sizes.

How to kill Netscape but have it save your bookmarks and history:

'kill -12" (USR2) is more gracious, when used to terminate Netscape. Netscape will save the bookmarks and history files of the current session.

Disable Blanking in Text consoles:

setterm -blank 0. To make this setting permanent, just add it to your .xsession file in your home directory.

To disable X-Server screen blanking:

xset s off

To make this setting permanent, just add it to your .xsession file in your home directory.

Turning off PING reply:

PING ( Packet Internet Groper ) is a service used most commonly to figure out the network status of your machine. Many a time the useful service provided by it could be used for a D.O.S. (Denial Of Service) attack against you.

A simple 'echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all' will do the trick. To turn it back on, simply 'echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all' to turn off the service.

Killing a Virtual Console without rebooting:

Log in as root, type 'lsof /dev/ttyx' where the 'x' in /dev/ttyx is the terminal number of the hung virtual console. This will show you the process that occupies this tty. Kill it and the getty process for that virtual console should respawn.

That's all for now. We will keep you all posted as and when we find some more good tips to add to this list. By the way, do mail us your tips and we will include them in here.

Other articles by Trevor Warren

Current Rating: [ 8.14 / 10 ] Number of Times Rated: [ 50 ]

More Howtos
* Kernel Compilation & Avoiding ‘Unresolved Symbol’
* Configuring CVS and CVSUP on Linux
* Knoppix installation tips
* Maximum Mount
* A WebServer Guide -- Help Using Apache

Contents
Articles
  Howtos
  Interviews
  News
  Opinions
  Reviews
Comparison
Links
  Articles
  Howtos
  Interviews
  Opinions
  Reviews
  Websites
News

Linux
About Linux

Print It!
Printer Friendly Version