Home   |   Apt-Get Commands   |   Debian FAQ's   |   Search   |   Site Home


LocalTechNotes

 

(Anchorage) LocalTech.US first went online with a Microsoft IIS 5.0 Server, then the Debian/Linux download provided a faster Apache Web Server.

If you would like to learn more about Linux, the Linux Files System and Linux Commands or maybe even Host your own Apache Web Server, read on...

 

 


I want Debian: What are my options?

1. Burn a CD: Download Debian iso images, write to CD, install from CD-ROM.

2. Visit one of the Debian CD distributors and buy the CD: Vendors.

 

Please note: Since my installation of Woody, there have been other Debian releases: Sarge, Etch, and more! As a result, many of the commands and links here are no longer good.

 

LocalTech.US Forum Index

              Links                                Apt-get Commands

Downloads

 apt-get update

apt-get install synaptic

http://www.aboutdebian.com

 apt-get -h <help>apt-get install ee (Text Editor)
..more than 8700 packages. apt-get upgrade -u <verbose>apt-get install kdm
X11 Printscreen, Slideshow apt-get dist-upgradeapt-get install wu-ftpd
Install php, mysql apt-get dselect-upgradeapt-get install apache
Debian Weekly News-Index apt-get install <pkg name>apt-get --purge remove <pkg>
Vendors of Debian CDs info apt-getapt-get install pysol
Debian Basic Commands apt-get checkapt-get autoclean
Commands Tutorial apt-get install xserver-xfree86apt-get install unzip
Debian Installation Manual
 apt-get install rdate apt-get --reinstall install <pkg>
Installation Methods apt-get -s remove <pkg> apt-get remove <pkg name>
 apt-get install makepasswdapt-get <shows common options>
   
 Debian Documentation,FAQ's  apt-get install doc-debian
 Debian Developers Manuals  apt-get install debian-policy
 HOWTOs and Mini HOWTOs  apt-get install doc-linux

Find Apt-get info for Red Hat here: http://www.wise-old-blogger.com/apt-get/#RedHat

Note: apt-get -s remove <package name>  uses the -s option to perform a simulation of events that would occur... Simulate prints (displays) a series of lines representing the remove action, but does not actually change the system.


  • KDM: When installation is complete and after a restart, the default login
    screen does not have options for Restart or Shutdown which is fine for always-on web servers, file servers, etc. But, I found that while learning some basic commands and installing new programs, a window with the option to Restart and Shutdown was easier to work with. Try KDM:


    username # su
    password # type your password
    username/home # apt-get install kdm
    (Installation takes only a few minutes)
    username/home # shutdown -h now or shutdown -r now
    (Restart after the shutdown command completes,
    ctl + alt + delete, if necessary)

       "Using apt-get, you do not have to unzip, extract or take any further steps to install over 8700 available packages from the Debian/GNU support site. Apt-get will find and install the supporting files required to complete the installation of programs like KDM, Apache, Typespeed, etc."

    Upon restart, the new KDM log-in screen with options appears... Log-in as either root or <username> with the passwords you specified earlier. 

    If Debian displays an error message that KDM is already installed, try using this command: apt-get remove kdm and reinstall, apt-get install kdm or
    apt-get --reinstall install kdm
    and during the reinstall when prompted, select kdm as default. When complete, shutdown -r now or ctl + alt + del. Restart and after the lilo boot menu choice for either Windows or Debian, you should see the kdm screen with options to log-on as either User or Root.
     

    Recommended shutdown procedures from Debian and Linux.org.


Three common causes of problems from experienced Windows users that are new to Debian/Linux:

1. Most Debian/Linux and UNIX commands and all file names are case sensitive and must be typed exactly as they were saved.  

2. Some UNIX and other versions of Linux commands will not work with Debian/Linux. See basic Debian commands. Example: The Linux command "useradd" is "adduser" in Debian syntax.

3. You may have to change to su and type your password for command completion. Or, log-in as Root, then try the command again. Example: pysol will not run unless you are logged-in as Root.

Back-up your hard-drive, download the Partition Magic Free Trial, create a Linux ext2 Partition at least 3GB in size, a 125MB Linux Swap File and give Linux a try.

^ top


How-To find usage and options of commands: Type info <command> for an up-to-date description and options for the command. Also try, man <command>.

Example: man who provides options for the who command from the who manual page; who -a is the "who all" command which prints (displays) the time of the last system boot, prints dead processes, prints a line of column headings, adds idle time, prints system login processes, prints active processes spawned by init, and more.

The help command: Type almost any command, then type a space followed by --help Example: ls --help will display a long list of options. Try this command: ls -al to show a list of all files and permissions in the present working directory, including hidden files.

