Tag: terminal

Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious
default linux mint 12 Menu

default linux mint 12 Menu

So, you downloaded Linux Mint 12 and are excited to try out all the fancy stuff that people have been saying about it. You have your Live CD burned, you boot into the desktop, you click on Menu in the bottom-left corner, see the popular folders listed there, but one seems to be missing– the games folder!

In just a few simple steps, we will show you how to get the Games folder to appear, complete with a nice selection of popular games for the Gnome desktop environment.

Step 1

Click on the terminal located under the Menu:

click on the terminal

click on the terminal

 Step 2

Type sudo apt-get install gnome-games at the prompt:

terminal window

terminal window

Press Enter when it asks if you want to continue, then it will download the games, and all the dependencies, all within your Live environment!

Step 3

Finished! Enjoy your new games, as you can now see, there are quite a few games to try out, for all ages. Here is a screenshot of the final product, that just took a couple of minutes of your time:

Finally, we have games!

Finally, we have games!

Here is a list of the games we just installed:

AisleRiot Solitaire, Chess, Five or More, Four-in-a-row, FreeCell Solitaire, lagno, Klotski, Mahjongg, Mines, Nibbles, Quadrapassel, Robots, Sudoku, Tali, Tetravex

©2012 Linux.Bihlman.com

post written using Firefox on the Linux Mint 12 Live CD!

Tags: , , , , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

As the title suggests, a technically-inclined computer user probably gets more satisfaction running a PING test in Linux than Windows XP, as the screenshots below should indicate.

pinging google in linux mint 12

pinging google in linux mint 12

and now, Windows XP:

 

pinging google in windows xp

pinging google in windows xp

That’s the difference!

Tags: , , , , ,

Linux Mint 12 Live CD Review

Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

I downloaded the latest version of Linux Mint 12 (Lisa) and I decided to try it out and write about some of the basics to get you started.

(Please click on each screenshot for full size)

TEST SYSTEM:

  • Via 1.5GHz microprocessor
  • Nvidia GeForce 8400GS video card
  • 1 GB of RAM
  • 1 GB of Linux Swap space on the HD
  • onboard NIC

The first boot attempt from the Live CD failed, so I had to add acpi=off to the Live CD boot parameters to get the OS to boot successfully. Once I booted into Mint 12, I was greeted with the desktop:

Linux Mint 12 desktop

Linux Mint 12 desktop

The first thing I decided to do is change the location since it always bothers me that Ubuntu-based distros always have the time many hours off, so, I clicked on the time at the top of the screen and selected my location:

adjusting the time/location in Mint 12

adjusting the time/location in Mint 12

Next, I decided to open a terminal, in this case Xterm from Applications | System Tools and execute one of my favorite tools, top to check the amount of RAM usage and a few other fun details:

The "top" command in Xterm

The "top" command in Xterm

 I would call those steps the first ones I always take when trying out a new distro. They work with just about any Linux distribution imaginable, but Linux Mint is special, and it’s quickly taking market share away from Ubuntu. “What’s next?”, you may ask…Well, I would take a look at all the cool apps available to you just a couple of clicks away in the Software Manager, located under Applications | Other:

Linux Mint 12 Software Manager

Linux Mint 12 Software Manager

Now that you’ve had a chance to peruse all the great games, graphics, productivity software available (and even installed a few with the Live CD!) you may be ready to install it as your primary operating system, or at least in addition to an existing OS. That is easiest enough to find, it’s got a handy icon on the desktop for your convenience!

p.s. This review was written using Firefox on the Linux Live CD!

©2011 Linux.Bihlman.com

Buy Linux Mint today!

Tags: , , , , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

5 Useful Unix DD Command Examples

By Erik Schweigert

dd is a common Unix program whose primary purpose is the low-level copying and conversion of raw data. You can backup whole hard drives, create a large file filled with only zeros, create and modify image files at specific points, and even do conversions to upper case.

To display dd‘s help simply enter:dd command unix linux

$dd –help

Alright, lets get to the juicy stuff.

1. Make an ISO of a your favourite CD just for backing up purposes with dd:

dd if=/dev/cdrom of=/home/erik/myCD.iso bs=2048 conv=sync

Breaking down the commands:

  • if is “input file”, so in this case our cdrom drive at /dev/cdrom
  • of is “output file”, in this case myCD.iso
  • bs is “block size”, in this case 2048 bytes per block
  • conv is for conversion, in this case we are using “sync” which tells DD to execute synchronized input and output, this is needed for the CD-ROM as we want to read a whole block to ensure no data loss occurs.

