|
| |||||
| Home | Reviews | Tools | Forums | FAQs | Find Service | ISP News | Maps | About |
how-to block ads |
What is Linux?Understanding files and foldersUnderstanding users and permissionsWho and what is rootOpening a command shell / terminalYour first Linux commands6.1 ls - short for list6.2 pwd - print name of current/working6.3 cd - Change directoryThe basic commands7.1 chmod - Make a file executable7.2 df - view filesystem disk space usag7.3 du - View the space used by files an7.4 mkdir - makes folders7.5 passwd - changes your login passwor7.6 rm - delete files and folders7.7 ln - make symbolic links7.8 tar archiving utility7.8 tar archiving utility - tar.bz2 andThanks to(back)Beginners: Learn Linux A beginners guide to Linux for those with little or no computer experience. Linux is a free Unix-type operating system for computer devices. The operating system is what makes the hardware work together with the software. The OS is the interface that allows you to do the things you want with your computer. Linux is freely available to everyone. OS X and Windows are other widely used OS. ![]()
by FastEddie A blank piece of paper is called a file in the world of computers. You can use this piece of paper to write a text or make a drawing. Your text or drawing is called information. A computer file is another way of storing your information. If you make many drawings then you will eventually want to sort them in different piles or make some other system that allows you to easily locate a given drawing. Computers use folders to sort your files in a hieratic system. A file is an element of data storage in a file system(file systems manual page). Files are usually stored on harddrives, cdroms and other media, but may also be information stored in RAM or links to devices. To organize our files into a system we use folders. The lowest possible folder is root / where you will find the user homes called /home/. / Behind every configurable option there is a simple human-readable text file you can hand-edit to suit your needs. These days most programs come with nice GUI (graphical user interface) like Mandrakes Control Center and Suses YAST that can smoothly guide you through most configuration. Those who choose can gain full control of their system by manually adjusting the configuration files from foo=yes to foo=no in an editor. Almost everything you do on a computer involves one or more files stored locally or on a network. Your filesystems lowest folder root / contains the following folders: Essential user command binaries (for use by all users) The only folder a normal user needs to use is /home/you/ - this is where you will be keeping all your documents. /home/elvis/Documents Files are case sensitive, "myfile" and "MyFile" are two different files.
Every file belongs to a user and a group, and has a set of given attributes (read, write and executable) for users, groups and all (everybody). A file or folder can have permissions that only allows the user it belongs to to read and write to it, allowing the group it belongs to to read it and at the same time all other users can't even read the file. You should never log on as this user unless you actually need to do something that requires it! Use sudo - to temporary become root and do the things you need, again: never log into your system as root! Root is only for system maintenance, this is not a regular user (LindowsOS don't have any user management at all and uses root for everything, this is a very bad idea!). You can execute a command as root with: sudo -c 'command done as root' Gentoo Linux: Note that on Gentoo Linux only users that are member of the wheel group are allowed to su to root.
In KDE: K -> System -> Konsoll to get a command shell) Pressing CTRL-ALT-F1 to CTRL-ALT-F6 gives you the console command shell windows, while CTRL-ALT-F7 gives you XFree86 (the graphical interface). xterm (manual page) is the standard XFree console installed on all boxes, run it with xterm (press ALT F2 in KDE and Gnome to run commands). Terminals you probably have installed: • xterm http://dickey.his.com/xterm/ • konsole (KDEs terminal) • gnome-terminal (Gnomes terminal) Non-standard terminals should install: • rxvt http://www.rxvt.org/ • aterm http://aterm.sourceforge.net
i recently installed ubuntu on my computer. When i go to the command line it asks for my name which i enter and then it asks for the password which i try to type in but it doesn't work. how do i enter my password? 2008-12-22 13:23:58 by FastEddie
Examples: ls ls -al --color=yes by FastEddie To go one folder down: cd .. Change into the folder Documents in your current working directory: cd Documents Change into a folder somewhere else: cd /pub/video The / in front of pub means that the folder pub is located in the / (lowest folder). by FastEddie Maybe the addons on my Firefox browser are blocking content on this page of your guide.
Right now the link to "The basic commands" simply loops back to this page with no commands shown. 4-25-2013 (back)To make a file executable and runnable by any user: chmod a+x myfile Refer to the chmod manual page for more information. Filesystem Size Used Avail Use% Mounted on The flags: -h, --human-readable Appends a size letter such as M for megabytes to each size. df manpage du is a part of fileutils. Example du usage: du -sh Documents/ mkdir folder To make a long path, use mkdir -p : mkdir -p /use/one/command/to/make/a/long/path/ Like most programs mkdir supports -v (verbose). Practical when used in scripts. You can make multiple folders in bash and other shells with {folder1,folder2} : mkdir /usr/local/src/bash/{old,new,dist,bugs} mkdir manual page The command rmdir removes folders.
passwd The root user can change the password of any user by running passwd with the user name as argument: passwd jonny will change jonnys password. Running passwd without arguments as root changes the root password. If you need to add several new users and give them password you can use a handy program like Another Password Generator to generate a large set of "random" passwords. KDE From KDE you can change your password by going: • K -> Settings -> Change Password • K -> Settings -> Control Center -> System Administration -> User Account
by FastEddie rm /home/you/youfile.txt To delete folders, use rm together with -f (Do not prompt for confirmation) and -r (Recursively remove directory trees): rm -rf /home/you/foo/ Like most programs rm supports -v (verbose). rm manual page To make a symbolic link : ln /original/file /new/link This makes /original/file and /new/link the same file - edit one and the other will change. The file will not be gone until both /original/file and /new/link are deleted. You can only do this with files. For folders, you must make a "soft" link. To make a soft symbolic link : ln -s /original/file /new/link Example: ln -s /usr/src/linux-2.4.20 /usr/src/linux Note that -s makes an "empty" file pointing to the original file/folder. So if you delete the folder a symlink points to, you will be stuck with a dead symlink (just rm it). ln manual page
kde You can use the program ark K -> Utilities -> Ark to handle archives in KDE. Konqueror treats file archives like normal folders, simply click on the archive to open it. The archive becomes a virtual folder that can be used to open, add or remove files just as if you were working with a normal folder. tar files (.tar.gz) To untar files: tar xvzf file.tar.gz To tar files: tar cvzf file.tar.gz filedir1 filedir2 filedir2... Note: A .tgz file is the same as a .tar.gz file. Both are also often referred to as tarballs. The flags: z is for gzip, v is for verbose, c is for create, x is for extract, f is for file (default is to use a tape device). bzip2 files (.tar.bz2) To unpack files: tar xjvf file.tar.bz2 To pack files: tar cvjf file.tar.bz2 filedir1 filedir2 filedir2... The flags: Same as above, but with j for for bzip2 You can also use bunzip2 file.tar.bz2 , will turn it into a tar. For older versions of tar, try tar -xjvf or -xYvf or -xkvf to unpack.There's a few other options it could be, they couldn't decide which switch to use for bzip2 for a while. How to untar an entire directory full or archives? .tar: for i in `ls *.tar`; do tar xvf $i; done .tar.gz: for i in `ls *.tar.gz`; do tar xvfz $i; done .tar.bz2: for i in `ls *.tar.bz2`; do tar xvfj $i; done
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". • Page source:
| |||||||||||||||||
| Saturday, 25-May 13:47:05 | Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo over 13.5 years online © 1999-2013 dslreports.com. |