Basic Commands and Tools from Debian, and more Basic Commands.

How-To find and use the Debian man (manual) files: http://www.debian.org/doc/packaging-manuals/fhs/fhs-4.7.2.html

How-To read Debian .gz Manual and Doc files which are located at: /usr/share/man or /usr/doc and /usr/share/doc: Type ls for a Directory list, then zcat <filename.gz> will allow you to view the file without any further commands.

gunzip -c <filename.gz> will also display the file and there are other commands used to read larger Manual files with the .gz file extension. Example: gzip -d <filename.gz>, type ls to verify the file is there with .gz removed, then less or more <filename>.  Use the down arrow or space bar to scroll through the document. The q key quits less and more and returns to a command prompt. Another easy and fast way to view README type files is: cat <filename>

Find Linux FAQ's and HOWTO's at /usr/share/doc. To read the Linux-FAQ.gz located at: /usr/share/doc/FAQ, type gzip -d Linux-FAQ.gz, then less Linux-FAQ to scroll through a long list of Linux FAQ's using the spacebar, page down or down arrow keys. The q key quits less

Find an excellent list of HOWTO's at /usr/share/doc/doc-linux-text/HOWTO, type ls for a list of .gz files. (If the files are not there: apt-get install doc-linux)

The online location for the Debian GNU/Linux FAQ's: http://www.debian.org/doc/FAQ/index.en.html#contents

Debian Documentation Online

  • manuals
  • HOWTOs
  • FAQs
  • other shorter documents

How to unzip and decompress when the file ends with .tar.gz

Note: Always move to an empty directory before unpacking a tar file. When you unpack a tar file its contents are written to the current directory. Any file or directory with the same name as the contents of the tar file will be overwritten!

If you installed "desktop" with the KDE browser, locate the file, right click and "extract".   If you have only a command prompt or prefer working from a shell command prompt, read on...

From the Command Line: tar -zxvf <filename>
Files ending in .gz have been compressed using the gzip command. Zipped files can be restored to their original form using the gunzip command. Type:

gunzip filename.tar.gz This replaces filename.tar.gz with filename.tar

Extracting tar files
The tar command is used for packing several files or even a whole directory into a single tarfile. To unpack a tar file, type:

tar xvf filename.tar

tar xvf filename.tar will extract a tarball
tar cvf filename target will create a tarball

A quick method
Alternatively, you can unpack a compressed/zipped tarfile using the zcat or gzcat command. (gzcat is a local alias for the GNU zcat command). This leaves the compressed .Z or .gz tarfile intact. For example:

zcat filename.tar.Z | tar xvf -
or
gzcat filename.tar.gz | tar xvf -

The zcat command recreates the uncompressed tarfile, which is then piped into the tar command to extract the files.

How do I unpack .bz2 files?
Most distributions come with a program bzip2 (and associated bunzip2 - but technically its the same program). Just run:

bunzip2 file
or
bzip2 -d file

And some distributions come with a tar which is patched to handle
bzip2ed tar files:

tar xIvvfp fred.tar.bz2

The 'I' option does what 'z' does for gzipped tar files.


June 22, 2003 Linux can do a lot without a lot of processing power.

Debian/Linux is running an Apache Server on my 1996 Gateway with a P166 chip and 128MB of RAM and is working well for learning Linux/UNIX.

apt-get install apache

If you would like to make your Apache Server web pages available outside your Intranet and publicly accessible, contact your ISP for a static IP or get a Free Domain Name at DynDns.org http://dyndns.org; find these links or click here:
Dynamic DNS
SM
and Static DNSCaution: Most ISP's prohibit commercial home servers and experimental home servers are not recommended for use as business web sites.

Remote access to your home computer's Debian directory is easy with PuTTy and ssh2 using either a static IP or Domain Name and a username/password is required.


August 15, 2003

Debian/Linux: Basic Commands and Tools

If you know the size of your hard drive and have installed both Windows and Debian/Linux: How can I determine the amount of hard drive used by Debian/Linux and how much free space is available?

Checking for available space on your server

df -h will show size, usage, and available space for each disk partition

Windows partition size and free space can be determined by double-clicking My Computer on your Windows desktop, then click the hard drive for info on the type of file system, usage and free space.

Try these Linux commands:

ps aux Learn more about this command: http://techrepublic.com.com/5100-6261-5025322.html This excerpt is from their web page: "Ps is one of the standard tools for monitoring Linux processes, and short for process status. This command returns information on running programs. The information can include the username a program is running under, the amount of CPU it is using, and the length of time it has been running. This data can be valuable when you need to manually stop a program or if you just need to determine what program is slowing down the system."