2. Duplicate one hard disk partition to another hard disk with dd:

dd if=/dev/sda1 of=/dev/sdb1 bs=4096 conv=noerror

In this case everything is the same as example 1 but our conversion methods states that noerror should be executed, this tells DD to continue after read errors.

3. Fill a file with 1MB of random bytes with dd:

erik@debian:~$dd if=/dev/urandom bs=1024 count=1000 of=fun.bin

1000+0 records in

1000+0 records out

1024000 bytes (1.0 MB) copied, 0.198349 s, 5.2 MB/s

This time I stated that our block size is 1024 bytes, and we are going to make 1000 of them sequentially. I also used the built-in kernel device urandom which provides random bytes.

4. Skip first 128K of input file then write remaining with dd:

dd if=/home/erik/fun.bin skip=128k bs=1 of=/home/erik/fun2.bin

The skip command tells DD to move passed the (in this case) 128k of data infun.bin then write the rest to fun2.bin. This can be handy if you have a large file that needs to be written across more than one partition. For instance, if you had 3 partitions each 128k. You wouldn’t want to write the same 128k to each partition, you would want to write the first 128k to partition 1, then from 128k-256k of the file to partition 2 and so on.

5. Using dd to convert a file to uppercase:

dd if=erik.txt of=erik_up.txt conv=ucase

Finally, we use conv again to do a conversion. In this case we convert with the specifier of ucase.

What is your favourite use of dd?

Erik is an avid Linux user and has experience with a wide variety of Linux/Unix based systems. In his spare time he likes writing software (C/C++/Perl/PHP/BASH/Python) and experimenting with different Linux distributions. He is starting to build a wide variety of articles Unix driven (what a surprise) that hope to inform those just getting into Linux on his website.

http://www.lainoox.com

Tags: , , , , , , , , , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

By Clyde E. Boom

Linux Commands – The great thing about Linux commands is that they are virtually identical from one Linux distribution (version) to another. So the way the real pros do Linux administration is to work at the Linux command line and run Linux command lineLinux commands.

Learning how to run a Linux command can be very difficult for someone new to Linux, so here are some Linux tips that will help you to learn how to use Linux commands when working at the Linux command line prompt.

There are three main parts of a Linux command:

1. The Linux command name

2. Options that can be used with the Linux command

3. The “item(s)” that the Linux command is being run “on”

When you run a Linux command, spaces are used between: the Linux command name, the command options and the “item” the command is being run “on”. The “item” could be a Linux directory, file, user or some other Linux software component.

For example, you run the Linux command named ls (for list) “on” a Linux directory to see a list of files in the directory. You run the Linux command named rm (remove) “on” a Linux directory to remove the directory from the Linux file system.

To run a Linux command, you type in the name of the command, and any other parts of the command, such as options, and press the Enter key.

You can see an example of the Linux command that is used to create a new Linux user below. The useradd command is being run “on” the bthatcher user name to create this Linux user.

Linux Tips: Linux commands are run at the Linux command line prompt and this prompt is shown as ]# at the left of the command. You don’t type in the prompt, you type the Linux command at the right of the prompt.

Linux Tips: The Linux command prompt may also appear as: ]$ or as another symbol, instead of # or $.

]# useradd -c “Becky Thatcher” bthatcher

This Linux command creates a new Linux user named bthatcher with the full name of “Becky Thatcher”. The -c (for comment) option is used with this command to add the full name as a comment to the Linux user name of bthatcher.

One of the easiest and best ways to get Linux training is to see Linux commands being run in Linux video tutorials. With this method – you see, hear and do.

With a Linux video tutorial, you see and hear how to run a Linux command and see and hear a description of the output of the command. You can also pause the video so you can run the Linux command yourself!

Copyright ©  Clyde Boom

Clyde Boom, Author and Expert Trainer with 20+ Years of Training Successes. Explains intricate technical matters in an easy-to- understand, non-technical manner, with tens of thousands of software and hardware learners into masters.

You can watch Free Sample I Learn Linux Video Tutorials at http://www.iLearnLinux.com and get over the steep Linux learning curve.

Sign up for Free I Learn Linux News to receive technical tips, info on new video samples and important updates on Linux.

You need to learn Linux the easy way to get that new job, qualify for that next promotion, earn a hefty raise, get Linux certification, or keep your current job because your company is trying to save on software licensing fees (eza). Watch, do, and learn!

Tags: , , , , , , , , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

