I am learning command top, know how to change color and columns mod, switch from one mode to another. After closing top's window and running again, all comes to default configuration – 4 default modes of columns and colors . Is there any way to save changes befor closing top's window.
Linux command top: saving configuration
configurationlinuxtop
Related Solutions
Package managers are not really effective for configuration managment for a few reasons:
- Most packages contain a configuration when installed, so you'd have to make custom packages that have them removed.
- Package managers work under the assumption that the package installs a basic configuration that can be changed within the system. So if a package is reinstalled/upgraded, it usually prompts the user on what to do with the modified file (which is not an ideal behavior for a configuration manager).
- Package manager do not test the system against the package contents usually, and although some have that option, it's not efficient as it's not a feature that is often used.
- A package life-cycle is more complex and longer than most of the automated configuration tools, so it's more work to maintain such a setup.
- Package managers do not care about order of installation so if you have a case of package dependency of
a->b->c
and you have package c installed already and you install package a, package c will not be reinstalled and packages a and/or b may overwrite c's configuration.
If you insist on using package managers to maintain configurations, I'd suggest you'll check the option of using a standalone configuration management system like puppet or chef in their standalone mode with a package for their configuration, this way you'll have all of your configuration in a single versioned package but in a way that does not require the package manager to manage the configurations on disk, which can lead to problems as I listed and probably some more.
To clarify, it should be possible to do what you planned, just the package manager is not the ideal tool for this.
It sounds like creating targets in systemd, and possibly storing /etc/ in git would create something akin to what you want. Change target, switch git branch, you might want to have an intermediary target that disables most services before switching everything.
Best Answer
Once you have your configuration set the way you want, type
W
(that is a capital W) and your configuration will be saved.From the
top
manpage: