Blocking websites using the hosts file
Janeiro 15, 2009 in Não classificado
Let’s say you want to block certain websites. Maybe to keep your kids off of myspace, for security reasons, or to block advertising from being loaded. You can do this by means of your hosts file. By modifying that little file, you can keep certain websites from being accessed from your computer. Here’s how to do it…
First of all, you must be logged in as a user with administrative privileges.
Then you need to open a text editor with administrative rights. Here’s a simple way to do it.
Hit ALT+F2 to open a ‘Run Application’ dialog box.
Type in… gksudo gedit /etc/hosts
Press Enter, & type in your password, and the file will open.
Add one line to the end of the file for each site you want to block, like this…
0.0.0.0 www.example.com
Note that there is a space between the 0.0.0.0 & the web site address. This will tell you computer to look for www.example.com at the ip address of 0.0.0.0. It won’t be there of course, and they won’t be able to get to the website. This can be done with any site, and with any number of sites. Just keep adding lines to that file. Once you’re finished modifying the file, click the Save button. The changes will take effect upon your next boot up, and the changes will affect every user on the computer. You can even find pre-made hosts file online that will block a lot of advertising that pops up while online.
Here’s what the file should look like if you want to block MySpace & Worldcat…
If you type a line that begins with a “#”, the computer will ignore that line, like my line “# Blocked web sites by How To Ubuntu”
Arquivos
Categorias
-
Posts Recentes
-
Flickr Photos