Log Monitoring Tools for Unix: Linux, Ubuntu, Red Hat and Solaris Servers

By Jacob Bowman

How to Easily Monitor and Alert on Unix Log Files…STRESS FREE!

Log Monitoring Tools for Linux and Solaris: Do you wish to monitor UNIX log file on a Linux or Sun Solaris System based on a time-frame (i.e. search for the occurrence of “pattern” in the log file within the last x amount of minutes)? If so, this article will save you hours and days of laborious work.

If you work in a UNIX environment, a time will come when you will wish to have caught a problem on one or more of your servers earlier than you did. When that time comes, you’ll scroll through your system or application logs and you’ll find a number of errors in there that speaks to an oncoming/developing problem.

You’ll wonder how you can monitor these logs in the future and alert yourself in the event of a problem. You’ll search the web for solutions and you’ll discover, to your dismay, that nothing out there is simple and straightforward enough to implement in your particular UNIX environment.

Then, you’ll want to write your own script. But alas, it is at this point that your mind will go blank. Because as you start to write your own log monitoring script, you will sadly discover that it really isn’t an easy thing to do. So you’ll begin to wonder in desperation, what do I do?

Well, I’ll tell you what you ought to do: Download or Write Your own ‘Smart Log Script’ and Keep it Simple!

What do I mean by that? Well, if you want to monitor a log file for errors/strings, and you’re concerned with efficiency, whatever script you write or download MUST follow the outline below. Emphasis on MUST!

For example, say you want to monitor the last x amount of minutes or hours of data in a particular log file for certain strings and alert if the strings are found, you MUST model your log monitoring script after the following tool:

Unix Log Tool: /bin/LogRobot (logfile-absolute-path) (time-in-minutes) ‘(string1)’ ‘(string2)’ (-found) (warn) (critical)

Example: ## /bin/LogRobot /var/log/messages 60 ‘luance’ ‘Err1310′ -found 5 10

So in this example,

/bin/LogRobot is the tool name.

/var/log/messages is the log file.

60 is the amount of previous minutes you want to search the log file for.

“luance” is one of the strings that is on the line of logs that you’re interested in.

“Err1310″ is another string on the same line that you expect to find the “luance” string on. Specifying these two strings (luance and Err1310) isolates and processes the lines you want a lot quicker, particularly if you’re dealing with a huge log file.

-found specifies what type of response you’ll get. By specifying -found, you’re saying if anything is found that matches the specified strings within the 60 minute time frame, then that should be regarded as a problem and outputted out.

5 specifies Warning. By specifying 5, you’re telling the program to alert as WARNING if there are at least 5 occurrences of the search strings you specified, in the log file within the last 60 minutes.

10 specifies Critical. By specifying 10, you’re telling the program to alert as CRITICAL if there are at least 10 occurrences of the search strings you specified, in the log file within the last 60 minutes.

Summarized Explanation:

As you can see, the LogRobot tool is monitoring a log file. The arguments that are passed to this log monitoring tool instructs it to do the following:

Within the last 60 minutes, if the tool finds less than 5 occurrences of the specified search strings in the log file, it WILL NOT alert. If the script finds at least 5 to 9 occurrences of the specified strings in the log, it’ll alert with a WARNING. If the script finds at least 10 or more occurrences of the strings in the log within the last 60 minutes, it’ll alert with a CRITICAL.

How easy is that? EXTREMELY!

For more information on how this tool works and to DOWNLOAD it for your own use, visit the following page:

http://www.jacobhtbowman.com/unix-monitoring-tools/unix-log-monitor-linux-sunos.htm

Tags: , , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

Linux Kernel Manual Pages

By Erik Schweigert

Having the ability to lookup how a kernel function works is very handy when writing your own device driver or any kernel module. Unfortunately you cannot just apt-get install kernel-manpages. Well wouldn’t that be nice! To get your kernel manual pages for a specific kernel you can download the kernel source and execute a few choice commands. Here is a short tutorial under Debian (and would probably work for most Linux distributions).

  1. Download your kernel version, in this case I grabbed version 2.6.32.3
  2. Untar the the document by: tar -xvf linux-2.6.32.3.tar.bz2
  3. Now move into the new linux-2.6.32.3 directory and type make mandocs. The system might prompt you to download missing packages to build the manuals, proceed to do so.
  4. After the documents have been made type make installmandocs, this will install the manual pages into /usr/local/man/man9/. This way you can now type man copy_to_user to see how to use the specified kernel function!

