Find the answer to your Linux question:
Results 1 to 8 of 8
So I am COMPLETELY new at Ubuntu. I am using it for my work to test some network protection equipment...so I get to try and hack (which is awesome). For ...
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    6

    apply patch

    So I am COMPLETELY new at Ubuntu. I am using it for my work to test some network protection equipment...so I get to try and hack (which is awesome).

    For one of my usb adapters i need to apply patches found on the aircrack website (the program I am using to do the hacking)

    The only this is that I have not a clue how to do this.

    any walk through would be appreciated!

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    955
    You use the patch command. man patch will give you basic information on how to use it. Usually patch orig_file patch_file will do the trick. The original file is overwritten so you might want to use the -b option to create a safety backup.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Just Joined!
    Join Date
    May 2010
    Posts
    6
    So if the patch provided is on a webpage, do I want to copy the text and save it somewhere?

  4. #4
    Just Joined!
    Join Date
    May 2010
    Posts
    6
    I guess could someone just use an example...?

  5. #5
    Just Joined!
    Join Date
    May 2010
    Posts
    6
    Well today I have figured out how to get the patch and download it.

    I still need to move it somewhere. My issue is how to input this. what would the patch be called? and where would its default location be once i get it from a URL?

  6. #6
    Just Joined!
    Join Date
    May 2010
    Posts
    30
    to move a file the command is mv filename filedestination/name

  7. #7
    Just Joined!
    Join Date
    May 2010
    Posts
    6
    Alright, forgive my beginner question... I understand the mv command and cd... but it is recommended that I put the patch file in:
    /usr/src/linux or similar when patching kernel modules

    I cannot move it thought. Im on ubuntu 10.04 and I am trying mv <patch file>/usr/src/linux

    Thanks to everyone for helping

  8. #8
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    955
    You need to understand a little bit about file ownership and permissions. Every file and folder in Linux belongs to some user. You home folder and its contents belong to you and you can do what you like there. System folders like /usr/src/linux belong to the administrative user root and you do not have permission to work there unless you become root "for the duration"(which you usually do in Ubuntu by prefacing your commands with gksu). This is a security feature; it prevents anything you download from the Internet in your own name from screwing up your system, the way it does on Windows.

    As you have probably worked out by now, the stuff you download goes into your home directory tree, probably into a folder called Downloads or similar. It's best to do patching and building of kernels somewhere in your home folder and not in /usr/src/linux, despite what you may have read. That way you only need to be root when you install the kernel.

    There are plenty of people here who can walk you through the actual process if you give them enough information and show yourself willing to learn. Learning how to do it is half the fun of Linux.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...