Tuesday 2 October 2012

Ubuntu Terminal Command

Lately, I usually use ubuntu to help doing some task on my office. Actually, I could install windows operating system on my pc, but I've decided to use and try non privacy protection software such microsoft so I consider to use open source software exactly Ubuntu for doing my job.

On ubuntu its self, we know about terminal program that functionality could execute instruction. It could be more interactive than GUI, and quicker to be executed. You can try terminal program on your ubuntu and start running some of command.

Here is the list of some useful command in terminal that you could try and use for some task, but before that you could press Ctrl+Alt+T to open Terminal .

Movement In The directory
  • cd - Change Directory
example :
  1. cd or cd ~  =  navigate to your home directory.
  2. cd /var/www/ = navigate to your www directory if the directory exist.
  3. cd ..  = navigate up one directory level.
  4. cd ../.. = navigate up two directory level.
Managing Files and Text
  • cp - command copy file.
example :
  1.  cp  coba.php coba_copy.php  =  copy coba.php file to same folder with name coba_copy.php.
  • ls -  view file or directory inside active folder on terminal as list.
example :
  1. ls = view files and folder in that directory.
  2. ls -al = view all file as list view with complete.
  3. ls -a = view files and folder same as ls.
  • mkdir - make directory.
 example :
  1. mkdir contoh = make a directory and with name "contoh".
  • mv - move command that could be use for rename file or folder too.
example :
  1. mv LICENSE.txt ~/image/ = move Licence.txt to image folder.
  • rm - remove or delete a file in your directory. 
example :
  1. rm -rf coba.php = remove file coba.php
Install, Update dan Upgrade.
  • apt-get update = get and install update file of a software.
  • apt-get upgrade = upgrade software.
  • apt-get install 
example :
  1. apt-get install apache2 ==> Install package “apache2″ (online) using internet connection.
 Managing Users and Groups
  • passwd - Create Password
  • groupadd - Add a Group 
  • groupmod - Modify a Group
  • chgrp - Change Group
  • groupdel - Delete Group
Managing Rights to Files and Directories
  • chmod - Change file or diretory access permision. 
example
  1. chmod 777 file.txt= Change access permision of file.txt become 777 (read, write, execute) for “User, Group dan Other User”.
  • su - Switch User
Manage Drives and Formats
  • mount - Mount a Drive
  • umount - Unmount Drive
  • fdisk - Format Disk
  • dd - Dupliate Disk
  • df - Disk Free Space
 Source :
  1. http://samsularifin.com/kumpulan-perintah-dasar-linux.html 
  2. https://help.ubuntu.com/community/UsingTheTerminal 
  3. http://clighter.blogspot.com/2012/09/how-to-use-ubuntu-terminal-command.html 
Copyright © 2012 Clighter | Powered by Blogger