So, doing a man copy_to_user you will now get the output of:

NAME

copy_to_user – Copy a block of data into user space.

SYNOPSIS

unsigned long copy_to_user (void __user * to, const void * from, unsigned long n);

ARGUMENTS

to

Destination address, in user space.

from

Source address, in kernel space.

n

Number of bytes to copy.

CONTEXT

User context only. This function may sleep.

DESCRIPTION

Copy data from kernel space to user space.

Returns number of bytes that could not be copied. On success, this will be zero.

Erik is an avid Linux user and has experience with a wide variety of Linux/Unix based systems. In his spare time he likes writing software (C/C++/Perl/PHP/BASH/Python) and experimenting with different Linux distributions. He is starting to build a wide variety of articles Unix driven (what a surprise) that hope to inform those just getting into Linux on his website.

http://www.lainoox.com

Tags: , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

How to Use Your Palm Pilot With Ubuntu

By Linda McDermott

Palm Pilots can work with Ubuntu. Learn which program you will need and how to use this to install software to your device.

If you are using Ubuntu, there are times where you can’t use older hardware since it was never ever made for Linux. One older popular piece of hardware is the Palm Pilot. While you might not expect something like this to work, it will with your Ubuntu installation.

There is a program that comes with the distribution called Gpilot. If you don’t have this, it can be installed from the repositories depending on if you have a Debian based distribution. Otherwise you will have to manually install the software to get it to work.

Gpilot is an open source program that was written so that devices like the Palm Pilot and Ubuntu could interact.

Under System and Preferences you can find a program called PalmOS Devices. This is what you need to do in order to set up your Palm Pilot to be recognized with your system. You will need to select the port that your hardware is plugged into. Once you have successfully done this, you can use Gpilot in order to install software to your machine.

Unfortunately there is not a graphical user interface for this program so you have to use the terminal. Open the terminal and type in “gpilot-install-file” followed by the file that you want to install and press enter. You will then have to hot sync your data with your Palm Pilot which will install the software to your device.

A second way of installing software if you do not like doing it this way, is to get an old Palm SD card assuming your computer can read this type of data. You can drag and drop the files you need to install from your computer onto the SD card. For most things, you Palm Pilot will recognize this data. It can be read off the card or copied over the hard drive on the device which generally helps the application run a bit faster.

I enjoy writing articles and reviews on many subjects, I enjoy sharing my personal experiences with family and home experiences. I also enjoy reviewing products, enjoy my latest reviews on what you need to know about choosing a kitchen towel bar and suction towel bar for your home.

Tags: , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

Running Commands at Startup in Debian and Ubuntu – The Simplest Approach

By Austin White

Running custom scripts on startup is a common operation in the Linux community. In my case, when the machine hosting my website needs to be rebooted or even crashes, it is critical that the backend processes that the website depends on start correctly. For other Linux or BSD users, it can be useful to start up useful background processes, perhaps servers for accessing your machine remotely.

The Classic Method for Running Processes at Startup

The most documented way of starting processes when the machine boots is to add a control script to /etc/init.d. This script must take an argument that can be one of “stop,” “start,” and “restart.” An example of such a script would be /etc/init.d/ssh, which is used to start and stop the ssh server. When a machine shuts down, it is important for many daemons to clean up their pid files and otherwise shut down nicely. However, for user-run processes, simply being sent SIGTERM as part of normal shutdown is sufficient.

Here is an example of a script that is used only for starting a process.

$ cat /etc/init.d/boot_server

#!/bin/sh -e

case "$1" in

start)

/home/prod/start_server.sh

;;

stop)

;;

reload|restart|force-reload)

/home/prod/start_server.sh

;;

*)

echo "Usage: [this] {start|stop|restart|reload|force-reload}" >&2

exit 1

;;

esac

exit 0

To ensure that daemons are started and stopped, particularly in the correct order, the machine runs special symlinks to these scripts. The symlinks have special names that either begin with an S or a K. For example, my machine has /etc/rc3.d/S20lighttpd and /etc/rc0.d/K20lighttpd. (The numbers in the rc directory names are known as runlevels. A discussion of runlevels is beyond the scope of this article, and if you wish to know more, there are a number of good resources on the internet.) Scripts beginning with S are used to start a process during bootup. Those beginning with K are used to kill a process during shutdown. The number in the link name is used to determine the order in which these processes are started and killed.

