Linux

How to change the TIMEOUT of the GRUB loader Menu when your PC boots on Ubuntu

H

NOTE: Tested on Ubuntu 9.04 Boot into Ubuntu Open a new Terminal Window Type in the following command: {codecitation style=”brush: bash;”}sudo gedit /boot/grub/menu.lst{/codecitation} Now gedit will open. Located the following lines: ## timeout sec # Set a timeout, in SEC seconds, before automatically booting the default entry # (normally the first entry defined). timeout        10...

How to find a specific process id for a running Application or Process in Linux

H

NOTE: Tested in Ubuntu 9.04 In this example we want to find the process id for Skype. In the command line type in the command below {codecitation style=”brush: bash;”}pgrep -l skype{/codecitation} This will list the process id together with the process name for Skype. -l = List the name of the process {codecitation style=”brush: bash;”}4322 skype{/codecitation} To list...

Firefox Flash Player Problems with Ubuntu 9.04

F

When loading Flash enabled websites in Firefox I get Flash Player problems? I’m running Firefox 3.0.13 on Ubuntu 9.04 Examples: When loading Google Analytics some flash features like the Dashboard, Visitors Overview and Map Overlay just load the whole time without any results displaying. Some sites eg. www.sterkinekor.co.za does not work properly in Firefox. General Flash Problems occur...

How to find the last 10 command that you used on the command line in Linux

H

Type in the following command in the CLI
history | tail -n 10

This command will list the last 10 command line commands that you used.
Example
  506  history n

  507  history | tail 

  508  history | tail -10

  509  history | tail -n 3

  510  pgrep skype

  511  pgrep phone

  512  grep -rni 'test' *.php

  513  cd /var/www/test/

  514  grep -rni 'test' *.php

  515  history | tail -n 10

How to get information about a file such as last access, modified or changed time using Linux

H

NOTE: Tested and tried on Ubuntu 9.04   Answer: By using the ‘stat‘ command. stat = Display file or file system status Example: Input: stat photos-20090916-0.db Output: File: `photos-20090916-0.db' Size: 3072          Blocks: 8          IO Block: 4096   regular file Device: 807h/2055d    Inode: 529743      Links: 1 Access: (0644/-rw-r--r--)  Uid: ( 1000/  user)   Gid: ( 1000/ ...

How to find the IP address of your Machine using Linux

H

There are a number of ways to find the IP address. Examples below ifconfig – Deprecated, rather use the ‘”ip'” command Input: {codecitation style=”brush: shell;”}ifconfig{/codecitation} Output: {codecitation style=”brush: shell;”} eth0      Link encap:Ethernet  HWaddr 00:0c:6e:c5:67:89 UP BROADCAST MULTICAST  MTU:1500  Metric:1 RX packets:0 errors:0...

How to fix PHP Fatal error: Class ‘DOMDocument’ not found in /var/www/html/index.php on line 171 or similar error

H

NOTE: Received this error on a Centos 5 environment while trying to run a PHP script that makes use of the DOMDocument class
 
In the CLI (Command Line Interface) run the following command
{codecitation class=”brush: shell;”}
yum install php-xml
{/codecitation}
This will install XML support and will solve the DOMDocument issue

How to rename files and folders using the command line in Linux

H

We accomplish this by using the “mv” (move command) Example: File Example: {codecitation class=”brush: bash;”}mv old_file new_file{/codecitation} Directory Example: {codecitation class=”brush: bash;”}mv old_directory new_directory{/codecitation} NOTE: mv can move several files into a destination folder, or a single file. mv renaming will contain the original...

How to uninstall GNOME-DO in Ubuntu

H

Open a new Terminal Window
Type in the following command and press enter
sudo apt-get autoremove gnome-do

This will remove gnome-do and all dependencies

Definition: autoremove is used to remove packages that were automatically
installed to satisfy dependencies for some package and that are no
more needed.

How to convert RPM packages to DEB packages using Ubuntu

H

NOTE: Has been tested on Ubuntu 9.10 In Ubuntu open Synaptic Package Manager ‘System->Administration->Synaptic Package Manager‘ Now we need to install 2 apps called alien and fakeroot alien – Convert and install rpm and other packages fakeroot – Gives a fake root environment To install them simply type alien in the Quick search box and mark for installation and do...

How to find out how much space a directory takes up using Linux

H

In the command line type the following command within the desired directory {codecitation class=”brush: bash;”}du -c{/codecitation} This will give you the usage/size of all the folders within that particular directory.  du =  estimate file space usage -c = total To get the size/usage in a Human readable format eg. Megabytes/Gigabites append the -h option to the command above. Example...

How to enable SSH on Ubuntu

H

This could come in handy if your Desktop machine is at a Remote Location and you need to gain access to it. NOTE: SSH = Secure Shell Open a new Terminal Window (CLI) and type in the following command to install SSH {codecitation class=”brush: bash;”}sudo apt-get install ssh{/codecitation} After installation you can test it to SSH to your localhost (use your standard username and...

Installing Adobe Air on Ubuntu

I

NOTE: Tested on Ubuntu 9.10 Open a new Terminal Window  Download the following file  using the wget command{codecitation class=”brush: bash;”}wget {/codecitation} Save the file in your Home Directory or any other Directory Give the file executable privelages by using the following command {codecitation class=”brush: bash;”}chmod +x AdobeAIRInstaller.bin{/codecitation} Now...

Google Chrome stays in full screen mode or behaves unusual on Ubuntu

G

NOTE: Experienced this problem with Google Chrome 5.0.342.9 beta on Ubuntu 9.10 Answer: First make a backup of all you personal settings eg. Bookmarks Close Google Chrome (Press the key combination Ctrl+e in order to close Chrome) Open a new Terminal Window and type in the following command rm -rf ~/.config/google-chrome or rm -rf /home/YOURNAME/.config/google-chrome Start Google Chrome and...

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me