ANS Documentation

Improve This Doc
  • Cloud
  • Domains and DNS management
  • Backup and High Availability
  • eCommerce Stacks
  • Security
  • Email
  • Monitoring and usage management
  • Networking
  • Operating systems
    • Linux
      • Basics
      • Apache
      • Control Panels
      • FTP
      • Magento
      • Miscellaneous
      • MySQL
      • NGINX
      • PHP
      • PHP-FPM
      • Setting up Websites
      • NFS
      • VPN
      • Percona
      • SSH
      • SSL
      • Git
      • Redis
      • Elasticsearch
      • MongoDB
      • Ncdu
    • VMware ESXi
    • Windows
  • Webcelerator
  • MyUKFast
  • Home >
  • Operating systems >
  • Linux >
  • Miscellaneous >
  • The sed command

The sed command¶

sed is a stream editor, and it can be used to edit text files, with its most common use being to replace occurrences of words in a files. This is extremely helpful in situations where a configuration file has a lot of instances of the same word that needs replacing throughout the file.

For example if you were to copy a configuration to use for a new site and wanted to replace all instances of the original domain with the new domain then you could use this command. The example below replaces all instances of ukfast.co.uk with ukfast.net and

sed 's/ukfast.co.uk/ukfast.net/g' ukfast.co.uk.conf > ukfast.net.conf

Next Article > The grep command

  • Solutions
  • Managed Cloud
  • Azure Managed Services
  • AWS Managed Services
  • Dynamics 365
  • Private Cloud
  • Low-code Platform
  • Managed Security
  • Data and AI
  • Channel
  • About ANS
  • Our Company
  • Our Partners
  • Our UK Data Centres
  • ANS Reviews
  • Insights
  • Careers
  • Careers
  • Open Roles
  • Why work at ANS
  • Life at ANS
  • Apprenticeships
  • Get in touch
  • Sales 0800 458 4545
  • Support 0800 230 0032
  • Support
  • Get in touch
  • ANS Glass Login
  • Press & Media Enquiries

© ANS Group Limited | Terms and Conditions | Corporate Guidance | Sitemap
ANS Group Limited, registered in England and Wales, company registration number 03176761, registered office 1 Archway, Birley Fields, Manchester M15 5QJ