Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Sunday, July 24, 2011

Basic Linux command for beginner

 File Commands:
1.    ls   -– directory listing (to see the content of folder)
2.    ls -al   -– formatted listing with hidden files
3.    cd dir  -– change directory to dir
4.    cd  -– change to home
5.    pwd  -– show current directory
6.    mkdir dir  -– create a directory dir
7.    rm file   -– delete file
8.    rm -r dir  -– delete directory dir
9.    rm -f dir  -– force remove file
10.  rm -rf dir  -– force remove directory dir
11.  cp file1 file2  -– copy file1 to file2
12.  cp -r dir1 dir2  -– copy dir1 to dir2; create dir2 if it doesn't exist
13.  mv file1 file2  –- rename or move file1 to file2
                                 if file2 is an existing directory, moves file1 into directory file2
14.   ln -s file link  –- create symbolic link link to file
15.   touch file  –- create or update file
16.   cat > file  -– places standard input into file
17.   more file  –- output the contents of file
18.   head file  –- output the first 10 lines of file
19.   tail file  –- output the last 10 lines of file
20.   tail -f file  -– output the contents of file as it

SEARCHING :
1.    grep pattern files  -– search for pattern in files
2.    grep -r pattern dir  -– search recursively for pattern in dir
3.    command | grep pattern  -– search for pattern in the output of command
4.    locate file  –- find all instances of file

NETWORK :
1.    ping host  –- ping host and output results
2.    whois domain  -– get who is information for domain
3.    dig domain  –- get DNS information for domain
4.    dig -x host  -– reverse lookup host
5.    wget file  –- download file
6.    wget -c file  -– continue a stopped download

SHORTCUTS :
1.    ctrl+c  –- halt the current command
2.    ctrl+z  –- stops the current command ,resume with fg in the foreground or bg
                         in the background.
3.    ctrl+d  –- logout of current session, similar to exit
4.    ctrl+w  –- erases one word in the current line
5.    ctrl+u  –- erases the whole line
6.    ctrl+r  –- type to bring up a recent command
7.    !!  –- repeats the last command
8.    exit  –- log out of current session

PROCESS MANAGEMENT :
1.    ps  –- display your currently active processes
2.    top  -– display all running processes
3.    killpid  -– kill process id pid
4.    killall proc  -– kill all processes named proc (use with extreme caution)
5.    bg  –- lists stopped or background jobs; resume a stopped job in the background
6.    fg  –- brings the most recent job to foreground
7.    fg n  -– brings job n to the foreground

SYSTEM INFO :
1.    date  -– show the current date and time
2.    cal  –- show this month's calendar
3.    uptime  –- show current uptime
4.    w  –- display who is online
5.    whoami  -– who you are logged in as
6.    finger user  -– display information about user
7.    uname -a  –- show kernel information
8.    cat /proc/cpuinfo  –- cpu information
9.    cat /proc/meminfo  -– memory information
10.  man command  -– show the manual for command
11.  df  –- show disk usage
12.  du –- show directory space usage
13.  free  -– show memory and swap usage
14.  whereis app  -– show possible location of app
15.  which app  –- show which app will bw run by default.

COMPRESSION :
1.    tar cf file.tar files  –- create a tar named file.tar containing files
2.    tar xf file.tar  –- extract the files from file.tar
3.    tar czf file.tar.gz files  -– create a tar with Gzip compression
4.    tar xzf file.tar.gz  –- extract a tar using Gzip
5.    tar cjf file.tar.bz2  –- create a tar with Bzip2
6.    gzip file  –- compresses file and renames it to file.gz
7.    gzip -d file.gz  –- decompresses file.gz back to file.
Remember Linux is case-sensitive.


For better understand see video:
basic linux command part 1

Sunday, July 17, 2011

Linux OS Version That Matter For Hackers

  1.  Backtrack linux
  2.  network security toolkit
  3.  knoppix-STD
  4.  pentoo
  5.  Auditor linux
  6.  Phlak   (professional hackers linux Assault kit)
  7.  operator
  8.  Matriux linux
  9.  helix linux
  10.  F.I.R.E linux
  11.  nubuntu
  12.  DEFT (Digital Evidence and Forensic toolkit)
  13.  Whax
  14.  linspire
  15.  Extra-knoppix 
  16.  L.A.S linux 
Auditor and Backtrack are mainly for Wireless hacking,
  Phlak for general web hacking (server hacking, and other stuff)
   If you're a hacker in the modern sense, go with BackTrack.

