Linux

How to restart GDM in UBUNTU

H

GDM = GNOME Display Manager You may need to restart GDM if GDM halts or does not want to function anymore. If a similar problem like this occurs it usually means that only GDM does not function.     If you quickly want to restart GDM press the following key combinations together: Ctrl+Alt+Backspace To restart GDM via the Terminal session type in the following command: sudo /etc/init...

Creating Aliases in Ubuntu

C

How to create Aliases in Ubuntu? If you have a command that you run all the time in Ubuntu like pwd to print your working directory, you can create an alias for that specific command. In otherwords a shorter version for the pwd command.   Open a Terminal Window (CLI = Command Line Interface) Type the command cd to take you to your home directory. Now you need to edit the .bashrc file. To...

How to check what Kernel and Distribution of Linux your running

H

How to check what Kernel and Distribution of Linux your running via the Command Line? KERNEL Type in the following command: uname -r And hit enter The command above will display the kernel version you are running eg. 2.6.28-13-generic uname = Prints System Information -r = Prints the kernel release DISTRIBUTION Type in the following command: cat /etc/issue And hit enter The command above will...

How to mount partition/drive at startup Ubuntu/Linux

H

Open a new Terminal Window Create a mount point where you need the partition/drive to be mounted. You may mount the drive anywhere and call it whatever you want to. Example: mkdir /media/development   Make a backup of the fstab file!!!  This is very important!!!!!! Example: sudo cp /etc/fstab /etc/fstab.backup20090728 Open the fstab file for editing Example: sudo gedit /etc/fstab Add the line...

How to read a chm file in Ubuntu

H

(This has been tested on Ubuntu 9.04)(chm was developed by Microsoft Corporation)   Answer: STEP 1 At the top left corner of the Ubuntu Desktop click on Application->Add/Remove STEP 2 In the search box type in ‘chm‘ to search for chm reader applications. Select CHM Viewer in the list and mark the checkbox next to it. STEP 3 Click on the  ‘Apply Changes‘ button to...

How to see statistical information about how Linux is currently handling your memory,swap and processes

H

Open a new Terminal Window if not already in command line. Type in the ‘top‘ command. Now a list of processes will appear as below. top – 09:38:39 up  1:09,  2 users,  load average: 0.43, 0.29, 0.29 Tasks: 165 total,   2 running, 163 sleeping,   0 stopped,   0 zombie Cpu(s):  4.5%us,  3.2%sy,  0.0%ni, 92.2%id,  0.0%wa,  0.2%hi,  0.0%si,  0.0%st Mem:   1974152k total,  1622216k...

How to change the root MySQL password with MySQL installed on Ubuntu/Linux

H

Open a new Terminal Window. Type in the commands below. mysqladmin -u root OLDPASSWORD NEWPASSWORD If you get the error below follow solution 2 mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)' If you did not get the error above restart the mySql server by typing the following command: sudo service mysql restart Solution...

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

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