element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum How to edit /boot/config.txt?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 5 replies
  • Subscribers 665 subscribers
  • Views 7126 views
  • Users 0 members are here
  • boot_config
  • rasp-pi
  • tft display
  • raspberry_pi
  • config_txt
Related

How to edit /boot/config.txt?

shantimohan
shantimohan over 7 years ago

I was trying to connect a 7" LCD display panel to Raspberry PI 2. Nothing is displayed. The manual says to edit /boot/config.txt file.Logged in as user 'pi', I am not able to edit it. How to edit this file?

  • Sign in to reply
  • Cancel
Parents
  • rew
    rew over 7 years ago

    The file is located in /boot. So I would recommend to type

         cd /boot

     

    first. Then you can edit the file:

         nano config.txt

    however, the permissions on that file do not allow the "pi" user to change it. You'll be in read-only mode, you cannot save changes back to the file you started with. So you'll have to run the edit(nano) command as root with the sudo command:

         sudo nano config.txt

     

    That should do it.

    I should've answered: "Look buddy, doesn't work is an ambiguous statement. Does it sit on the couch all day? Is it unemployed? Please be specific! Define 'it' and what it isn't doing."

     

    Linux is better than windows in that it usually gives you a hint as to what is wrong. On Windows you get a "can't display website" message when something goes wrong with displaying a website. The cause could be "out of memory on the local system", "the local system cannot do any networking at all", "something went wrong with looking up the IP address for the name you gave", "some router on the internet says that it SHOULD know how to forward the packets to the requested destination, but at the moment, cant forward it...." or "the remote host is up, can be reached, but there is no webserver running". On Linux all these give a different message and so you know who to contact about your problem, or if it is "out of your control, try again later is the only option".

     

    So when you "can't edit the file", it would be useful if you told us what you tried and if you got an error message or something like that.

     

    (The reason I say to cd into the right directory is that if things go wrong, I hope to get feedback  that the cd already goes wrong. That would usually indicate a mis-typing of "/boot", most likely the wrong slash ( \ vs / ) .)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • rew
    rew over 7 years ago

    The file is located in /boot. So I would recommend to type

         cd /boot

     

    first. Then you can edit the file:

         nano config.txt

    however, the permissions on that file do not allow the "pi" user to change it. You'll be in read-only mode, you cannot save changes back to the file you started with. So you'll have to run the edit(nano) command as root with the sudo command:

         sudo nano config.txt

     

    That should do it.

    I should've answered: "Look buddy, doesn't work is an ambiguous statement. Does it sit on the couch all day? Is it unemployed? Please be specific! Define 'it' and what it isn't doing."

     

    Linux is better than windows in that it usually gives you a hint as to what is wrong. On Windows you get a "can't display website" message when something goes wrong with displaying a website. The cause could be "out of memory on the local system", "the local system cannot do any networking at all", "something went wrong with looking up the IP address for the name you gave", "some router on the internet says that it SHOULD know how to forward the packets to the requested destination, but at the moment, cant forward it...." or "the remote host is up, can be reached, but there is no webserver running". On Linux all these give a different message and so you know who to contact about your problem, or if it is "out of your control, try again later is the only option".

     

    So when you "can't edit the file", it would be useful if you told us what you tried and if you got an error message or something like that.

     

    (The reason I say to cd into the right directory is that if things go wrong, I hope to get feedback  that the cd already goes wrong. That would usually indicate a mis-typing of "/boot", most likely the wrong slash ( \ vs / ) .)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • shantimohan
    shantimohan over 7 years ago in reply to rew

    Sorry, if I annoyed you...

     

    But I didn't say "it doesn't work". I said "I am not able to edit". Also asked "How can I edit it". Since the Linux is better than Windows an expert will know that one can't edit as 'pi' and one has to assume 'su' role. That's what Dave did. Thanks to him.

     

    Generally, when I am trying to help, I try to extract from the question what he would have done. If something is not clear I will ask for the details. My attitude is to help.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube