0

How far can you go with CLI? What sort of tasks can I automate? I would like to create automated scripts for home use for example I open up a terminal enter webbashexecute and then 5 web pages will open in one browser window in 5 tabs? Also is it possible to lock down folders and only allow access through entering a password in the CLI? or even create a script to hide a full folder which can only be accessed through the CLI?

What am really asking is how far can you go with the CLI what other none development tasks can you automate?

Also I work in software testing so I often use the CLI but to run commands that others have built. If you create a script to automate something doesn't that mean anyone could easily access it through the GUI and edit it in notepad? I would like to create hidden scripts that are only accessible through the CLI and not the UI is this possible?

Thanks,

1 Answers1

1

You are asking a whole lot of questions in one here. I'll try to address them all:

What can you do with the CLI?

In any unix-like system, including Ubuntu and other Linux distributions, the command-line is much more capable than the GUI. The GUI is simply a pretty layer on top. So you can be pretty sure that anything that is possible with the GUI will be possible with a command-line script (though it may be complex to do).

Opening a browser with a script

You can absolutely get a script to open up browser windows (e.g. with xdg-open).

xdg-open https://google.com

Password-protected folder

Locking a folder so it can only be opened with a specific password is trickier. The best way to do this would be to encrypt a folder, using something like cryptkeeper.

Command-line vs GUI access

You are also asking about the difference between the command-line and the graphical interface, and whether it's possible to make something only achievable through the command-line.

This is not really possible, or at least probably not the right way to solve the problem. The command-line and the graphical interface are simply two portals into the same system. In theory you should be able to do pretty much anything through either interface. The only way to make something unachievable through the GUI is through obfuscation, and that's not ideal.

Access permissions

Instead, you should control access and visibility of files, folders and applications with user accounts and file permissions. This should also take care of your final concern about people being able to edit your scripts.

Robin Winslow
  • 2,646
  • 3
  • 21
  • 26