![]() Line number 5 and 6 of nf should be: AutomaticLoginEnabletrue AutomaticLogin username where, username is the name of the user for auto-login. Login through the command prompt input: sudo nano /etc/gdm3/nf. If your script has been written correctly it will run without errors. From the login screen hit Ctrl + Alt + F4. (the current directory followed by a path separator, to distinguish it from the filename). Now that we are in the same directory as the script, we have to specify to the shell that we want to execute the file by giving its location. In my case, remember, the filename is test.sh, so I would run chmod u+x test.sh If you can see the sh file in the output, you can use chmod to make it executable. Once you've made it to the location of your script, type ls These are all ways of describing the same place. Or even cd /home/$USER/Desktop/shell/practice If you seem to be somewhere else, you can use the absolute path cd ~/Desktop/shell/practice In this example I have stored my sh file as ~/Desktop/shell_practice/test.shįirst do pwd to figure out where you are, and if it returns /home/username (where username is your real username), you can run cd Desktop/shell/practice There are thousands of things you can to to that file just by typing a few commands.Īnother one, you can download a file from the Internet with one simple command: wget And then open the file like this: shotwell ps_logo2.png Or you can filter the output for keywords (e.g. Or you can run and redirect the output to a file. Once you are in the correct current folder you can run the script like this. The terminal has a rich set of powerful tools that are accessible by typing the commands. Once you can see for example script1.sh with ls run this. ![]() ![]() If you when into a folder that you did not want, run cd.Once you see the folder that you want to go in to, run cd, followed by a space, followed by a folder name.Give it a try: type "ls" and press Enter. See bash(1) for more options HISTCONTROLignoreboth append to the history file, dont overwrite it shopt -s histappend for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE1000 HISTFILESIZE2000 check the window size after each command and, if necessary, update the values of LINES and COLUMNS. ls will list the files and folders in the current folder.Tip if you're on Ubuntu, you can't use su 31 Chapter 2 performing essential. sh file into the terminal and press Enter enter a password, which in this case is the password of the user root. Open Applications -> Accessories -> Terminal.The terminal will close immediately and you will not be able to see the output. Make sure you trust the source where you got the file from. Select Allow executing file as a program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |