Linux command prompt

Linux command prompt

Linux Server About Us Links Downloads Contact Us Terms of use SiteMap
Linux command prompt
Linux command prompt

 

You are here: Linux Server >>Linux command prompt

Linux command prompt article lists.

Linux command prompt

Tips for New Linux Users, Part II




In Part I, we covered KDE's Konqueror, Gnome's Nautilus, Linux directory structure, tarballs, and mime types, among other things, and we'll now look at Linux Text Editors

Text Editors Every now and then, you will find it necessary to change a script, configuration, or text file. To do this, you will need a text editor. There are many text editors available in every Linux system. Each Linux distribution has its preferred or default text editor. Some are graphical or semi-graphical, and some are accessed through a terminal and depend totally on key commands and command lines to function. The advantage of non-graphical editors is that they can work easily through a remote connection. Telnet connections are text-only and work in concert with such editors.

I for one, avoid text editors whenever possible. I prefer to use a graphical user interface because I find them more intuitive in function. This is not to say that the command line interface in terminal mode isn't useful. It is often the best way to access a particular function or issue a system command. But for the editing of important files, I prefer a graphical editor.

I find myself using Gedit, a simple text editor for Gnome, and any one of the editors readily available in KDE, such as Kate, the "Kwrite" Advanced Editor, or the simple editor, Kedit. For the more technical, programming-oriented user, the Emacs family of editors is excellent for creating and modifying source code. In many distros, Emacs has an interface to the Concurrent Version System (CVS). Vim, a semi-graphical text editor that is upwards compatible with Vi (its less graphical older brother), is also useful for code development. Many experienced Linux users prefer Vi and Vim or Gvim (Gnome) for all of their text editing. But for our present purposes, I will stick to the graphical text editors that will enable the user to modify system configurations by simply writing them to the appropriate configuration files.