top This program is similar to ps but is usually started full-screen and updates continuously with process information. Learn more: http://techrepublic.com.com/5100-6261-5025322-2.html page 2 of article.

pstree Current processes and their tree structure. Find "child" duplicate programs running, then use ps aux to find and kill the pid number of the duplicate program.  To stop a running process: Type su, then your password. Type kill <pid number> Example: The Print Spooler process is running and you do not have a printer. Use ps aux to find the lpd process number, then type the command: kill <process number>, the print spooler will be stopped for this session only. To stop the print spooler until you have installed a printer, remove and later replace "lpr" using apt-get, first change to su, then:
apt-get remove lpr
Make a quick note of changes for future reference.

who Who is using the Linux server at this time. (try ls -last for recent login info on your server)

who am i Resolves student identity crisis... For your current location within the file hierarchy, type:

pwd Print (display) working directory, or present working directory.

w Uptime, number of current users, and load average.

netstat Displays generic net statistics of the host you are currently connected to.

Here are some related commands. Change to su, then type:
ifconfig Ping 127.0.0.1 to see Ethernet card loopback, then ctl + c to stop the ping.
rpcinfo Usage options will be displayed. Try
rpcinfo -p

rm -r <directory name> If you download and install a Debian compatible program without using apt-get or synaptic (apt-get install synaptic) and later decide to uninstall, the manual removal of directories that contain files cannot be done without this command. It is a time-saver to remember if you like to download and try new programs.  Caution: Directories and files that are removed (deleted) cannot be recovered and this command removes directories that contain files.


Typespeed

Practice typing UNIX commands, Programming functions, DOS commands, etc. with Typespeed. Download and Install from a shell command prompt...

username/home # apt-get install typespeed
(Installation takes only a few moments)
username/home #
cd /usr/games
username/home # ./typespeed
(follow on-screen prompts)
 
Try the X11 Printscreen commands below to save Typespeed scores, or anything else on your desktop.

August 18, 2003 Debian/Linux Floppy:

With a floppy in place, type:

mount -t ext2 /dev/fd0 /floppy for Linux or

mount -t  vfat  /dev/fd0 /floppy for Windows. More Floppy info from Linux.org.


September 4, 2003 Apache Server Password Protect and Authentication questions:

Set-up Apache to allow access to certain documents with a username and password (Edit httpd.conf instead of .htaccess files)

When not to use .htaccess files: http://httpd.apache.org/docs/howto/htaccess.html#when

Editing User Authentication: http://www.apacheweek.com/features/userauth

Search with Google for Tutorials and How-To documentation for your version of Linux here


September 22, 2003 Adjusting the clock

The clock in the lower right corner of my KDE browser is not set to local time: How can I set it to local time? Try this:

apt-get install rdate

then from the shell command prompt:

rdate time.nist.gov to set the clock against a time server at NIST Laboratories, Boulder, CO., USA.

or

rdate time.nrc.ca to set the clock against a time server at National Research Council, Ottawa, Canada.
 

Have Fun!


September 26, 2003 What is PySol? Python Solitaire

First verify Python is working from a shell command prompt, type: python then, Ctl + d to exit.

"PySol is an exciting collection of more than 200 solitaire card games. Its features include a very nice look and feel, multiple cardsets and table backgrounds, unlimited undo/redo, loading/saving games, player statistics and log files, a hint system..."  Easily installed with Debian/Linux, with su permission and password, type:
apt-get install pysol

To start PySol from the /usr/games Directory (you must be logged in as Root), type: ./pysol

The PySol creators web site: http://www.oberhumer.com/opensource/pysol/

Learn more about Python: Beginner's Guide to Python


November 12, 2003 Makepasswd

Try the makepasswd utility for randomly generated and/or encrypted passwords. Example:

makepasswd --count=10 Generates 10 passwords of various length

Also, see Adduser info and /usr/share/doc/passwd/README.Debian

To see Password options for user and group accounts, use passwd --help or
man passwd
for the Password command manual.

passwd also changes account information, such as the full name of the user, their login shell, or password expiration dates and intervals.


December 19, 2003 Getting Started: What is UNIX?

Check-out this page for a brief explanation of UNIX with links to resources for both new and experienced UNIX/Linux users. Also, find links to an interesting, but old UNIX article written by Dennis Ritchie (UNIX), and Ian Murdock's Weblog (Deb-Ian/Linux). http://localtech.us/unix.htm

Your new Linux OS should include some effort toward Hardening, i.e., computer and network Security.

http://localtech.us/security_basics_linux.htm


January 8, 2004 See Debian start-up information

During start-up, the kernel quickly prints information that can be viewed in detail with this command:

