[SOLVED] Will switching to linux make virus stop working
Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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?
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?
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.
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.
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.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 2,094
Rep:
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.
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..
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.