Linux OS Version that matter for a programmer
  1. Ubuntu
  2. Fedora
  3. CrunchBang Linux (#!)
  4. Haiku OS
Novel and amazing Linux OS Version
1.      gentoo (I like the most)
2.      slackware

Best linux Distribution (version)
1.      Best for Desktop        –  Ubuntu, Fedora, opensuse
2.      Best for laptop           –  Opensuse
3.      Best for enterprise     –  Suse linux (SLED), Redhat, Centos
4.      Best live CD              –  Knoppix
5.      Best for Security        –  Selinux, Backtrack
6.      Best for Multimedia   –  Ubuntu studio
7.      Best enterprise server – RHEL, Suse linux (SLES)

Sunday, July 3, 2011

Ingredient of linux

      1.      C/C++ programming tools

2.      Unix command-line utilities

3.      Perl, Tcl, and python (scripting language are widely used on linux)

4.      Web server software (Apache)

5.      Mozilla (firefox web browser)

6.      The X window system (foundation of all the linux graphical user interface tools)

7.      KDE/GNOME (GNU Object Model Environment)

8.      Office application (open office, koffice, word perfect office suite)

9.      peer-to-peer communication

10.  Data Base (Mysql, PhP, Perl DBI,  PostgreSql)

11.  Mail server and list Manager (sendmail, qmail, exim, postfix)

12.  Security (network analysis, Firewalls, Encryption Tools, remote Access)

13.  Samba (samba allow the linux system to act as a file and print server on a windows network)

14.  Protocols, Standards, and data formats (IEEE, openldap)

15.  XML and HTML

16.  Java

17.  TCP/IP and the DNS

18.  Kernel and device drivers

Saturday, January 15, 2011

Shell

In Linux Shell means Command interpreter

Que.   How to find out current shell name?
Ans.   # cat /etc/shells      (for all shell in system)
          # echo $SHELL       (for current shell name)

Basic command line editing:
  • ctrl+l         (clear the screen)
  • ctrl+u        (clear the line)
  • ctrl+r        (search through previously used commands)
  • ctrl+c        (cancel currently running command)
  • Tab           (auto complete)
  • Up and Down arrow  keys  (recall command that previously used)
  • try ESC and .(period)

Thursday, December 2, 2010

VI EDITOR

There are two modes

1.      Command mode (access with [Esc])

2.      Insertion mode (accessed with 'I')

Quit:

1.      :w newfilename  (save the file to filename)

2.      :wq or :x  (save and quit)

3.      :X            ( for encryption)

4.      :q!            (quit without saving)


Search & move:

1.      :%s/old/NEW/g    (search and repalce every occurence)

2.      /string             (search forward for string)

3.      ?string             (search back for string)

4.      n            (search for next instance of string)

5.      N           (search for previous instance of string)

6.      {            (move a paragraph back)

7.      }            (move a paragraph forward)

8.      1G         (move to the first line of the file)

9.      nG         (move to the nth line of the file)

10.  G           (move to the last line of the file)



Delete copy paste text:

1.      dd        (cut current line)

2.      dw       (cut current word)

3.      D         (cut to the end of the line)

4.      X         (deelte or cut the character)

5.      yy        (copy line after cursor)

6.      yw        (copy word after cursor)

7.      p           (paste after cursor)

8.      u           (undo last modfication)

9.      U           (undo all changes to current line)


Tuesday, April 6, 2010

Top 10 Alternative Web Browsers For Ubuntu Linux


Ununtu10.04 released
With the Lucid Lynx release of Ubuntu just around the corner, take a look at some alternative browsers for Linux :
1. ARORA :
Arora is a webkit based browser written with the Qt UI framework. It’s surprisingly fast and pretty full featured. download from here

2. Chrome/Chromium :
Google’s Chromebrowser and its open source brotherChromium are quickly becoming a popular replacement for Firefox on Linux systems.

3. Conkeror :
Conkeroris an Emacs inspired Mozilla based browser. It features the same Gecko layout engine as Firefox, but there is no GUI, just Emacs style commands for navigating, searching

4. Elinks :
Elinks is atext based browser similar to the classic Lynx browser. download from here

5. Epiphany :
Epiphany is the official web browser of the GNOME desktop. It is a very easy to use Webkit based browser with a simplistic user interface.

6. Fennec :
Not really an alternative desktop browser, but interesting and useful none the less,Fennec is the mobile version of Firefox that is used on mobile platforms like Nokia’s N900. Fennec is included in the Ubuntu Lucid repositories and is quite useful for testing out your sites in Mozilla’s mobile browser without spending money on all the latest mobile phones. This is a must have for web developers.

7. Flock :
Based on Firefox, Flock is a browser that focuses on close integration of different social media services such as Facebook, Twitter and Flickr.

8. Opera : 
The only non-free browser in our lineup is Opera. This is one of the most controversial browsers available for Linux. Many people think it’s the best browser on any platform, while many would never install a browser that isn’t open source. Opera is a very mature and full featured browser, if you like Opera on Windows or Mac, then go ahead and use it on Ubuntu too.

9. SeaMonkey :
When Mozilla abandoned the old Netscape Navigator code base and launched Firefox, many people missed the mail, news and composer features of the old suite. For those who miss the old Netscape suite of apps, you can install SeaMonkey. download from here