First navigate to: /var/log  Then, to view the file: cat dmesg


February 26, 2004  (Changed 8/11/04)

How-to change the Screen Resolution and correct Display errors

Edit this file /etc/kde2/kdm/Xservers and remove dpi -100 no listen TCP

or change the entry to -75: dpi -75 no listen TCP

Also, try editing this file to show the correct Screen Resolution: /etc/X11/XF86Config-4, add the correct screen resolution(s) under 'modes'. Example:

Modes "1024x768" "800x600" 

The default setting using this example will be 1024x768; to change the default to 800x600, reverse the order of the entries:

Modes "800x600" "1024x768"

Adding additional screen resolutions will allow ctl + alt and the plus sign (+) or minus sign (-) on the number keypad to change between resolutions. After editing,
Ctl + alt + Backspace to stop xserver, then log-on again to try new the settings.

If screen resolution problems continue, try changing the Video Card driver. Open a shell command prompt and type: dpkg-reconfigure xserver-xfree86

Problems with editing? Check-out Easy Editor: apt-get install ee

To change the screen resolution in the /etc/X11/ Directory, first navigate to /etc/X11, then type: ee XF86Config-4
 

Use the down arrow or page down to find and edit the modes settings per the example above or choose your own settings. When finished editing, ctl + c then type exit to save the changes.

Restart computer: shutdown -r now or ctl + alt + del 

If you have installed KDM, another option would be to log-off to close the KDE browser which stops xserver, then log-on again to restart xserver and the KDE browser.


August 23, 2004

How-To find a file

This command works for me: "find / -name filename" or "find . -name filename", without the quotes.

Debian/Linux also includes the "Grep" command.  The manuals for both of these commands are stored on your computer and are found using the man command:

man find

Find will locate files from a shell command prompt, e.g., find / -name 'FAQ' for a list of FAQ file locations. Enclosing the filename in single quotes is usually not necessary with Debian.

man grep

Grep searches the named input FILEs (or standard input if no files are named, or the file name - is given) for lines containing a match to the given PATTERN.  By default, grep prints (displays)the matching lines.


October 2004

User Friendly Lilo Boot Menu: To change the OS names appearing in the Lilo (Linux Loader) boot menu with a dual-boot configuration, edit the /etc/lilo.conf file.  After editing this file, always run lilo from a shell command prompt to verify that the new configuration is correct, then restart.


December 29, 2004

How do I restart Apache? Source: http://help.hardhathosting.com/question.php/2

You can either run the command:
/etc/rc.d/init.d/apachectl restart
or
/etc/rc.d/init.d/apachectl stop
/etc/rc.d/init.d/apachectl start
or
/www/bin/apachectl stop
/www/bin/apachectl start
On my Debian/Linux computer, the apache control command
will work from any directory location. Ed

January 23, 2005

I heard that running my Apache server as "root" is a bad idea: Is this true? For an excellent answer to this common question; check-out this article by the World Wide Web Consortium (W3C): http://www.w3.org/Security/Faq/wwwsf3.html#SVR-Q3

 


May 25, 2005

The Alias command

alias Commonly used for long strings that are frequently used. Alias allows you to have a small, more familiar command or name to execute a long string. Source: http://www.computerhope.com

Example: alias clr 'clear' or alias clr clear or alias clr=clear

After the added alias, the clr command should work to clear the screen.


Looks like Ubunto is next.  How to pronounce Ubuntu  :  ) from Google:

buranen.info » Blog Archive » How to pronounce Ubuntu (oo-BOON-too)

4 Responses to “How to pronounce Ubuntu (oo-BOON-too)”. Chris says: June 24th, 2007 at 11:55 am. I appreciate your intent but I will offer a counter point. ...
buranen.info/?p=144 - 12k - Cached - Similar pages

From YouTube

What is Ubuntu? from Ubuntu's home page: "Ubuntu is a community developed, linux-based operating system that is perfect for laptops, desktops and servers. It contains all the applications you need - a web browser, presentation, document and spreadsheet software, instant messaging and much more."

And from Wikipedia: "...based on Debian GNU/Linux but with a stronger focus on usability, regular releases, and ease of installation."

The .iso is free to download here: http://www.ubuntu.com/


Tutorial from Debian on Debian only: Getting Started

 

Enjoy!

 

* Check-out the long list of ReadyToRun Applications available from our Web Host http://www.Alentus.com. Tell them The Wise Old Blogger at LocalTech.US sent you!

 


Have Fun with your Computer! The Wise Old Blogger

Copyright © LocalTech.US® Tech Tips All rights reserved

Linux is a registered trademark of Linus Torvalds. 
All other trademarks are the property of their respective owners.