LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-28-2011, 05:45 PM   #1
Firefox54
Member
 
Registered: Apr 2011
Distribution: #!
Posts: 65

Rep: Reputation: Disabled
Will switching to linux make virus stop working


I have a windows computer that has a virus on it. This computer isn't worth much so I don't want to get a virus program to clear it. I know the virus probably won't be able to crash the linux OS, but will it be able to transfer itself to flash drives if I am running linux?
 
Old 04-28-2011, 05:52 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Linux is not susceptible to Window's viruses, it will have no effect.
 
Old 04-28-2011, 05:57 PM   #3
Firefox54
Member
 
Registered: Apr 2011
Distribution: #!
Posts: 65

Original Poster
Rep: Reputation: Disabled
I know the virus won't be able to crash the computer is it has linux on it. But since both windows and linux are both written in C, and lots of windows programs are linux compatible, will it be able to move itself to an external drive?
 
Old 04-28-2011, 06:00 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046
No, it won't be able to do that. Regardless of the programming language, Windows and Linux are not compatible. Windows programs, and a virus written for Windows is a Windows program, are not running natively under Linux. You need an emulation layer, like wine to run Windows programs, and not all programs will run.

By the way, you don't need to spend money to get an antivirus program for Windows, there are many free versions out there.
 
Old 04-28-2011, 06:18 PM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You need to be careful about not transferring infected files from Linux to Windows.

For example, a pdf file, containing an exploit against windows, saved on a samba share, could infect a windows box if a Windows user opened it.

Don't repeat bad windows habits in Linux. Don't run as root for example. The system directories in Linux aren't user writable, and programs are designed assuming that. Don't share your entire system. Only have shares for directories you want to share.

Keep your system updated.

Use strong passwords, including for devices such as modems.

Some exploits have nothing to do with your OS. For example, if you use the same password for GMail and Facebook, an exploit of one, will lead to an exploit of another.

Last edited by jschiwal; 04-28-2011 at 06:50 PM.
 
Old 04-28-2011, 06:40 PM   #6
Firefox54
Member
 
Registered: Apr 2011
Distribution: #!
Posts: 65

Original Poster
Rep: Reputation: Disabled
Thank y'all for clarifying
 
Old 04-29-2011, 08:49 AM   #7
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
The fact that they're written in C doesn't matter at all. No matter what language you write it in, it's all the same kind of machine code once you compile it.

It's the system calls that matter. Windows programs CANNOT run in Linux, the system calls are not compatible in any way whatsoever. Also, Linux uses a different file format to store executables.

Last edited by MTK358; 04-29-2011 at 08:51 AM.
 
Old 04-30-2011, 12:20 PM   #8
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,229

Rep: Reputation: 173Reputation: 173
Quote:
Don't repeat bad windows habits in Linux. Don't run as root for example. The system directories in Linux aren't user writable, and programs are designed assuming that. Don't share your entire system. Only have shares for directories you want to share.

Keep your system updated.

Use strong passwords, including for devices such as modems.
LOL I always run my system as root, seldom update and use weak passwords on many things.
Never have been security minded though nothing bad has happened yet on Windows or Linux.

@the OP
There is practically no way a windows virus with windows system calls will run on linux without emulation or call translation.
 
Old 04-30-2011, 02:24 PM   #9
Arcane
Member
 
Registered: May 2006
Location: Latvia, Europe
Distribution: random
Posts: 287

Rep: Reputation: 164Reputation: 164
Quote:
Will switching to linux make virus stop working?
Answer is - NO. Windows virus will still work(if you will activate it giving proper environment) but won't affect Linux system(unless it's Linux virus). Btw: If you won't execute it in windows it won't work there either. Viruses need PEBKAC approoval to work(crackers who brake in system just force give that permission but even they can't do crap without giving permission to file they want to use).
Linux is safe because
1)It's unpopular so far so people don't have interest making viruses for it that much - please don't tell me story that it's 100% safe. Even openBSD had those 2 and MAC was hacked and would be more proof if someone really really wanted or needed. Anything one person has made other can brake(hack).
2)It comes with limited user by default - if you use limited(or guest) on windows they won't affect system even if you executed them just maybe mess your documents and thats it(thats why backups are important). Please try using root on Linux and then tell how it's safe..

Last edited by Arcane; 04-30-2011 at 02:26 PM.
 
Old 04-30-2011, 05:20 PM   #10
jefro
Guru
 
Registered: Mar 2008
Posts: 11,549

Rep: Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405Reputation: 1405
One of the problems is the you are getting virus's in the first place. Until you correct that you may be as subject to data loss in linux as you are in windows. A lot of people feel their data is secure in linux because they don't have what seems to be a virus. Basically no OS is secure.

In either case you need to learn and use as many "best practices" as possible to help secure your system.
 
Old 04-30-2011, 05:42 PM   #11
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,229

Rep: Reputation: 173Reputation: 173
And backup your data.
 
  


Reply

Tags
virus, windows


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do Linux Anti-Virus Packages Make a Difference? cmnorton Linux - Server 1 03-11-2008 11:42 AM
How to stop screen switching off?? little_penguin Suse/Novell 5 03-22-2005 09:37 AM
will old monitor stop graphics from working, slow it down, make things blurrie? toastermaker Linux - Hardware 1 03-08-2004 10:43 PM
Linux Is Beeping!!! Make It Stop! Sathe Linux - General 10 01-25-2002 11:12 AM


All times are GMT -5. The time now is 09:23 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration