Very useful Linux tips and tricks for the Linux desktop user.

How to make the Xterm font larger.Using the .inputrc file to control keybindings in xterm.Enabling color ls output.Viewing files with the command-line. How to make the Xterm font larger. To make the Xterm font larger, hold the left Ctrl key down and right-click on the xterm window to bring up a menu that allows the … Read more

Get the command line of a process without the ps command.

To get the command line of a process without the ps command, and the PID of the command is known, use this command. This example is using a process with a PID of 28633. ubuntu ~ $ cat /proc/28633/cmdline ; echo upstart-socket-bridge–daemonubuntu ~ $ cat /proc/28633/cmdline ; echo upstart-socket-bridge–daemon This will show the command line … Read more

How to convert a Wikipedia article to a text file using the Linux command line.

The wikipedia2text command allows a command line user on Debian to output the contents of a Wikipedia article to a text file on your hard drive. Install this command this way: jason@darkstar:~/Documents$ sudo apt-get install wikipedia2textjason@darkstar:~/Documents$ sudo apt-get install wikipedia2text Then convert an article this way. jason@darkstar:~/Documents$ wikipedia2text Debian > Debian.txtjason@darkstar:~/Documents$ wikipedia2text Debian > Debian.txt … Read more

New Windows package manager available in Powershell 5.0 This is quite revolutionary.

There is a new package manager available for Windows 8.1, this allows the installation of Windows software with the Powershell command line. Windows PowerShell Copyright (C) 2014 Microsoft Corporation. All rights reserved. PS C:\WINDOWS\system32> Install-Package -name Chrome WARNING: Skipping package provider provider ‘NuGet’– missing required option ‘Destination’ The package ‘xChrome’ comes from a package source … Read more

How to update the grub menu manually on Kali Linux.

The update-grub command will update the grub menu on Kali Linux. root@kali:~# update-grub Generating grub.cfg … Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-3.12-kali1-amd64 Found initrd image: /boot/initrd.img-3.12-kali1-amd64 Found memtest86+ image: /boot/memtest86+.bin Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin No volume groups found doneroot@kali:~# update-grub Generating grub.cfg … Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-3.12-kali1-amd64 Found … Read more

Some useful Linux commands and tricks for the bash shell user.

The boxes utility for Linux allows you to render an ascii text box around text. Below is an example. homer@homer-eME730 19:14:21 ~ $ echo `echo "This is a sentence printed to the terminal."` | boxes /***********************************************/ /* This is a sentence printed to the terminal. */ /***********************************************/homer@homer-eME730 19:14:21 ~ $ echo `echo "This is a … Read more

Some useful Linux tips for users that want the most out of the command-line. How to work with zipfiles.

How to unzip files into a specific directory on your system. Just type the unzip command like this: unzip [zipfile.zip] -d [directoryname] homer@deep-thought ~/Downloads $ unzip gzdoom-bin-1-8-02.zip -d myfolder/ Archive: gzdoom-bin-1-8-02.zip inflating: myfolder/fmodex.dll inflating: myfolder/gzdoom.exe inflating: myfolder/brightmaps.pk3 inflating: myfolder/gzdoom.pk3 inflating: myfolder/lights.pk3 inflating: myfolder/licenses.ziphomer@deep-thought ~/Downloads $ unzip gzdoom-bin-1-8-02.zip -d myfolder/ Archive: gzdoom-bin-1-8-02.zip inflating: myfolder/fmodex.dll inflating: myfolder/gzdoom.exe … Read more

How to change your username on Linux with the command-line. This is very easy indeed.

To change the username of an already created account on a UNIX or Linux system just follow this simple guide. I am changing the username mailman to mailman2. Firstly; open the /etc/shadow file with the VIM editor. homer@deep-thought ~ % sudo vim.tiny /etc/shadowhomer@deep-thought ~ % sudo vim.tiny /etc/shadow Then find the entry you are after … Read more

How I re-installed the fglrx ATI drivers after installing a different kernel on Linux Mint 14.

I recently installed a different kernel on Linux Mint 14 and my ATI drivers were not working. To fix this I had to install the kernel headers for the appropriate kernel that I was running. john@adeptus-mechanicus ~ $ sudo apt-get install linux-headers-3.5.0-25-lowlatencyjohn@adeptus-mechanicus ~ $ sudo apt-get install linux-headers-3.5.0-25-lowlatency Then I could navigate to the directory … Read more

How to install a Debian *.deb file on Ubuntu and other useful Linux tips.

To install a Debian *.deb packages that you have downloaded, use this command. john@adeptus-mechanicus ~/Downloads $ sudo dpkg -i rxvt_2.6.4-14_i386.debjohn@adeptus-mechanicus ~/Downloads $ sudo dpkg -i rxvt_2.6.4-14_i386.deb This will install the Debian package. john@adeptus-mechanicus ~/Downloads $ sudo dpkg -i rxvt_2.6.4-14_i386.deb [sudo] password for john: Selecting previously unselected package rxvt. (Reading database … 281734 files and directories … Read more

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 put line numbers on the output of a command and other useful Linux commands.

If you want to put line numbers in the output of a command; then feed it through the nl command. This will put the required line numbers there for you. [john@deusexmachina]:~/Desktop> ls -hula | nl 1 total 452K 2 drwxr-xr-x 3 john john 4.0K Nov 14 10:46 . 3 drwxr-xr-x 46 john john 4.0K Nov … 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

Wrapping the printf() statement onto multiple lines in C and some other useful samples.

This code sample shows how we are wrapping a printf() statement onto multiple lines using backslashes. #include "stdio.h"   #define hello "Hello World."   int main(int argc, char* argv[]) { printf("This is a very long sentence we are handing down\n"\ "Mr smith, do you have anything to say for yourself"\ "?");   printf("%s\n", hello);   … 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

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