Linux in Action


LINUX in ACTION

  1. Virtual User / Virtual Desktops

  2. Memory Freedom

  3. Do I have your permission

  4. Private Public and accessibility

  5. Linux resources

Virtual Users & Virtual Desktops  

       This is new concept those joining us from Microsoft windows. As MS-Windows users you are probably aware that you can open more than one application and as such may have one or more window boxes displayed on your screen at the same time. Minimizing various window boxes is about your only way of un-cluttering the screen. Under Linux, you still have this option but you also have what is known as virtual desktops. With virtual desktops you can open multiple applications but have them display in multiple desktops so that you can manage your workspace easier. You have 6 or 8 desktops maximum per session and can have up to 128 open window boxes in each. But the idea is to keep the process of using minimize/ maximize to a minimum. Great! I can now pop from screen to screen and have several things going at once on each screen but this still doesn't help when I start something that's going to take lots of time!!!

        So you have begun a process and it's going to take a long time to finish, so what do you do? In
MS-WINDOWS you go for coffee or supper, or mow the lawn eech! Not so in Linux. In Linux you use what is called virtual users. For each virtual user on the system there is a completely new session. When you first log-in you are virtual user #1. You can start a long running process and then re-login as virtual user #2. As VU#2 you can continue to work in session #2 while session #1 plugs away behind the scene. True, session 1 will take longer because you are dividing CPU time between that process and your new session.

Memory Freedom  

      You may ask yourself how does Linux manage to do so much compared to windows! The
answer is simply better memory and resource management. With windows, the directory table for all local drives, the Start menu structure, all the device drivers, and all programs on the taskbar are all loaded into memory at start-up along with an ever growing registry. Remaining memory is allocated to programs as you open them. As you close programs memory is freed. Applications which are memory greedy, force idle applications to page out to the swap space. Not only is this inefficient, but it is also expensive. A lot of swapping wastes precious computer time which slows down your work.
      To regain more speed, you need to upgrade memory and sometimes processing speed of the CPU. It makes no sense to waste memory with tables, unused drivers and idle applications. Unicees offer a much superior approach.

      Hence unicees like Linux, Minix, Unix, Zenix use on-demand management. For example, my
system running Windows Vista with 2GB ram and 1GB swap uses 380MB with nothing running. The same system configured for Linux as 2GB ram and 1GB swap uses 60MB doing nothing.

      Doing a huge transform of an image file on both systems resulted in windows complaining it had
less than 5% memory left including the swap space. Under Linux, the same transform used 60%
of main memory and 0% of swap. Thusly, where windows had 5% free virtual memory, Linux could boast 1.8GB free!!! The major part of this was just better function of the program but also memory was kept clear of all unnecessary space wasters.

Do I Have your Permission?

 

    In the Classic Windows system, all files of all directories and drives are yours. You have the right
to read write and execute all files. Of course what you do on a file or with a file is directly tied to it's type as defined by it's extension. Linux files are somewhat different. Firstly, file extensions do not define the file purpose. Extensions are more readily used to describe things like file versioning. Files in a Linux system have a permissions table which besides stating the file type, it also sets the rights of the owner, owners group, and general public to the file. Everything in a Linux system is a file. This includes the drives, directories, and the files. If we look at a file permission string we would see something like -rwxrw-r-- where the first (-) is one of [- d l ] meaning reg file, directory or link. The rwx says owner can read write or execute this file. the rw- says member of the owners group can read and write but not execute and everyone else can only read the file.
  Using chmod you can permit or restrict users. A 3 digit code is used to change the files state like this:

chmod 760 myfile.now.changed would set the permission to -rwxrw---- for file myfile.now.changed
You can determine the correct setting from this table:

0 = ---
1 = --x
2 = -w-
3 = -wx
4 = r--
5 = r-x
6 = rw-
7 = rwx

All files begin life as regular files with no execution rights. Therefore even if you create a fancy
script to do your work, it will never run unless you set it as executable. In an Intranet (local) or
Internet ( web / remote) situation these permission structures are key to system security.
As such only the root user can modify files to make them executable and move them where they can be executed from. This prevents viruses and hackers from accessing the system.

Private Public and accessibility  

In Windows (Microsoft) the standard cookie cutter approach is used. You have Drive C: and all folders
and associated files are rooted from drive C:. Additionally, drive C: will always have a Windows folder named Windows (for windows 95 98 ME) or WinNT (windows NT 2000 XP).  Although you can override this Microsoft insists that you shouldn't because certain recover tools may fail. It's kind of like parking all your valuables in plain site. Everyone who has access to your machine whether from your keyboard or via networked based software (internet / intranet) can see your valuables. So Microsoft has an answer to this, firstly they allow you to hide folders and files (turn the light off so people can't see) but this doesn't prevent anyone who knows the files exist or guesses they exist from using them. Ok, so Microsoft came along and added file sharing such that anyone coming into the machine from outside through normal channels can only access shared files. (If you come in through my door you will only see files in lit rooms but if you break in through a window you can turn on the light without my knowledge and see what you want).
 Everything in a Microsoft system is always Public and accessible.

Linux still has a standard approach but with important differences. While there are very specific mount names
( / bin sbin dev mnt usr var home) they are only fully viewable by the root user. Exactly which harddrive and
partition a folder or file exists on can not be determined by general users at the keyboard or via the internet.
You are encouraged to split things up over multiple partitions to keep intruders guessing. The root user can see everything so care must be taken to keep commands having root capabilities restricted. Each regular user has their own home folder which can only be seen by them (and root) but they also have a shared folder available for inter user sharing. As for programs and applications, only ones found in /usr/bin  /usr/sbin and usr/shared can be seen and used by regular users as long as the file permissions say it's ok. All main system files generally are not accessible because they reside in /bin and /sbin and this includes the chmod command used to make files runable. So if we look at the directory tree's in Windows and linux where blue can be seen, green can be seen and used and red is not seen not used we get:
Green = Visible to all
 in Windows
 only you in Linux
Blue = may be Visible to other qualified users Red = Visible to root user only
C:
  ├Windows

  ├Program Files
  └(any user folders)

D:
   └(any user folders)

   ...

any other drives + folders 

 

Linux partitions

/
  ├boot
  ├bin
  ├dev

  ├mnt
  │  ├
(cdrom, windows drives [permission req])
  ├root
  ├sbin
  ├var
  ├home
  │   ├(others files)
  │   └
(your files)
  └usr
     ├bin
     │ ├(other programs)
     │ └(programs u have permission for)
     ├sbin
     │ ├(other programs)
     │ └(programs u have permission for)
     └shared
         └(programs u have permission for)
 

Linux List

Below are some places to go for Linux related stuff. I hope it proves useful.

www.linux.org

www.linuxnow.com

www.linuxnewbie.org

www.linux.com

www.linuxsources.com

http://wwits.net/linuxapps