1

I'm running Ubuntu/CentOS in a virtualbox guest and am trying to configure various services to run on it (nginx, php, memcache and more). I'm finding it slow to use the console editors and hard to remember file locations, as well as the chore of typing out their full file-folder names all the time.

I'd like to be able to navigate and edit system files and folders from my windows environment using the editors I use day to day: notepad++, webstorm etc. Mainly so I can familiarise myself with the contents of various folders in a visual way (albeit a small difference).

Essentially, I guess I'm asking if there is a way to directly access the guest filesystem as root or a sudoer. So, is there some way I can set up my guest ubuntu server and then navigate it's filesystem from windows? Or do I have to install a GUI in my guest and use that instead? (this is frowned upon, so I hear). I expect to serve most of my website content from a shared folder for development purposes, so config files and things could be in a shared directory, but obviously there are many other system folders I'd need to have access to as well, such as /etc, /var, /opt, /usr, ...

closed as too broad by Thomas Dickey, cuonglm, MelBurslan, Anthon, Archemar Mar 31 '16 at 6:55

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • This is not easily possible, as far as I know. But it seems you want to do this out of a desire to avoid using Linux tools. But there many editors on Linux. Some of them are quite like the Windows ones you are used to. Have you explored the options? – Faheem Mitha Mar 31 '16 at 1:36
  • 1
    You could use NFS or samba to export (all or part of) the guest fs, and mount it on the windows host as a network file share. but I'd follow @FaheemMitha's advice if i were you. If you're running a GUI desktop environment on your ubuntu guest, you can use the graphical file browser it provides. Otherwise, you could use a text mode file browser like Midnight Commander aka mc. – cas Mar 31 '16 at 1:55
  • That's a really bad idea, editing Linux OS/config files on Windows. – Tim S. Mar 31 '16 at 5:52
  • Is the VM running while you're doing it? (Otherwise, this question turns into "how do I access the contents of a vmdk or similar") – Ulrich Schwarz Mar 31 '16 at 6:01
  • 1
    BTW, use putty on windows to ssh into your VM and you won't be limited to 80 character wide terminals. Make your putty terminal as wide as will fit on your screen, in whatever (mono-spaced) font and font-size you prefer. – cas Mar 31 '16 at 21:56
3

If your host is Windows, you can use Samba to share files from the client with the host. However, you should not edit any configuration files using the host's tools, as they might look the same after editing, but will most likely get newlines inserted.

If you have trouble editing files with vi, use something mode-less like nano or emacs for editing.

On the other hand there is nothing that speaks against running a graphical interface on a VM client (assuming the memory overhead is acceptable on the machine). But beware that editing configuration files most often still needs to be done as root. Once you have a graphical interface you can browse your filesystem with the same ease as you do on the host.

  • Thanks, Anthon. As per my comments above, I have used nano and vim, but I find them much harder to use than windows/mac gui editors (none of my shortcuts work!). I use gedit on non-server Ubuntu guests, but I've been told not to install GUIs on servers, so I assume that's not an option. – Astravagrant Mar 31 '16 at 13:20
  • 1
    As I indicated, there is overhead in running GUI. You can however install X and a desktop and only start it when you need it. I don't see any problem with that on a server. In fact that is better than mangling some configuration file because of user-unfriendliness/inexperience. But that is just what my 32 years of running Unix/Linux servers tells me. – Anthon Mar 31 '16 at 13:35
  • That sounds like an ideal solution! I'll give that a try. If you happen to have a link to some good guidance on it, I'd appreciate it. Thanks, dude. – Astravagrant Mar 31 '16 at 13:49
  • 1
    Setup a new VM with a graphical user interface to experiment with. Deactivate the display-mananger service (sudo systemctl disable display-manager) reboot the VM and see if that indeed stops the graphs from starting. Check that X is not in the process list. Then start with sudo systemctl start display-manager. Sorry I have no links with a step by step guide, but that is how I would proceed. Once that works, install the relevant packages on your CentOS server VM and repeat the deactivation there. – Anthon Mar 31 '16 at 14:13
  • That's really useful, thankyou so much, Anthon. I really appreciate it! :) – Astravagrant Apr 1 '16 at 12:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.