In Part I, we mentioned file managers such as Nautilus, KDE's Konqueror (in super-user mode), GMC (Gnome Midnight Commander), Xftree, and others. These file managers are designed to present the user with a visual overview of the directory structure of the system, presenting all files, folders, applications, and graphics in a hierarchical "tree" to facilitate the user's access. They work pretty much like the file manager in Microsoft Windows. They all have the same drag and drop and/or the right-click menu to select options for the handling of files and folders. Debian includes an "APT sources file" (see Debian's Advanced Packaging Tool documentation) which lists the sources or mirror locations where packages can be downloaded. The maneuver I am about to show you may also be accomplished by issuing commands from a terminal. I have a tendency to forget exact file locations, and specific command line syntaxes, so I prefer to do this visually. Files are easier to find this way and I do not need a reference book at my side for commands I seldom use. What I will do is add a mirror location to the list so that when I ask my system to seek an update or a new application, it will have one more place to search for it. In Debian the "list" or file in question is located in /etc/apt/sources.list.

In KDE, using the File Manager (located under System) in super-user mode, a simple click will open a text file with the embedded text viewer, but you will need to open it with a true text editor to actually perform edits. Simply find the file, right click on it, click on "open with" (similar to the process you might under Windows), and choose between the text editors with which you are presented, or simply scroll until you find one to your liking. Kedit will suffice, because we won't be editing and managing source code here. We only want to add a mirror to a list. The same principle applies to modifying configuration files. So, for this simple task, you only need to pick an editor sufficient for the job at hand unless you have time and want to learn the ins and outs of other editors such as Emacs, Xemacs, Vi, and Vim, to name only a few. All those editors include very extensive help files.

In the Nautilus and the GMC file managers, the process is much the same, but remember that the editing of certain files requires root privileges, so you will either have to log into a root session, or work from a terminal after logging in as root. Once again, I cannot stress enough the importance of taking your time so as not to delete or change something by accident when accessing configuration files as a root user.

As you can see, I added a security mirror to the list. Now when I update my system, that site will be automatically scanned for updates related to my system.

Of course the APT sources file isn't the only type of configuration file that may be modified with a text editor. Just to give you an idea of the power of editing configuration files, let's choose a Gnome file first -one that won't ruin your system if you or I make a mistake. There is a file in /usr/share/gnome/apps called ".order" that determines the order of items as they appear in the Gnome menu system. To modify anything concerning the menu system in Gnome, you must be either logged in as root in a terminal, or logged into a root session.

Look at the screenshot below and see the list as compared to the Main Menu. I moved Mail from the bottom to the top of the menu list. After saving my modifications, it appears in the place I have chosen in the order of presentation. You may also use this method to arrange submenus, change wordings, and add your own comments. Such modifications apply globally to all users, because that's the way Gnome handles menus. In KDE, each user is responsible for menu changes, usually through the GUI provided in the KDE Control Center. Much of this work may be done through the Menu Editor GUI provided with Gnome and via the Gnome Control Center, but not all of it.

For more information on the Gnome and the KDE menu systems and how to modify them, I highly recommend this article by David D. Scribner, "Get Your KDE and GNOME Menus in Line" and for information concerning both the Gnome and KDE Desktops, including the location of all the configuration files, "Get your Default KDE and GNOME Desktops in Line" by the same author is the best document I have seen on the subject.

You will have many occasions to use a simple or advanced text editor. You will often receive suggestions and recommendations concerning the modification of configurations, the addition of font lists, the removal of unwanted functions, and many other tweaks. All you need to know is the location of the file in question and the text to add to or erase from the content.

If you plan to build a large business network and plan much remote interaction to other local or distant stations, or if you plan to do much coding, and kernel tweaking, you would likely opt for the non-graphical editors and follow the necessary period of apprenticeship. If you just want to be able to tweak and improve your system bit-by-bit, and fine tune your distribution to your needs, graphical editors usually suffice, but the other editors mentioned should also be considered to increase your ability to control all eventualities.

A Wee Note-- The prior information is by no means intended to provide a complete tutorial on the subject of text editors in Linux. It is only meant to give the new user a taste of the possibilities and the power of their use. Most graphical, and especially non-graphical editors, have an included help file, easily accessed through the interface of each.

To perform tasks not provided by the GUI, or that a GUI simply cannot handle because of its design, the shell provides a powerful task-oriented tool. The Bourne Again Shell, or Bash, is the command interpreter used by GNU (the Free Software's freely distributable answer to Unix). Fully compatible with the Bourne shell, the command interpreter for Unix also known as sh. (/bin.sh is linked to /bin/bash), and if that's Greek to you, don't worry about it. It isn't clear to anyone! This is the most commonly used shell among Linux users. It incorporates features from both the Korn and the C shells, which we won't get into here.

Another shell called ash (named as such because it is very lightweight), is often used as the default shell on installation root floppy disks, but it lacks too many features to be effective in a full blown distribution and is not as useful and ubiquitous as bash.

Linux command prompt Related Links
Common linux commandLinux dos command
Ip address linux commandDate command linux
Linux unix commandLinux directory command
Linux dd commandLinux network command
Linux route commandCode c pipe linux command
Linux format commandLinux command grep
Linux make commandLinux print command
Linux time commandCoyote linux command
Linux rename commandCommand linux top
Dual boot window linuxLinux window xp
Dual boot window xp linuxRun linux on window
Window media player for linuxLinux versus window
Linux window networkLinux in window
Networking linux and windowLinux window manager
Linux x windowRunning linux on window
How to install linux on windowLinux window emulation
Linux window debateWindow 2000 and linux
How to run window program with linuxLinux to window comparison
Difference between window and linuxWindow game linux
Connecting window and linuxLinux dan window
Linux vs window xpLinux window application
Dual booting linux and windowLinux under window
Window is better than linuxLinux remote desktop for window
File sharing linux and windowRun linux in window
Installing window linuxCompare window and linux
 
©2005 All Rights Reserved   Linux Server