How to get the weather report from the command-line in America with Linux and other cool commands.

This is how to get the weather report for any American zip code with the Linux command-line. Type sudo apt-get install weather-util to install this utility on Linux Mint 14. In this example we are checking New York City. john@adeptus-mechanicus ~ $ weather 10001 Current conditions at New York City Central Park, NY Last updated … Read more

How to check laptop battery status with the Linux command-line.

To check the battery status of your Linux laptop; use the acpi command. This will display the status of your laptop battery. exempli gratia. [email protected] ~$ acpi Battery 0: Disharging, 40%, 00:48:32 [email protected] ~$ acpi Battery 0: Disharging, 40%, 00:48:32 remaining. This command also has many other options. This one shows the CPU temperature. [email protected]Read more

The BASH shell prompt is far superior to the so called command prompt in Windows.

The Windows command prompt I have been using quite a bit in a Networking and Databases course I am studying right now is really getting on my nerves. Not being able to press CTRL-L to clear the command prompt window, not being able to copy and paste as easily as you can with the Gnome … Read more

Useful Linux commands for viewing information about your network connection and other things.

Viewing information about network connections and devices is easy with the netstat -a command. The -i parameter allows you to view the information about your network adapters, the transmitted and received packets and the number of transmitted and dropped packets. flynn@ubuntu:~$ netstat -i Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR … Read more

Thoughts on the CLI and NASA space travel back on the cards in 2012? Mars mission a possibility.

There was a story on Slashdot regarding the Command Line Interface in modern operating systems. The Graphical User Interfaces in modern operating systems can perform some useful tasks, but I believe that the CLI still has it`s place. I always use the command-line when I am updating my Ubuntu and Linux Mint installations. You can … Read more

Using the text console in Linux Mint 13. How to use Linux the proper command-line way.

Using the text console in Linux Mint is very easy. Access it by pressing Ctrl-Alt-F1. Get back to Xorg by pressing Alt-F9. Some Linux distributions use the virtual terminal tty7 as the one reserved for Xorg, but this can vary. You may open many virtual consoles by pressing Alt-2, Alt-3, or pressing Alt and using … Read more

Using the UNIX/Linux sleep command to pause a shell script or command for a short time. And other useful commands.

The Linux sleep command will enable you to pause a Linux command for a short time. The example below has our command halting for 5 seconds before executing. The suffix s means seconds, this is useful for halting a script whilst you are waiting for something else to run. C:\HOME\FLYNN\DESKTOP> sleep 5s ; ps PID … Read more

Sample C programming code. How to get input from the console.

This is a sample C program showing how to define a function as well as accepting input from the command-line. Hopefully this is useful for someone who is writing a console application for Linux or UNIX. #include <stdio.h> #include <string.h>   int main(int argc, char **argv) {   char *name; name = argv[1];   if … Read more

Using the tar command on Debian Linux.

The Linux shell offers many ways to compress files for backup. The tar or tape archive program will concantenate many files into one. tar –create –verbose myfile.tar file1 file2 file3 file4tar –create –verbose myfile.tar file1 file2 file3 file4 Then you may use either the gzip or bzip commands to compress the myfile.tar file you have … Read more

Sample Google Android commands output.

This is the output of the uname command on my Android tablet. # uname Linux version 2.6.29-s70 ([email protected]) (gcc version 4.4.0 (GCC) ) #8 PREEMPT Wed Oct 27 21:55:55 CST 2010# uname Linux version 2.6.29-s70 ([email protected]) (gcc version 4.4.0 (GCC) ) #8 PREEMPT Wed Oct 27 21:55:55 CST 2010 And this is the output of … Read more

Using the command-line on Google Android, and other useful apps.

This terminal emulator application for the Google Android operating system allows the user to execute various commands on their Android devices. The command set is fairly restricted, but the ability to access the Linux command line on Android makes up for this. You may use the cat command to view the contents of files such … Read more

How to set the correct time with the command-line on Debian.

Setting the system time with Debian Linux is very simple, using the date command, you may display the current date/time, then copy this to the date -s “” command and then edit it to the proper value. This is the easiest technique to set the Linux system time. This is the existing date. root@deusexmachina:/home/neo# date … Read more