More Photos -
Os mais clicados
-
Entradas Mais Populares
UbuntuGeek- How to Configure Ubuntu desktop to use your proxy server
- Ubuntu Tip:How to Play VCD using VLC Player
- Install Java Runtime Environment (JRE) in Ubuntu 9.10 (Karmic)
- Howto Convert AVI to DVD ISO in Ubuntu
- Bazaar Explorer – Advanced Version Control Made Simple
- How to restore notifications Position in Ubuntu 9.10 as they did in Ubuntu 9.04
- Install Empathy in Ubuntu Jaunty/Intrepid/Hardy
- How to install sopcast player in Ubuntu 9.10(Karmic)
- Ubun-student – Easy way to install commonly used professional softwares in Ubuntu
- How to install vmware server 2.0.x in Ubuntu 9.10 (Karmic)
HowToForge- The Perfect Desktop - Ubuntu Studio 9.10
- CentOS 5.x Samba Domain Controller With LDAP Backend
- The Perfect Server - Ubuntu Karmic Koala (Ubuntu 9.10) [ISPConfig 2]
- Setting Up Gitosis On Ubuntu
- Set Up A Full-Featured Mail Server With iRedOS: MySQL, Postfix, Dovecot, ClamAV, SpamAssassin, RoundCube/SquirrelMail
- Newbie-Friendly Post-Installation Ubuntu Usability Setup Guide
- Squid - Delay Pools Bandwidth Management
- The Perfect Desktop - Ubuntu 9.10 (Karmic Koala)
- The Perfect Server - CentOS 5.4 x86_64 [ISPConfig 3]
- How To Upgrade Ubuntu 9.04 (Jaunty Jackalope) To 9.10 (Karmic Koala) (Desktop & Server)
- The Perfect Server - Ubuntu 9.10 [ISPConfig 3]
- Automatic Dialer With Asterisk And GNUDialer
- Virtual Hosting With Proftpd And MySQL (Incl. Quota) On Ubuntu 9.04
- The Perfect Server - CentOS 5.4 x86_64 [ISPConfig 2]
- Preparing An Ubuntu Machine For Upgrade
Exame Informática- TMN vai vender telemóvel compatível com PlayStation 3
- Ford vai estrear um cinto de segurança com airbag
- Call Of Duty: Modern Warfare 2 já mexe (vídeo)
- Microsoft vai lançar seis patches para Windows na terça
- Alcatel-Lucent mostra carro que se conecta a redes 4G
- Conheça os 10 piores produtos da Microsoft
- CyberMonday vai chegar a Portugal
- Analistas dizem que há excesso de produção de memória
- China anuncia olimpíadas de robôs humanóides para 2010
- Spotify diminui download ilegal de músicas
Slashdot Linux- Tired of Flash? HTML5 Viewer For YouTube
- How Google Uses Linux
- Ubiquiti Announces RouterStation Challenge Winners
- Ryan Gordon Ends FatELF Universal Binary Effort
- Mandriva Linux 2010 Is Finally Out
- On-Demand Video + CMS + Interactive Input For Museum?
- New Web-Based Netbook From Litl — Based On Clutter, Uncluttered
- Bug In Most Linuxes Can Give Untrusted Users Root
- Some Early Adopters Stung By Ubuntu's Karmic Koala
- Skype For Linux To Be Open-Sourced "In the Nearest Future"
- Installing Linux On Old Hardware?
- Ubuntu 9.10 Officially Released
- New DoD Memo On Open Source Software
- Comparing the Freedoms Offered By Maemo and Android
- Canonical Halts Ubuntu CD Free-for-all
LXer Linux News- Are Microsoft to blame for "hidden" malware costs and will Windows 7 make any difference?
- KDE, one year later
- The Perfect Server - Ubuntu Karmic Koala (Ubuntu 9.10) [ISPConfig 2]
- What To Do When keyserver.ubuntu.com Is Down?
- Amahi Linux Home Server 4.2
- Transitions in an open source software project
- If Windows, Linux and OSX Opened Cafes...
- The next document I put together will be done with LyX
- 3 Easy ways to try out Linux
- Michael Geist: The ACTA Internet Chapter: Putting the Pieces Together
Linux Today- Amahi Linux Home Server 4.2
- Matthias Ettrich Receives German Federal Cross of Merit
- Using Windows Is Like...
- Installing Ubuntu 9.10
- Hands-on: OpenMoko WikiReader is simple, appealing
- Perl far from dead, more popular than you think
- Microsoft Exchange alternatives
- Kubuntu 9.10: A Mixed Bag
- Could Microsoft switch to Linux?
- Red Hat Virtualization Manager for Windows Only?
- Creating Ebooks with Sigil
- Editor's Note: Making Multi-Channel Firewire Music With Linux
- Amaya: A Simple, Yet Useful Alternative to Dreamweaver
- Windows 7 Sales Up, But is it Really a Hit?
- Over clocking intel i7 on a Gigabyte EX58-Extreme
NoticiasLinux.com.br- Tchelinux 2009 Porto Alegre
- Canonical certifica Solis para suporte em Ubuntu
- Alien Arena 2009 disponibilizado no repositório Livre SO
- Análise: 24 horas saboreando o Mandriva 2010
- Yahoo! doa seu Traffic Server à Fundação Apache
- Encontro Nacional do GITEC (Grupo Interlegis de Tecnologia)
- Primeiro Ubuntu Day e Install Fest de Ilha Solteira - SP
- Skype para Linux será open source
- Mandriva 2010 final já disponível
- Brasília registra maior evento de TI para Municípios
- Mahara 1.1.7 Stable disponível para download
- Barra de Ferramentas BrOffice.Org
- CodePlex Foundation
- Sistemas open source recebem apoio oficial do Departamento de Defesa dos EUA
- LinuxNoPC disponibiliza versão modificada do Ubuntu 9.10
Linux Format- Ocorreu um erro. é provável que o feed esteja indisponível. Tente mais tarde.
Viva o Linux- Escolhendo drivers para antigas placas de vídeo
- Wayland, um servidor gráfico não-X muito interessante
- Criação de um repositório (mrepo) - Red Hat e CentOS 5 (com atualização na RHN para RedHat)
- Nagios + MySQL no Debian
- Iniciando Ubuntu 9.10 sem tela de login
- Adobe Flash Player para Firefox 3.5.4 no BRLix
- Proxy com autenticação na linha de comando
- Personalizando o sidux, agregando repositórios e alguns aplicativos criticos
- Criando listas individuais para cada instância da mesma classe em Python
- Problema de vídeo ao instalar o Debian 5 em notebook intelbras i21
- Autenticando máquinas Windows 7 no Samba
- OpenVPN: Arquivo de configuração do openvpn na Filial (filial.conf)
- OpenVPN: Arquivo de configuração do OpenVPN na matriz (matriz.conf)
- Configurando redes virtuais no Debian
- Lista de servidores compatíveis com OpenBSD
Tectonic- Final days: Tectonic to close
- LPI approves new training partner in SA
- Cloud computing to drive open source
- Ubuntu releases second alpha of Karmic Koala
- KDE 4.3 beta 2 released for testing
- Fedora 11 roars with potential
- Google releases Linux, Mac versions of Chrome browser
- KDE ships 4.2.4 update release
- Jumping Bean releases updated version of OpenBill
- Ubuntu, PCLinuxOS get new mags
TuxArena- How-To: Install Exaile 3.0.1 in Ubuntu 9.04 Jaunty Jackalope
- Flagfox: Firefox Add-on to Show the Country of the Current Server
- How-To: Install Amarok 2.2 Beta 1 from the Kubuntu Beta Backports
- How-To: Install OpenOffice.org 3.1.1 in Ubuntu 9.04 Jaunty Jackalope
- New Version of Skype Released with PulseAudio Support and Numerous Improvements
- 7 Reasons to Use Debian
- ChatZilla: Powerful IRC Client for Firefox
- Top 7 Xfce Applications
- How-To: Install Pidgin 2.6.1 in Ubuntu 9.04 Jaunty from a Launchpad PPA
- How-To: Install RSSOwl 2.0 in Ubuntu 9.10 Karmic and 9.04 Jaunty
- Install Hive Rise in Ubuntu - Free RTS Game for Linux
- How-To: Compile and Install Wine 1.1.28 in Debian Lenny
- World of Padman: Open-Source First-Person Shooter Game for Linux
- 5 RSS Feed Readers for Linux
- Tip of the Day: Run a C Program Directly
Linux para Todos
Linux na Rede- Usuários do Linux são os que mais fazem buscas no Google
- KDE substituirá Gnome como desktop padrão do openSUSE
- Moonlight, o Silverlight para Linux, ganha atualização
- Panasonic e NEC revelam 9 celulares com Linux
- Microsoft libera 20 mil linhas de códigos para o Linux
- MS e Linux são nomeadas por 'pior resposta' a falha
- Linux leve dá acesso à web e multimídia em 30 segundos
- Chrome para Linux emperrado?
- Google trabalha com Asus, Acer, HP e Toshiba por seu SO
- VALVe distribuirá seu primeiro jogo para Linux em Julho?
Tips4Linux- Get rid of OpenOffice.org’s logo in Linux
- Greatly improve the speed of Firefox 3
- Change your MAC address in Linux
- Use the same GTK theme for applications started as root
- Disable NTP sync during USplash in Ubuntu Linux
- Disable the Linux screen blanking
- Play videos packed in RAR without extracting them in Linux
- Enable Flash support in Google Chrome for Linux
- Find out your router’s external IP address using the Linux command line
- Mount Windows shares like normal drives in Linux
MyToughts
Jonny Zone- Recovering BIOS Password
- Creating an error number table
- Soldering BGA chips
- Hacking linux kernel to bypass platform ID
- Hacking Linux Kernel printk to show early messages
- Debugging The Linux Kernel
- Transfering file to U-Boot over serial
- U-Boot Error: undefined reference to `eth_send’
- Removing password from PDF files
- Webkit error: webkit/@basename@: No >>>> such file or directory >>>>
MakeUseOf.com- How To Add A Successful Amazon Store To Your Blog
- How To Convert Delimited Text Files To Excel Spreadsheets
- Browse Nikon Images On Your iPhone With Nikon’s Learn & Explore
- Top 8 Websites With Cool Free Tests That Measure Your Personality Traits
- 6 Ways To Set Up Dual Monitors To Be More Productive
- How To Easily Download YouTube High Definition Videos
- How To Improve Your iCal Calendars With FlexCal [Mac Only]
- Cool Websites and Tools [November 7]
- 5 Ways to Protect & Hide Your Email to Stop Receiving Spam
- 3 Best Sites To Download Free Funny Voicemail Messages
- Use Your Google Apps Domain To Make Short URL’s
- MedHelp – A Mental & Physical Fitness Log To Monitor & Analyze Your Health
- 3 Great Sites To Get The Truth On MLM Pyramid Schemes
- 10 Cool Innovative Linux Wallpapers For Ubuntu Users
- Personalize Your News With Custom Sections In Google News
- Cool Websites and Tools [November 6]
- Quiet Read Saves Weblinks For Later Reading [Mac]
- The 3 Useful Office Apps To Reduce Your Paperwork
- How To Connect Your Nintendo Wii Console To The Internet
- Read 650 Magazines Online for Free With Maggwire
UbuntuGeek- How to Configure Ubuntu desktop to use your proxy server Novembro 8, 2009
- Ubuntu Tip:How to Play VCD using VLC Player Novembro 7, 2009
- Install Java Runtime Environment (JRE) in Ubuntu 9.10 (Karmic) Novembro 7, 2009
HowToForge- The Perfect Desktop - Ubuntu Studio 9.10 Novembro 8, 2009
- CentOS 5.x Samba Domain Controller With LDAP Backend Novembro 6, 2009
- The Perfect Server - Ubuntu Karmic Koala (Ubuntu 9.10) [ISPConfig 2] Novembro 5, 2009
- Setting Up Gitosis On Ubuntu Novembro 5, 2009
- Set Up A Full-Featured Mail Server With iRedOS: MySQL, Postfix, Dovecot, ClamAV, SpamAssassin, RoundCube/SquirrelMail Novembro 4, 2009
- Newbie-Friendly Post-Installation Ubuntu Usability Setup Guide Novembro 3, 2009
- Squid - Delay Pools Bandwidth Management Novembro 3, 2009
- The Perfect Desktop - Ubuntu 9.10 (Karmic Koala) Novembro 2, 2009
- The Perfect Server - CentOS 5.4 x86_64 [ISPConfig 3] Novembro 1, 2009
- How To Upgrade Ubuntu 9.04 (Jaunty Jackalope) To 9.10 (Karmic Koala) (Desktop & Server) Outubro 30, 2009
Exame Informática- TMN vai vender telemóvel compatível com PlayStation 3 Novembro 6, 2009
- Ford vai estrear um cinto de segurança com airbag Novembro 6, 2009
- Call Of Duty: Modern Warfare 2 já mexe (vídeo) Novembro 6, 2009
- Microsoft vai lançar seis patches para Windows na terça Novembro 6, 2009
- Alcatel-Lucent mostra carro que se conecta a redes 4G Novembro 6, 2009
- Conheça os 10 piores produtos da Microsoft Novembro 6, 2009
- CyberMonday vai chegar a Portugal Novembro 6, 2009
- Analistas dizem que há excesso de produção de memória Novembro 6, 2009
- China anuncia olimpíadas de robôs humanóides para 2010 Novembro 6, 2009
- Spotify diminui download ilegal de músicas Novembro 6, 2009
Slashdot- Tired of Flash? HTML5 Viewer For YouTube
- How Google Uses Linux
- Ubiquiti Announces RouterStation Challenge Winners
- Ryan Gordon Ends FatELF Universal Binary Effort
- Mandriva Linux 2010 Is Finally Out
- On-Demand Video + CMS + Interactive Input For Museum?
- New Web-Based Netbook From Litl — Based On Clutter, Uncluttered
- Bug In Most Linuxes Can Give Untrusted Users Root
- Some Early Adopters Stung By Ubuntu's Karmic Koala
- Skype For Linux To Be Open-Sourced "In the Nearest Future"
LXer – Linux News- Are Microsoft to blame for "hidden" malware costs and will Windows 7 make any difference?
- KDE, one year later
- The Perfect Server - Ubuntu Karmic Koala (Ubuntu 9.10) [ISPConfig 2]
- What To Do When keyserver.ubuntu.com Is Down?
- Amahi Linux Home Server 4.2
- Transitions in an open source software project
- If Windows, Linux and OSX Opened Cafes...
- The next document I put together will be done with LyX
- 3 Easy ways to try out Linux
- Michael Geist: The ACTA Internet Chapter: Putting the Pieces Together
- This week at LWN: KS2009: How Google uses Linux
- Gain Space By Removing The Maximized Windows Titlebar [With Compiz or Maximus]
- ABI's Jeffrey Orr on rising Linux netbook sales
- Google Provides Closure: Releases Open Source JavaScript Optimizer
- Build Your Own Custom Ubuntu Live CD
NoticiasLinux.com.br- Tchelinux 2009 Porto Alegre Novembro 7, 2009
- Canonical certifica Solis para suporte em Ubuntu Novembro 7, 2009
- Alien Arena 2009 disponibilizado no repositório Livre SO Novembro 5, 2009
- Análise: 24 horas saboreando o Mandriva 2010 Novembro 5, 2009
- Yahoo! doa seu Traffic Server à Fundação Apache Novembro 5, 2009
- Encontro Nacional do GITEC (Grupo Interlegis de Tecnologia) Novembro 5, 2009
- Primeiro Ubuntu Day e Install Fest de Ilha Solteira - SP Novembro 5, 2009
- Skype para Linux será open source Novembro 4, 2009
- Mandriva 2010 final já disponível Novembro 4, 2009
- Brasília registra maior evento de TI para Municípios Novembro 4, 2009
- Mahara 1.1.7 Stable disponível para download Novembro 4, 2009
- Barra de Ferramentas BrOffice.Org Novembro 4, 2009
- CodePlex Foundation Novembro 3, 2009
- Sistemas open source recebem apoio oficial do Departamento de Defesa dos EUA Novembro 3, 2009
- LinuxNoPC disponibiliza versão modificada do Ubuntu 9.10 Novembro 2, 2009
Tectonic- Final days: Tectonic to close Julho 7, 2009
- LPI approves new training partner in SA Julho 7, 2009
- Cloud computing to drive open source Julho 6, 2009
- Ubuntu releases second alpha of Karmic Koala Junho 12, 2009
- KDE 4.3 beta 2 released for testing Junho 10, 2009
- Fedora 11 roars with potential Junho 10, 2009
- Google releases Linux, Mac versions of Chrome browser Junho 5, 2009
- KDE ships 4.2.4 update release Junho 3, 2009
- Jumping Bean releases updated version of OpenBill Junho 2, 2009
- Ubuntu, PCLinuxOS get new mags Junho 1, 2009
TuxArena- How-To: Install Exaile 3.0.1 in Ubuntu 9.04 Jaunty Jackalope Setembro 11, 2009
- Flagfox: Firefox Add-on to Show the Country of the Current Server Setembro 11, 2009
- How-To: Install Amarok 2.2 Beta 1 from the Kubuntu Beta Backports Setembro 6, 2009
- How-To: Install OpenOffice.org 3.1.1 in Ubuntu 9.04 Jaunty Jackalope Setembro 5, 2009
- New Version of Skype Released with PulseAudio Support and Numerous Improvements Agosto 31, 2009
- 7 Reasons to Use Debian Agosto 30, 2009
- ChatZilla: Powerful IRC Client for Firefox Agosto 30, 2009
- Top 7 Xfce Applications Agosto 24, 2009
- How-To: Install Pidgin 2.6.1 in Ubuntu 9.04 Jaunty from a Launchpad PPA Agosto 24, 2009
- How-To: Install RSSOwl 2.0 in Ubuntu 9.10 Karmic and 9.04 Jaunty Agosto 23, 2009
- Install Hive Rise in Ubuntu - Free RTS Game for Linux Agosto 23, 2009
- How-To: Compile and Install Wine 1.1.28 in Debian Lenny Agosto 23, 2009
- World of Padman: Open-Source First-Person Shooter Game for Linux Agosto 23, 2009
- 5 RSS Feed Readers for Linux Agosto 23, 2009
- Tip of the Day: Run a C Program Directly Agosto 23, 2009
Linux para Todos- Instalando o Chromium, versão opensource do Google Chrome, no Ubuntu Novembro 6, 2009
- Compartilhe seus conhecimentos com a gente! Novembro 4, 2009
- Lançado Ubuntu 9.10 Karmic Koala Outubro 30, 2009
- Solucionando Problemas com o Teclado Virtual do Banco do Brasil no Ubuntu Outubro 26, 2009
- Particionamento manual no Ubuntu Outubro 25, 2009
- Tutorial Multimedia – Ubuntu Karmic Koala 9.10 Outubro 22, 2009
Linux na Rede- Usuários do Linux são os que mais fazem buscas no Google Agosto 24, 2009
- KDE substituirá Gnome como desktop padrão do openSUSE Agosto 24, 2009
- Moonlight, o Silverlight para Linux, ganha atualização Agosto 24, 2009
- Panasonic e NEC revelam 9 celulares com Linux Agosto 24, 2009
- Microsoft libera 20 mil linhas de códigos para o Linux Julho 24, 2009
- MS e Linux são nomeadas por 'pior resposta' a falha Julho 24, 2009
- Linux leve dá acesso à web e multimídia em 30 segundos Julho 9, 2009
- Chrome para Linux emperrado? Julho 9, 2009
- Google trabalha com Asus, Acer, HP e Toshiba por seu SO Julho 9, 2009
- VALVe distribuirá seu primeiro jogo para Linux em Julho? Junho 19, 2009
Linux Format- Ocorreu um erro. é provável que o feed esteja indisponível. Tente mais tarde.
Tips4Linux- Get rid of OpenOffice.org’s logo in Linux Outubro 23, 2009
- Greatly improve the speed of Firefox 3 Setembro 29, 2009
- Change your MAC address in Linux Setembro 26, 2009
- Use the same GTK theme for applications started as root Setembro 1, 2009
- Disable NTP sync during USplash in Ubuntu Linux Agosto 30, 2009
- Disable the Linux screen blanking Agosto 22, 2009
- Play videos packed in RAR without extracting them in Linux Agosto 21, 2009
- Enable Flash support in Google Chrome for Linux Agosto 20, 2009
- Find out your router’s external IP address using the Linux command line Agosto 15, 2009
- Mount Windows shares like normal drives in Linux Agosto 12, 2009
MyThoughts- 民主党政権誕生先の衆院選で、自民党が惨敗し民主党の過半数得票が確定した翌朝、なんだか悪い夢を見ているような気持ちで新聞やウェブのニュースを読みました。いえ、読めませんでした。タイトルをながめるのがやっとでした。もうとうに、政治に関する記事を新聞やニュースサイトで読むのを止めていました。憶測と扇動の繰り返しで、真実が無いからです。日が経つにつれ、閣僚の人事のニュースなどが報道されました。悪い冗談の様に思えて仕方がありませんでした。やがて天皇陛下による親任式と、後に続く認証式も終わり、日曜の政治家が出演する番組に、新閣僚となったかつての野党、野次党の人々が顔を並べ、これまでの、夢の中で雲をつかむような話ではなく、現実に対処しようとして発言に腐心するのを見たとき、私も認識を改めなければならないのだと自覚しました。日本政府は変わって […]
- Who are you talking to ? 誰に語りかけていますか?There are some nice blogs. I love to visit them. They have nice words. They are not soliloquies. I wonder who the editors are talking to. I want to make my blog like them.好きなブログがいくつかあります。素敵な人柄が伝わってくるような、いい文が書かれています。そのどれもが、「ひとりごと」じゃないんです。語りかける口調なんです。よく思います。「誰に向けて書いているのかしら?」もちろん、読んでくれる方へ向けてですよね。でも、まったくの不特定多数という集団に対して、とは思えないんです。どんな気持ちで書いているのかしら。私も、もちろん読んでくれる方へ向 […]
- Picture of profile プロフィール写真I'd like to change my picture of profile. What can I do?プロフィールの写真を変えたくなりました。どうしようかな…。新しく、自分を撮影しようかな?
- Cleaning blogs ブログの整理整頓The last upload here was 6 months ago. I have been too busy to maintain my two blogs but I love to upload my thoughts here. It makes me blue.ここで最後に更新したのは6ヶ月も前になりました。2つのブログを維持していくのには、忙しすぎました。でも、こうして読んでいただくのはとても嬉しいことなんです。だから、毎日つらかったです。I decided to keep my blogs simple. I think it is good for persons who visit my blogs and me myself.ブログを維持するにあたり、以前のように内容ごとに同時にい […]
- 民主党政権誕生
Nuvem de Categorias

One Reply
[...] Here’s how you can do it too: Windows | OSX | Linux [...]