Home and Index

Self-Help Links

Linux Links

Outside Computer Links

 

  Linux Learnings, Concepts and Commands

 

 Root or Superuser and Ordinary User

  To take the first steps to linux, you need to understand some of the basic concepts of linux-the ways in which linux is very different from user.
  The most important concept is the root user. If someone “has root” or is root on a linux system, they are the all-powerful super-user who can do anything  and go anywhere on a linux system. This is the user who has all rights and permissions so to be root, is inherently dangerous since an outsider who acquires root can literally take over your machine. The root user would be similar to the Administrator on a Windows machine. A root user with one wrong stroke of the keyboard, could bring down the whole system and there’s no easy out of a mistake-no, are you sure? as in Windows machines.
  Sometimes, with your personal machine, you need to become root for a short time to make repairs, create users, change hardware, etc-but you should logout of root to an ordinary user quickly.
   So your first step on a linux system probably will be to create yourself as a user. On the command line, you would type adduser and the name-then give a password:
  If you want to add user nick, here's what you do:
     adduser nick   (must be root to add user)
     
passwd nick   (to give password to nick)

The Terminal and the Shell

With most versions of Windows, you seldom deal with anything but the GUI or the Graphical User Interface. This simplifies computing quite a bit but is also limiting. With Windows, it is possible to go to a command prompt and type in DOS commands. There are functions that can only be done in the command prompt evenwith Windows. With early Windows and even Windows 98, you could boot to a text-only environment. With Windows XP, you can boot to command prompt only-but why? There’s little reason for this alternative.
  With linux, this situation changes radically. Many linux users prefer to boot initially to a text mode to type commands. Then, they can type startx to go to a graphical or X-Windows mode.  
   Most users are content with clicking only at this point, but then they lose both complexity and flexibility which you have in text mode once you have made progress in understanding the basic commands. For the average linux home user, the best of both worlds is to boot to the GUI but have a terminal window open where he or she will have access at the text level-the Shell.

  During the “Dinosaur Days” of computing, I telneted to a shell account to use the Internet. At that time, all one could do was type in commands and type in anything else. There were no pictures except for ascii text art which would be creating pictures from characters.
  White text against a black background was all I had. You first see the prompt or command prompt which meant the command line interpreter was ready to execute what commands you typed in.  The possible commands you could use, were pre-set
 by the type of shell, usually. 

Bourne or Bash shell.  

  Of course, you had to learn some commands or you got nowhere. Also, to run a program, you had to know the name to type-then to hit the enter key.  If you typed lynx and hit enter, you saw the first text version of the World Wide Web and it seemed thrilling then. For email, there was Pine which was actually not too difficult since the commands to use were at the bottom of the page. For simple editing, there was pico.

 Linux is Different

Long-time Windows users take so many aspects of the operating system as givens, but if one switches to linux, then you have to un-learn a lot of givens.
   All operating systems have files and directories (called folders in Windows) -but files in linux are named very differently then files in Windows. Every Windows file has an extension (the 3 letters or more after the period) that can reveal what type of file it is; for example, programs will end in .exe extension, a text file would be a .txt extension, a picture file might be a .jpg extension. A linux file has no extension so you often can’t just look at a file name and determine what kind of file it is. You cannot have a space in a linux file name but you can use underscore for this same purpose. If you see a linux file name, type file <filename> to determine what kind of file it is.  Of course, in the graphical environment, you can tell by icon or if listed, by description, just what kind of file you are dealing with-just like Windows.
  Now, most versions of linux or so called, distros of linux will boot to a graphical interface or GUI just like a Windows machine would. You would then get to the commands through a terminal. You should not be that intimidated to try a linux machine or install linux because most distros, especially Ubuntu, are very very "window-ish."
  Still, one should learn the basic commands of linux and keep the differences in mind. Another difference to keep in mind, is that with linux, capitals do matter so you need to keep this in mind. Files named Geek and geek would be two different files.
  The directory system in linux is different from Windows. There is a root directory which is shown by forward slash rather then backward slash. The basic directories are very different also.

 

Main Directories of linux machine

  /  (root of drive)
  /bin
(all executable applications)
  /boot 
(kernal, boot)
  /dev
(possible  and actual devices)
  /etc
  /root 
(root The Unix superuser account (with user name "root" and user ID 0) that overrides file permissions)
  /sbin 
(system commands secondary applications and system binaries -not used by user)
  /home 
(home directories)
  /lib  
(library files. Compiler (which translates computer language to a code that can be used to create a program  >>source data >compiler> makes file executable
 compiler uses libraries [this is like a .dll file in Windows])
  /lost & found
(stores lost file handles)
  /mnt (
mount directory takes devices in /dev to mount at particular directory) 
  /proc
(running processes are stored if needed)
  /export

  
When you log onto a linux system, you go right to your home directory which might be something like /home/nick  If you are not sure where you are, type command pwd to find out.