Profile file, cwd


In the profile file we create, for example the statement:

  • [sh, ‘-c’, ‘sudo -u ubuntu rosdep update’]

how can I execute something as user ubuntu, at working directory lets say /home/ubuntu/catkin_ws

I want to cd into a dir, and then execute catkin_make basically.

Best Regards,

Hi Can,
Have you ever visited well documented page which mentions cloud-init and configuration options.

Hello Cem,

Yes indeed, I started my lxd setup reading simos’s blog.

Let me rephrase my question: in a cloud-init file, how can I execute a command, with a working directory?

Best Regards,

 - cd /blah && do something

Should work fine.

If not, then the rather uglier sh -c "cd /blah && do something" should work.