Ubuntu help

Forum home -> Tech Talk -> View topic

Post

Posted
Rating:
#9 (In Topic #6)
Avatar
Standard member

im new to this and will have lots of questions

so im trying to set up a computer to run minecraft servers and maby websites and such, (1) what are these repositories people keep talking about. (2) how do i eaisly install java runtime? everything ive seen has a big list of commands with it. (3)what is the deal with sudo, i think it is really annoying when i cant edit files on my own computer. is there any way to grant my self full access?(4) finally my system keeps freezing and needs a hard restart, it might be a hardware problem but i dont think so, the desktop's internal button battery (cmos?) was having low voltage, however i replaced it and it kept freezing. there is a copy of win 10 on another harddrive that is really slow but does not freeze. ill try to get a list of hardware specifications.
Online now: No Back to the top

Post

Posted
Rating:
#10
Avatar
Standard member
o, and how do i make a linux equivalent of a windows batch file?
Online now: No Back to the top

Post

Posted
Rating:
#13
Avatar
NOTS Staff
Easy question first. The Linux equivalent of a batch file is a .sh file, called a Bash script or a shell script. The first line should be "#!/bin/bash", and after that, put each command you want to run on its own line. When you run the file (by typing "sh nameoffile.sh" in the terminal), the commands will be run in the order that they're listed in the file.

Repositories are collections of software, usually pre-compiled and usually maintained by your distribution. Since you're using Ubuntu, you can install anything from Ubuntu's software repositories by running a single command (apt install programname). If you want to install a program that's not in the default Ubuntu repositories, you'll have to either add an outside repository that contains the software (known in Ubuntu as a PPA), or install the software yourself (usually done in the past with a "tarball" archive, but there are also several new types of portable programs called snaps, AppImages, and Flatpaks… you don't have to worry about those new ones yet, but once the Linux community picks one of them as a standard, you might start seeing it more.)

There are two types of Java you can install, the open-source version or the proprietary Oracle version (previously called Sun Java.) The open version is called OpenJDK, and you can install it from Ubuntu's default repository by typing "apt install openjdk-8-jre". Getting the Oracle version takes a bit more work, and while the open version used to be slower, it's really not any more, so in my opinion you might as well use OpenJDK.

Now about sudo: first of all, the fact that Linux has a mechanism that lets you get full access easily (that would be sudo) is actually a much better way to handle access than Windows has. You might not realize it, but there are many system files in Windows that you can't change unless you install development suites and modify registry settings, a much larger hassle than simply typing "sudo" at the beginning of a command. (For a little rant about that, check out my video on removing outdated iTunes DRM.) When you use the sudo command, you're "doing" a command as "su", the SuperUser or root account of your computer. Ubuntu as a distro strongly recommends that you just use sudo for anything that requires root access, and if you're going to be using Ubuntu then you should get in the habit of doing that. However, other distros (including Arch, Fedora and variants, etc.) let you log into the root account by typing "su" and entering the root password. Then you'll have a terminal where you can do anything you want without needing to pass "sudo". The last time I checked, you could achieve that in Ubuntu by typing "sudo su".

I'll recap that section to be perfectly clear: the way to "grant yourself full access" is to use sudo, and there is nothing you cannot do while using sudo, for better or worse. If you can use sudo, then you can absolutely edit every file on your computer.

There's not much I can say about the freezing, other than the next time it happens, try pressing Ctrl-Alt-F3 and seeing if that switches you to a new virtual terminal. If it does, report back here and I may be able to help more. If it doesn't, it's probably too basic of a problem to diagnose over the internet.

Let me know if you have any other questions, or if anything wasn't clear!
Online now: No Back to the top

Post

Posted
Rating:
#15
Avatar
Standard member
i have not tried the key combo yet but one thing interesting i noticed is when the desktop and remote viewer freeze the minecraft server keeps going, i don't time out and can reconnect. so the freezing is not too serious unless i need to see logs or modify files.
Online now: No Back to the top

Post

Posted
Rating:
#16
Avatar
NOTS Staff
Remote viewer? Do you have a physical display plugged into the computer at all?
Online now: No Back to the top

Post

Posted
Rating:
#17
Avatar
Standard member
is there a way to run a .sh file by clicking on it? also does it run the first command (eg. start minecraft server 1), wait for that program to end then start the second command (eg. start minecraft server 2)? or does it just go through the list of commands at once?( pretty much can i make one startup script to start multiple servers at once?)
Online now: No Back to the top

Post

Posted
Rating:
#18
Avatar
Standard member
yes both freeze and once the remote viewer dissconnects it cannot reconnect
Online now: No Back to the top

Post

Posted
Rating:
#19
Avatar
NOTS Staff
The .sh file should run if you double click on it IF it's marked as executable (will probably be under permissions tab if you right click -> Properties). It will run them one by one and won't go on to the next one until the current one finishes, so you would need a separate script for each server. There are definitely ways to make one file do several, but I haven't written a script that complex before. You might want to ask on the Ubuntu forums or on Ask Ubuntu. Personally, I find it's easier just to open up a terminal and run the darn command myself rather than going through the hassle of writing a script for it, but that's just me.

Side note, you might not get any feedback since .sh files run in the background… I guess you might get Minecraft's server GUI as long as you're not using the nogui option.
Online now: No Back to the top

Post

Posted
Rating:
#21
Avatar
Standard member
could the screen be freezing because the graphics card does not have the proper driver?
Online now: No Back to the top

Post

Posted
Rating:
#22
Avatar
NOTS Staff
I would say that I doubt it... although that has happened to me before. What model is the graphics card?
Online now: No Back to the top

Post

Posted
Rating:
#23
Avatar
Standard member
Gallium 0.4 on AMD REDWOOD (DRM 2.43.0, LLVM 3.8.0)
Online now: No Back to the top

Post

Posted
Rating:
#43
Avatar
Standard member
so im trying to get some form of java 8 on a linux server, but every time i try to install it it says not found. and default gives 7
Online now: No Back to the top

Post

Posted
Rating:
#46
Avatar
NOTS Staff

Aaronstar said

so im trying to get some form of java 8 on a linux server, but every time i try to install it it says not found. and default gives 7

Is this Linux server running Ubuntu? OpenJDK 8 is reportedly in the default repositories for Ubuntu 16.04 and up. The latest Debian Stable does not have OpenJDK 8 in a default repo, so that's going to be a little more work.
Online now: No Back to the top

Post

Posted
Rating:
#165
Avatar
Standard member
Can you make a video on how to host my own website on the server created from linux(based on the video you made about home server set up on linux).
Online now: No Back to the top
1 guest and 0 members have just viewed this.