Basic Linux Tips and Tricks, Part 1 - page 2
Who This Article Serves
Organize a stack of troubleshooting information where it's easy to find. Your paper computer documentation (motherboard manual, etc.), an installation disk for your Linux distribution, and the documents I recommend printing here, including this article.
I'm emphasizing console tools, i.e., the command line environment here because
- If you don't have access to the GUI because something is really wrong, only the command line can get your computer out of trouble.
- GNOME/KDE/Whatever windowing environment is a GUI shell over many command-line programs. If there is a configuration error in a GUI program that prevents its proper operation, you'll have to open a text editor to open the human-language configuration text file (frequently programname.conf). You may also need to try the command with a command-line switch (e.g. $ xset +dpmi with dpmi being the "switch") the GUI icon launcher may not be configured with. If you find that it works as required with that switch, right-click the icon, open the properties tab, and change the command entry to the one you found works.
To get to the command line, open a terminal window via Konsole (KDE) or GNOME terminal or boot the computer to a full-screen console session by selecting 'console' at the GUI login menu. If the X server that provides video happens to crash, you'll simply find yourself in a full-screen console session with no choice in the matter.
There are two modes in Linux, shown by the terminal prompts as:
$(normal user account)
Commands to be entered in terminal are in a monospace font, commands where one has to be in the root (administrator) account are indicated with
#, commands a non-administrative user can use with
Ubuntu users should use
$ sudo commandname
from a user account instead of root.
Though one can create a root account even in Ubuntu if one likes. (as I do) Any command that can be executed from user can also be executed from root, the reverse is not true, given the point behind a separate admin account.
The most basic commands include:
- Change directory:
- Move up a level in directory tree:
$ cd ..
- Directory filename (including sub-directories) listing
- List everything
$ ls -al
- Command line text editor
If the computer appears totally locked up and apparently won't respond to mouse/keyboard input:
- First try Control-Alt-backspace to restart X.
- If this fails, use this sequence: Alt-SysRq-s Alt-SysRq-u Alt-SysRq-b
The sequence first syncs the hard drive, then unmounts the filesystem, all without the damage to the filesystem one usually has to worry about if one resets the computer without an orderly shutdown regardless of OS.
Alt-Sysrq is the alternate command accessible from the PrintScreen key above the arrow keys at the top of the keyboard by pressing the Alt key + SysRq... so to get Alt-SysRq-s press Alt + SysRq + s (lower case) simultaneously and the other Alt-Sysrq keys the same way.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.