skimpydog.com Forum Index Redhat Base Learning & Understanding Redhat - Fedora - CentOS |
Browsing this Thread:
1 Anonymous Users
Bottom Previous Topic Next Topic |
|
|
|
---|
Poster | Thread |
---|
|
Learning & Understanding Redhat - Fedora - CentOS | #1 |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Webmaster
Joined: 2007/6/10
From Dallas, TX
Posts: 79
Level : 7 HP : 0 / 170 Group:
Webmasters Registered Users |
Getting Started
Understanding the basics of an Operating System is crucial to using the OS. Navigation within the file system is necessary. Customary Linux users will use the environment via console, text mode. -Although this is not always the situation - it truly depends on the physical location of the box, and it's configuration(s). If the box has the necessary binaries, and libraries compiled, you may use a Graphical User Interface (gui) - Locally, and Remotely. If you want to see if you have the necessary binaries and configurations needed to launch a gui, you may issue the command:
_______________________________________ I would like to gear more away from the GUI, and focus on the CLI (Command Line Interface). This does not mean you should close out your "X" session, you can leave it open, and simply use a terminal window. It does not matter which terminal you decide to use. In a matter of fact, if you use your X session, you can be on the internet with graphics at the same time. If you should need to manually kill your X session, there are a few ways to go about this, but this truly depends on how the service was started. If you are booting into Run Level 5 (also known as init 5), this is default for GUI, and therefore you are using the GUI until you are in runlevel 3, or 1,2. While in init 1,2, and 3 you may "startx" at any time, unless there is already an X session opened on the host. init run levels works like this:
http://en.wikipedia.org/wiki/Runlevel You may change the default run level by editing the file:
You may change the run level you are in by issuing the command:
etc.... If you are truly new to Linux, you are probably wondering "How do I edit the file /etc/inittab? How can I boot into the GUI all of the time?" You may use the text editor "vi", aka "vim" to edit the file you wish to create/modify. For example:
To change the default run level, change the line: Text console
to: GUI
vi is a little different to use than what most Windows users may be used to. I recommend the application "vimtutor" to learn vi:
Another method of killing your xsession would be to actually terminate the process itself. If you started the gui by issuing the command "startx", you should be able to logout of the xsession, and that alone take you back to the CLI. If you should only need to restart the x environment, you may issue the command:
To take you to one of the other terminal sessions, you may issue the command: From X:
From the terminal CLI:
There are 5 sessions that you may login to. These are known as tty{1-5} If you did not kill your xsession, you may go back into your X environment by using:
This is known as tty6 Now if while you are browsing through your terminal sessions, you notice on tty1 this is where the xsession is being launched from. You may kill the session all together by issuing the command:
################################### Troubleshooting X Now what if you are having issues with starting X, how do you go about troubleshooting such things? After all the GUI does not work, and now you are limited to only the text console interface. This is where things get a bit tricky - but are normally overcome pretty easily. Unlike Windows, there are log files all over the place, and there are ways to backtrace through an application to determine where the failure was. For example, there is the data that is output on the console (monitor) when an application fails (most of the time anyways - it truly depends on what you are doing). You can scroll up and down in the terminal by using:
and
There are also the log files them selves. So how do you know where things are being logged? There are a few ways to determine this, but you have to know where to look. The folder /etc basically contains the configuration files for your applications/services. In other words, if you want to change the way your box boots into init 3, or init 5 you would change the file /etc/inittab. If you want to change the way your file systems are mounted, you would edit the file /etc/fstab. If you want to chage the way your X environment launches (drivers, screen resolutions, etc), you would edit the file /etc/X11/xorg.conf.
If you want to view the xorg log, you would look at /var/log/Xorg.0.log:
To view the overall system log, you may view the file /var/log/messages:
There are often many issues that may be encountered when attempting to use X including drivers, and this often leads to modifying your kernel. Kernel The kernel is actually what controls the way your hardware interacts with the current environment; in other words, this is how your hardware will interact with your software. I'm not going to go too much into kernel building here, but there is a lot of information related to most hardware devices, and in order for your hardware to properly operate, you will need to tell your box what hardware it has, and how it should run. This is the overall purpose of the kernel as this allows interaction between you and your device. You may find more information by doing specific searches on google.com such as "nvidia CentOS5.1 kernel drivers", and you should be able to find specific information relating to how your kernel should be built. Often you will need the kernel sources, also known as development packages, and you should be able to obtain a copy of the latest kernel, and it's sources by issuing the command(s):
You can always test your environment if you have the proper opengl libraries, and binaries compiled on your box by issuing the commands to see if you have 3D, and 2D hardware acceleration using the following commands:
and
Now lets say you issue those commands, and you end up with the error of:
This simply means you need to start your X session before you can test opengl. Navigation Navigating through Linux is really quite simple. Similar to DOS, there are commands to view the contents of a directory, and change to that directory to do work. For example:
In the above I used the commands "ls", and "cd". ls - list directory contents cd - change the current directory to Here is an example of viewing the contents of a few directories at once:
|
||||||||||
Posted on: 2009/1/24 16:52
|
Top Previous Topic Next Topic |
|