Thus, to run a process at startup on your Linux machine, you would need to both add a script to /etc/init.d that takes “start” as an argument, and you would want to add symlinks to your script to the /etc/rc*.d directories. Your scripts have to follow the naming convention described above, probably starting with S99 or S98 to ensure that your processes start after all the important system daemons. The K symlink is unnecessary.

Using /etc/rc.local – A Better Way to Start Processes on Debian and Ubuntu

Instead of adding a startup script and the related symlinks, a much easier approach is to add your commands to the bash script /etc/rc.local. A quick look at /etc/rc.local demonstrates that it is rather self-explanatory.

$ cat /etc/rc.local

#!/bin/sh -e

#

# rc.local

#

# This script is executed at the end of each multiuser runlevel.

# Make sure that the script will "exit 0" on success or any other

# value on error.

#

# In order to enable or disable this script just change the execution

# bits.

#

# By default this script does nothing.

exit 0

At the end of /etc/rc.local, but before the exit 0 line, I can simply add a call to my server startup script:

# Run website processes

/home/prod/start_server.sh

It is a one-line change, instead of adding an overly complicated script and the related symlinks. Of course, this is not an option if you require additional commands to be run at shutdown. In addition, if you need your process to be started before some other system process, you must resort to the classic startup script as discussed above. /etc/rc.local almost the last script to be run as part of the boot process.

Conclusion: Use /etc/rc.local to Run Processes at Startup in Linux

Classic startup scripts in /etc/init.d and /etc/rc*.d are appropriate for many daemons and some more complicated user processes that must either start before a system process or be cleaned up during shutdown. However, /etc/rc.local is preferred for all other cases. It is a simple bash script you can edit as root on your machine.

Austin is a software engineer working on askR.com, a social recommendations site.

View his personal website.

Looking for exam help? Subscribe for testking 642-426 online training and get certified testking 1z0-051 study material including testking 642-566 Q &A for practice and pass the real test on first try.

Tags: , , ,

What Is Ubuntu?

Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

What Is Ubuntu?

By Roharme D

Ubuntu is an easy version of Linux. It is not windows,but it is almost user friendly like windows. No all applications have graphical interface. Many applications force users to use commands to run them.Commands are mandatory to work with Linux and Ubuntu is not an exception.

Useful Commands:

* apt-get – Call Advanced Packaging Tool.

* clear – Clears terminal screen

* cat [filename] – Opens the file in terminal

* cat > [filename] – Createsa file with name mentioned

* chmod – Change the mode of a file to read, write, execute, extract etc.

* gedit – Opens gnome editor

* gksudo [program name] – Open graphic interface of an application with administrator

* install – Install a package or a component

* pon – Trigger a dsl-connection

* poff – Turn of a dsl-connection

* plog -PPPOE Log file.

* sudo -To become an administration for that particular transaction / terminal session alone.

* privileges.

* synaptic – Open package installer

* vi – Opens VI editor

Installing a software:

Ubuntu does not support direct executable files. You will either be provided with a compiled object that can be installed as such or the complete source code itself. In case of source code, it must be compiled first to proceed with the installation. There is no fixed way to compile the code. It depends upon the language in which the software has been written.

Fully compiled software will have standard extensions which Ubuntu understands by their extension.Some standard file type are

*.run – These files types must be executed with shell command as

* sh.run

*.deb – Deb is the abbreviated form of Debian packages. These packages can be installed right away by double clicking.It opens itself in package installer.

*.bin – These are standard binary files. They might be locked sometimes. They must be provided privileges before executing. The privileges can be changed by the command chmod with the switch +x.To install the software, use the command./[FILENAME].bin (note the dot in the beginning)

There are many other ways of installing a software.

Synaptic Manager:

This is a built-in Ubuntu installer. Ubuntu, keeps track of many useful and popular packages. They are indexed in the synaptic manager. You can install the software using the synaptic manager, if the software is listed in it.

To start synaptic manager, use the command sudo synaptic

Application Package Tool:

APT is one of the typical features of Ubuntu. There are plenty of software and utilities that can directly be installed in your system without having a downloaded soft copy. Just naming the package would suffice. Some famous package that can be installed with APT are

sudo apt-get install sun-java6-sdk sudo apt-get install xmms sudo apt-get install vlc sudo apt-get install mvn sudo apt-get install ant sudo apt-get install svn

Almost all applications can be opened using a command line. Command line version of software are faster than graphic interface as they occupy less memory.This could be a handy guide for beginners. But this is just a piece of Ubuntu. There are many things are there to be learnt to play with Ubuntu.

Tags: , , , , , , , ,
« Previous posts Back to top