skimppimppin along! NEWS   FORUM   DOWNLOAD   LINKS    
HOME ACCOUNT PRIVATE MESSAGE  
Login
Username:

Password:


Lost Password?

Register now!

Main Menu

Search

skimpydog.com Forum Index
   Redhat Base
  Learning & Understanding Redhat - Fedora - CentOS

Browsing this Thread:   1 Anonymous Users

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
Learning & Understanding Redhat - Fedora - CentOS
#1
Webmaster
Joined: 2007/6/10
From Dallas, TX
Posts: 79
Level : 7
HP : 0 / 170
MP : 26 / 8763
EXP : 83
Group:
Webmasters
Registered Users
Offline
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:
startx

_______________________________________


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:
1 	Single-User Mode 	Does not: configure network interfaces, start daemons, or allow non-root logins.[2]
2 	Multi-User Mode 	Does not: configure network interfaces or start daemons.[3]
3 	Multi-User Mode with Networking 	Starts the system normally.[4]
4 	Unused/User defined 	in special purpose
5 	X11 	As runlevel 3 + display manager.

http://en.wikipedia.org/wiki/Runlevel


You may change the default run level by editing the file:
/etc/inittab

You may change the run level you are in by issuing the command:
telinit 3

telinit 5

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:
vi /etc/inittab


To change the default run level, change the line:
Text console
id:3:initdefault:

to:
GUI
id:5:initdefault:


vi is a little different to use than what most Windows users may be used to.

I recommend the application "vimtutor" to learn vi:
vimtutor


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:
<ctrl-alt-backspace>


To take you to one of the other terminal sessions, you may issue the command:
From X:
<ctrl-alt-{F1,F2,F3,F4,F5}>

From the terminal CLI:
<alt-{F1,F2,F3,F4,F5}>

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:
<alt-F6>

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:
<ctrl-c>


###################################
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:
<shift-pageup>

and
<shift-pagegdown>


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.
vi /etc/X11/xorg.conf


If you want to view the xorg log, you would look at /var/log/Xorg.0.log:
less /var/log/Xorg.0.log


To view the overall system log, you may view the file /var/log/messages:
less /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):
yum install kernel kernel-devel


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:
glxgears

and
glxinfo | grep direct


Now lets say you issue those commands, and you end up with the error of:
[user@box ~]$ glxgears
Error: couldn't open display (null)
[user@box ~]$


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:
[user@box ~]$ cd /
[user@box /]$ ls
bin  boot  dev  etc  home  lib  lost+found  man  media  misc  mnt  net  opt  proc  root  sbin  selinux  srv  sys  tmp  usr  var
[user@box /]$ cd /home
[user@box home]$ ls -la
total 48
drwxr-xr-x  6 root     root      4096 Jan 21 00:25 .
drwxr-xr-x 24 root     root      4096 Jan  8 16:14 ..
drwx------ 42 user user  4096 Jan 24 19:00 user
drwx------  2 root     root     16384 Jun 29  2008 lost+found
drwxr-xr-x 10 security security  4096 Jan 20 16:46 security
drwx------ 30 user user  4096 Aug 20 04:50 skimpydog
[user@box home]$ cd user
[user@box ~]$ ls
BackUp  clipdat2.rdf  Desktop  lg3d-demo-apps  lg3d-incubator  lg3d-x11  minicom.log  projects
[user@box ~]$


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:
[user@box ~]$ ls {/,/home/,/var/log}
/:
bin  boot  dev  etc  home  lib  lost+found  man  media  misc  mnt  net  opt  proc  root  sbin  selinux  srv  sys  tmp  usr  var

/home/:
user  lost+found  security  skimpydog

/var/log:
acpid            btmp         cron.3     lastlog    messages.1    nagios                rkhunter.log      secure.1        spooler.3         Xorg.0.log
anaconda.log     catchall     cron.4     libvirt    messages.2    network.log           rpmpkgs           secure.2        spooler.4         Xorg.0.log.old
anaconda.syslog  clamav       cups       mail       messages.3    news                  rpmpkgs.1         secure.3        squid             yum.log
audit            clumond.log  dmesg      maillog    messages.4    piranha               rpmpkgs.2         secure.4        tacacs-webui.log  yum.log.1
boot.log         conman       faillog    maillog.1  mysqld.log    pixlog.log            rpmpkgs.3         setroubleshoot  tallylog
boot.log.1       conman.old   firewalls  maillog.2  mysqld.log.1  pla_unknown_msgs.log  rpmpkgs.4         snmptrapd.log   vbox
boot.log.2       cron         gdm        maillog.3  mysqld.log.2  pm                    samba             spooler         wtmp
boot.log.3       cron.1       httpd      maillog.4  mysqld.log.3  ppp                   scrollkeeper.log  spooler.1       wtmp.1
boot.log.4       cron.2       jffnms     messages   mysqld.log.4  prelink               secure            spooler.2       xen
[user@box ~]$
Posted on: 2009/1/24 16:52
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.
Links