Linux Document
Linux Document
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support Linuxhelp Wiki
New To Linux?
New to Linux? Feeling a little intimidated? Starting to miss that cute little start button in the bottom left hand
corner of your screen? Well..... don't be intimidated and definetly don't miss that button! Below you'll find
answers to the most basic questions/commands that you might be asking yourself right about now.
If you still have unanswered questions after reading this page feel free to post your questions in our Help
Forums and someone will be glad to assist you. If you have a questions/answers that you would like to see
added to this page, by all means contact us
FYI: Text that is in RED are commands you can execute on your system in a terminal.
General
1. What is Linux?
2. What is the linux kernel?
3. Which distribution of Linux should I install?
4. Who is the root user?
5. How do I reboot my machine?
6. How do I shutdown my machine?
7. How do I remove/uninstall Lilo/Grub?
User Accounts
8. How do I add a user?
9. How do I delete a user?
10. How do I change my login password?
Filesystem Navigation
11. How do I change directories?
12. How do I copy files?
13. How do I rename files?
14. How do I move files?
15. How do I edit files?
16. How do I list directory contents?
17. How do I delete files?
18. How do I delete directories?
19. How do I access my cdrom drive?
20. How do I access my floppy drive?
21. How do I view/change ownership on files/directories?
22. How do I view/change permissions on files/directories?
23. How do I find files on my system?
24. How do I unzip a .tar.gz/.tgz file?
25. How do I unzip a .bz2 file?
26. How do I install a program?
27. How do I run a program?
1. What is Linux?
Linux is an Open Source, free Operating System created by Linus Torvalds. For more information, please see
our General Information page.
The Linux kernel is the core of the Linux operating system. To find out which version of the Linux kernel you are
running, simply type uname -r in a terminal. For more information on the Linux kernel, please visit
http://www.kernel.org. For information on how to install or compile the Linux Kernel, please see our Kernel
Compile/Upgrade Guide.
One of the pleasures of running linux is choice. The choice of which Linux Distribution you wish to run is 100%
up to you. You can browse our Distributions Page for comparisons of the various distributions out there. If you
are totally new to linux we suggest you start off with either Red Hat Linux or Mandrake Linux as they are easier
to install, configure and maintain.
The root user is the master user or systems adminstrator of the machine. The root user has full access to all
files and directories, which is why you will only want to use the root account to perform system maintainance or
to install applications.
In order to reboot your machine, you must instruct the Linux kernel to stop all the processes (programs) it's
currently running. Do not simply press the reboot button on the front of your computer case, as Linux must be
properly shut down/restarted. To restart your machine, as root, run either of the following commands in a
terminal:
reboot
shutdown -r now
On most systems you can also press (all at once) the control, alt and delete keys.
In order to shut down your machine, you must instruct the Linux kernel to stop all the processes (programs) it's
currently running. Do not simply press the power off button on the front of your computer case, as Linux must
be properly shut down/restarted. To shut down your machine, as root, run either of the following commands in a
terminal:
halt
shutdown -h now
If you want to remove the Lilo or Grub boot loader from your system (if you are uninstalling linux etc) follow the
procedures below:
While logged in as root, type adduser username at the shell prompt, replacing username with the name you
want to use to log in. You can create as many users as you wish, one for each member of your family, for
example.
While logged in as root, type userdel username at the shell prompt, replacing username with the user name
you wish to delete.
To set the password for a specific user, type (while logged in as root) passwd username at the shell prompt,
replacing username with the name of the person who's password you wish to change. By typing just passwd
you'll be able to change the password of the user under who's name you're currently logged in as. Do not use
passwords which are easy to guess, like your middle name or your pets name.
The default editor that ships with almost every distribution of Linux is Vi. This editor is slightly advanced and
confuses most newbies. We suggest starting off with Pico, a more simple editor. Pico is part of the Pine
software package which can be downloaded at http://www.washington.edu/pine (It might already be installed on
your system). To edit a file with pico, simply run:
pico filename
This will open up the file and allow to you edit it. At the bottom of the screen you will notice the various
commands that you have access to with Pico. If you wish to save the file and exit, simply hold down the control
key and hit the x key on your keyboard.
To delete a file you must first have write permission to it. For information about permissions, click here. Once
you have write permission, in a terminal run:
rm filename
There is no "Recycle Bin" in Linux so once you delete a file, it's gone for good.
When removing files, you may use an astrix (*) as a wildcard flag to remove certain files, for example if I wanted
to remove all files that began with the letter j, I would run rm j*
If anyone tells you to run rm -rf / as root, DO NOT LISTEN TO THEM. Running this command will delete all
the files/directories on your Linux system.
If you have ownership to the directory and the directory is empty, you can simply type rmdir directoryname
to remove the directory. If the directory is not empty and you wish to simply delete it and all its contents, run rm
-rf directoryname
Please be careful with the -rf flag, as it will remove everything in the specified directory including sub
directories. With root access and the rm -rf command you can wipe out your entire system if you make an error.
Linux requires you to mount your cdrom/floppy drives when you wish to use them. On most Linux distributions,
the mount command will require root access. Depending on which Linux distribution you run, one of the
following commands should mount your cdrom drive. As root, run:
mount /dev/cdrom /mnt/cdrom
mount /dev/cdrom /cdrom
Linux requires you to mount your cdrom/floppy drives when you wish to use them. On most Linux distributions,
the mount command will require root access. Depending on which Linux distribution you run, one of the
following commands should mount your floppy drive. As root, run:
mount /dev/fd0 /mnt/floppy
mount /dev/fd0 /floppy
One of the great features of Linux is that it is a multi-user system. With multi-users, it allows certain users to
own files and directories so nobody else can access/modify them, for example your /home directory. To change
the ownership of a file/directory, as root execute the following command in a terminal:
chown username. filename/directory
This will change the ownership and group ownership of the specified file or directory to the specified user. For
more information, in a terminal, type man chown
There are 3 different attributes a file can have that make up the permissions for the file.
There is read access that allows users to read the file.
There is write access that allows users to modify the file.
There is executable access that allows users to execute the file.
From these three attributes, you now have three different levels of permissions, the first being for the
owner of the file, the second being for the group the file belongs to and the third being all other users on
the system.
To view the current permissions on files and directories run the following command:
ls -l and you should see something that looks like:
The above shows you that images is a directory (d) and that the owner and group (joey html) have read
(r), write (w) and execute (x) permissions while other users on the system only have read (r) and execute
(x) permissions.
For the index.shtml file, it shows joey and html as the owner and group and they both have read and
write access to the file. It also shows that other users on the system only have read access. Note there is
no executable permission since the file is not an executable.
To modify the permissions on a file, you either have to own it or be logged in as root. To modify the
permissions, in a terminal type:
chmod xxx filename/directory
You will have to replace the xxx flags with the permissions you wish to change. You can either go by the
numerical value or by the actuals.
So if you wanted to make a file an executable for your user and other users on the system, you would run
the following:
There are two methods to search for files on your Linux machine, one method being the locate command and
the other being the find command. If you wish to use the locate command, you must first update the locate
database by running the following command in a terminal as root:
/usr/bin/updatedb
This will create an index of all the files and their locations on your hard drive. Once updatedb has completed
running, you may now search your drive for a specific file by running the following command in a terminal:
/usr/bin/locate filename
Another way to search your linux system is with the find command. To find a file on your sytem with the
find command, in a terminal run the follwoing:
/usr/bin/find / -name filename Be sure to replace "filename" with the actual name of the file.
There are many ways to install applications in Linux. If the file you wish to install is in .rpm format and you are
running an RPM based distribution such as Red Hat, Mandrake or SuSE, run the following command as root in
a shell prompt/terminal:
rpm -Uvh filename.rpm
If you are running Debian GNU/Linux and you wish to install a .deb file, you can do so by running the
following command in a terminal as root:
dpkg -i filename.deb or apt-get install package (if you have APT already
installed/configured).
If the file you with to install is in a .tar.gz, .tgz or .bz2 format, you will first have to decompress (unzip) the
file. Once the file has been unziped, it should create a directory based on the filename. Simply change
into that directory and open up the README or INSTALL file in a text editor and follow the installation
instructions.
To run a program, you must first make sure it has executable permissions set. For more information on
permissions, see How do I view/change permissions on files/directories? above. Once the file has executable
permissions, simply run the filename from a terminal. I will use the filename "irc" as an example
Example: /usr/bin/irc (from anywhere on the system)
Example: ./irc (from the /usr/bin directory)
Copyright © 1997 - 2010 Private World Domination Inc. All rights reserved.
Linux is a registered trademark of Linus Torvalds. All other trademarks and copyrights are the
property of their respective owners.
| Contact Us | Link to Us | RSS Feed | Staff |