Jump to content

So, me an a few other users, @Colonel_Gerdauf @patrickjp93 for example (sorry if I missed anyone) have been discussing the differences between Command Line Interface vs Graphical User Interface.

 

My position: There a few things left in todays computer environment, that make CLI necessary. Although they DO exist, and are considerably important, like replacing a deleted boot sector and start of the partition,  on a hard disk drive with an exact copy, as Wendell shows here 

which could not be done without the CLI (although he DOES say that you should try partition recovery software before trying this).

 

I DO recommend watching that video, as it does show:

A. The power of the command line interface with extremely ridiculous situations

B. Wendells MAD wizarding skills. (at least to me they are lol)

 

I think that CLI only is pretty much obsolete. Notice the operative "pretty much". I am more than willing to admit, that there are extremely important things that CLI can do, that no GUI will ever be able to do efficiently. Mainly because, there comes a point where entering commands manually is more efficient than listing every single last possible command using a GUI (which, if you were trying to equal CLI WILL take forever just to scroll through...for one option.

 

Granted, CLI is ridiculously more powerful and in-depth than GUI.

 

The argument (sort of) that I am making, is simple, and what Linux has basically gone with over the course of its evolution. That for MOST normal system operations that don't require a Wendell-level of knowledge and skill, GUI is just better.

 

Examples:

moving files and folders,

text editing (even this article admits that GUI is better for text documents http://www.wired.com/2012/07/command-line/)

really, anything that doesn't require an extremely "deep" level of access to the hardware.

 

Now, there may be other aspects of computing the either CLI or GUI may be better at, I have neither the time or inclination to list them all (that's what I want you for). My point is that in the modern computing world, the idea of using solely the CLI is pretty much pointless.

 

Where I'm nit-picking:

 

You hear a lot of CLI fans talk about "system resource use" for GUI. To be quite honest, I don't see it. Seriously, Unless you're gaming or watching netflix or whatever (which you won't be doing on a server....at least I HOPE not, because your boss might/willprobably have a problem with that). Seriously, with today's level of powerful hardware, the idea that a GUI takes up a ridiculous amount of hardware, seems absurd to me (and I WILL admit, I'm a newb, and I've never used or maintained server hardware). The thought that someone couldn't just throw a cheapo GPU into a server cluster//farm//whatever-its-called and run a GUI with minimal resources, for simple file managing, text editing, or even script creation, is just insane.

 

Disclaimer: My experience IS limited. The VM we are using for my linux class, is straight up retarded (no aliasing, no tabbing to auto-complete). The text editors available to us, are retarded, if you make a spelling error, you basically have to backtrack to the last available space (as in where you pressed the spacebar). Example:

 

echo "the dog jumped over the bussh to get to the cat"

 

In the text editor we are using, you would accidentally hit that second s in the word bush. When you try to delete it, your cursor, for WHATEVER stupid reason, ends up highlighting the s that you want to be in the word, and when you attempt to keep typing, it puts everything you type, between the u and the s, and if you hit delete, it deletes whatever is immediately to the left of the cursor. Same with backspace. Not to mention that trying to use your arrow keys ends up inserting a line in-between lines that begins with an A, B, or D (the letters I've encountered from using my arrow keys).

 

I don't know, maybe it's because whoever wrote the textbook and questions for this course has ABSOLUTELY no idea of the concept of context, and neither do the man pages of the distro the VM uses.

 

For instance, they will ask you to deterrmine which commanmd will do *specific command functions*

 

test -czf (whatever)

test -dzf (whatever)

test -ntb (whatever)

 

and so on and so forth, but in the book, they only ever gave a description of each command, in pairs of three, without explaining each option the way the man page would, for example

test –f /dev/ttyS0 0 if the file exists test ! –f /dev/ttyS0 0 if the file doesn’t exist test –d /tmp 0 if the directory exists test –x `which ls` substitute the location of ls then test if the user can execute test 1 –eq 1 0 if numeric comparison succeeds test ! 1 –eq 1 NOT – 0 if the comparison fails test 1 –ne 1 Easier, test for numeric inequality test “a” = “a” 0 if the string comparison succeeds test “a” != “a” 0 if the strings are different test 1 –eq 1 –o 2 –eq 2 -o is OR: either can be the same test 1 –eq 1 –a 2 –eq 2 -a is AND: both must be the same

 

While normal Linux users might understand that gibberish, I for one, do not. I need to know the definition of EACH symbol after the word test. I need to know what is the example of the operator (-d?) and what is just filler (/tmp?). Which is what? Are they both necessary for the operation/outcome "0 if directory exists"? Is tmp the directory in that example? I don't know, because they didn't freaking describe it in the least bit.

 

I.... I just..... I swear it's like they use a shorthand that they just assume you will understand, instead of giving accurate descriptions. And yes, there are the man or info pages, but isn't that kind of what a textbook is supposed to be for in a college class? If that's mot what a textbook is for, then why can't I just call myself linux expert and look everything up using man or info pages?

 

It is literally as if they just throw random information at you, and say "here, you figure out what is important for the quizzes and tests, and then we'll ask you questions and then grade you and not tell you why you got an answer wrong.

Ketchup is better than mustard.

GUI is better than Command Line Interface.

Dubs are better than subs

Link to comment
Share on other sites

Link to post
Share on other sites

-snip-

'-' usually denotes an optional flag in a program being executed.

-f (intuitively)means the target of the "test" function is a file. -d means the target is a directory. Now, this is an API thing related to that individual program.

 

/dev/ttyS0 is the directory and end file you're trying to access from where you are when that function is called, /tmp is the optional directory to change to to rerun the tests if the initial target and file either do not exist or fail the test.

 

The API of the program is

1) quite stupid if that whole line is actually the command

2) mostly intuitive where I believe the ! is similar to the "else" of an "if-else" statement.

 

And no, the textbook should really only provide you brief notes and provide example usages. Since Linux is rich in man pages, the author can safely assume you should use them and will familiarize yourself with the definitions. I've never seen a Linux textbook that didn't say "for more detail, use command 'man XYZ123'"

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

Reading through your rant, I understood where you are coming from. I fully agree with you that a GUI is better for a general use case, but learning CLI is rudimentary for studying an IT-related program (networking in your case, if I am not mistaken). It gives you an in-depth understanding of what the computer is doing, the true limits of the hardware you have, and the software-level and even kernel-level issues you are likely to face. It is your responsibility, therefore, to understand how a given CLI works, it's weaknesses, and the workarounds for such weaknesses. This is one of the principles of engineering; if you have one horse instead of ten to carry heavy cargo, figure out a way to use the single horse you have, without external support, to accomplish the same goal.

 

One key thing you need to understand is that you simply cannot assume the computer at the industrial workplace is the same as the PC you have at home. There are a number of differences in how they run and operate. Also, a server does not have the same kind of performance redundancy that a PC has. When you are polling and parsing several blocks of information at a time, every single CPU and GPU Hz matter. The level of software and performance optimization required in these industries is far beyond what you see in the consumer tech space.

 

Not to be rude, but regardless of how pointless they appear, suck up and deal with the limitations you are given, and make the best of it. If you are still struggling at or beyond this point, you really need to reconsider your program of study.

Read the community standards; it's like a guide on how to not be a moron.

 

Gerdauf's Law: Each and every human being, without exception, is the direct carbon copy of the types of people that he/she bitterly opposes.

Remember, calling facts opinions does not ever make the facts opinions, no matter what nonsense you pull.

Link to comment
Share on other sites

Link to post
Share on other sites

'-' usually denotes an optional flag in a program being executed.

-f (intuitively)means the target of the "test" function is a file. -d means the target is a directory. Now, this is an API thing related to that individual program.

 

/dev/ttyS0 is the directory and end file you're trying to access from where you are when that function is called, /tmp is the optional directory to change to to rerun the tests if the initial target and file either do not exist or fail the test.

 

The API of the program is

1) quite stupid if that whole line is actually the command

2) mostly intuitive where I believe the ! is similar to the "else" of an "if-else" statement.

 

And no, the textbook should really only provide you brief notes and provide example usages. Since Linux is rich in man pages, the author can safely assume you should use them and will familiarize yourself with the definitions. I've never seen a Linux textbook that didn't say "for more detail, use command 'man XYZ123'"

 

 

Reading through your rant, I understood where you are coming from. I fully agree with you that a GUI is better for a general use case, but learning CLI is rudimentary for studying an IT-related program (networking in your case, if I am not mistaken). It gives you an in-depth understanding of what the computer is doing, the true limits of the hardware you have, and the software-level and even kernel-level issues you are likely to face. It is your responsibility, therefore, to understand how a given CLI works, it's weaknesses, and the workarounds for such weaknesses. This is one of the principles of engineering; if you have one horse instead of ten to carry heavy cargo, figure out a way to use the single horse you have, without external support, to accomplish the same goal.

 

One key thing you need to understand is that you simply cannot assume the computer at the industrial workplace is the same as the PC you have at home. There are a number of differences in how they run and operate. Also, a server does not have the same kind of performance redundancy that a PC has. When you are polling and parsing several blocks of information at a time, every single CPU and GPU Hz matter. The level of software and performance optimization required in these industries is far beyond what you see in the consumer tech space.

 

Not to be rude, but regardless of how pointless they appear, suck up and deal with the limitations you are given, and make the best of it. If you are still struggling at or beyond this point, you really need to reconsider your program of study.

*reserved* Will reply in an hour and a half at most. Still finishing some homework.

Ketchup is better than mustard.

GUI is better than Command Line Interface.

Dubs are better than subs

Link to comment
Share on other sites

Link to post
Share on other sites

I'm by no means a power user, merely good at Googling stuff and using logic and common sense. Never used CLI on Windows except for formatting HDDs/SSDs at the start of the installation process to stop Win7 from creating extra partitions on the boot disk.

On Linux however I find myself using the CLI more and more because it's simply faster to open a Terminal and type in a line than it is to open several folders (avoiding the use of the word "windows" to prevent confusion) in the GUI and push several buttons and links.

As for Wendell, that man truly is a genius.

Link to comment
Share on other sites

Link to post
Share on other sites

GUI on a Linux server would be silly... You would need to set up some way to access that GUI remotely such as VNC which compared to RDP on Windows is shitty and VNC is also less secure than SSH... While you can tunnel VNC over SSH you're just continuing to add further layers of complexity to the setup.

 

I can tell you right now you're not going to find a GUI installed on Linux servers in any serious enterprise environment. The importance of learning CLI for Linux boils down to it will be your only option in your professional life. So learn it or aim for Windows administration only.

 

You mention not knowing what the commands are and them looking like gibberish but someone who has never used a computer would also think the GUI was gibberish... You had to learn the GUI, it's not some innate ability; If you can learn GUI you can learn command line. Knowing you need to go to service -> right click the web server -> click restart is something you had to learn, on the command line knowing you need to type "systemctl restart httpd" or "service apache2 restart" is just another thing to be learned, no one knows those things from birth.

 

Best way to learn Linux CLI is to do something useful/real with it... Go to DigitalOcean or Linode and spin up a cheap Linux VPS and setup a web server. There are lots of step by step guides online that will take you from adding your first user, through configuring the firewall, through installing the web server and checking logs to make sure everything is working. Running through practical exercises like that is the best way to learn. When you're done blow the server away and try and do it without following the guide. Then move on to something else like a mail server running postfix/dovecot backed by MySQL.

 

For Windows, GUI is generally better although there are some things that can only be done in PowerShell or Exchange Management Shell for example or that are far easier in those command lines.

Link to comment
Share on other sites

Link to post
Share on other sites

GUI on a Linux server would be silly... You would need to set up some way to access that GUI remotely such as VNC which compared to RDP on Windows is shitty and VNC is also less secure than SSH... While you can tunnel VNC over SSH you're just continuing to add further layers of complexity to the setup.

 

I can tell you right now you're not going to find a GUI installed on Linux servers in any serious enterprise environment. The importance of learning CLI for Linux boils down to it will be your only option in your professional life. So learn it or aim for Windows administration only.

 

You mention not knowing what the commands are and them looking like gibberish but someone who has never used a computer would also things the GUI was gibberish... You had to learn the GUI, it's not some innate ability; If you can learn GUI you can learn command line. Knowing you need to go to service -> right click the web server -> click restart is something you had to learn, on the command line knowing you need to type "systemctl restart httpd" or "service apache2 restart" is just another thing to be learned, no one knows those things from birth.

 

For Windows, GUI is generally better although there are some things that can only be done in PowerShell or Exchange Management Shell for example or that are far easier in those command lines.

Do servers using RHEL not have a GUI? I remember using Linux GUI, in conjunction with CLI, in a previous class to do some networking stuff (like setting up a program that allows the linux server to work with windows Active Directory)

 

I will say this, I wish I could get a more realistic experience of using CLI than whatever this broken thing they're making us use is.

Ketchup is better than mustard.

GUI is better than Command Line Interface.

Dubs are better than subs

Link to comment
Share on other sites

Link to post
Share on other sites

Do servers using RHEL not have a GUI? I remember using Linux GUI, in conjunction with CLI, in a previous class to do some networking stuff (like setting up a program that allows the linux server to work with windows Active Directory)

 

I will say this, I wish I could get a more realistic experience of using CLI than whatever this broken thing they're making us use is.

 

No it does not, you need to install the packages first, then activate it via an additional command, which reboots the system. You can also run a CLI-only verison of Ubuntu; the commands vary depending on what exactly you are using.

 

Now to illustrate my point about resource efficiency, take a look at Tiny Core Linux: http://www.tinycorelinux.net.

 

The Core edition of the distribution contains only the CLI of the kernel, and it consumes less than 10 Megabytes of storage (Ubuntu, in comparison, swallows up at least 700MB).

The TinyCore edition contains only rudimentary drivers (including Ethernet) and GUI, and takes up 16MB of storage.

The CorePlus, which is TinyCore plus some additional drivers, including wireless support, takes up 80MB installed.

 

Now for boot up times (on an HDD):

 

Ubuntu: ~ 20 seconds

CorePlus: 6 seconds

TinyCore: 5 seconds

Core: less than 2 seconds

 

Now imagine the speeds in an SSD...

Read the community standards; it's like a guide on how to not be a moron.

 

Gerdauf's Law: Each and every human being, without exception, is the direct carbon copy of the types of people that he/she bitterly opposes.

Remember, calling facts opinions does not ever make the facts opinions, no matter what nonsense you pull.

Link to comment
Share on other sites

Link to post
Share on other sites

No it does not, you need to install the packages first, then activate it via an additional command, which reboots the system. You can also run a CLI-only verison of Ubuntu; the commands vary depending on what exactly you are using.

 

Now to illustrate my point about resource efficiency, take a look at Tiny Core Linux: http://www.tinycorelinux.net.

 

The Core edition of the distribution contains only the CLI of the kernel, and it consumes less than 10 Megabytes of storage (Ubuntu, in comparison, swallows up at least 700MB).

The TinyCore edition contains only rudimentary drivers (including Ethernet) and GUI, and takes up 16MB of storage.

The CorePlus, which is TinyCore plus some additional drivers, including wireless support, takes up 80MB installed.

 

Now for boot up times (on an HDD):

 

Ubuntu: ~ 20 seconds

CorePlus: 6 seconds

TinyCore: 5 seconds

Core: less than 2 seconds

 

Now imagine the speeds in an SSD...

From my experience with windows 7 and a consumer grade cpu, an SSD would break all of those times down to about zero. I boot in about 20 seconds. And that's to the login screen.

 

And wow, a whole whopping 700 megabytes of drive space. Not really that much space in today's world. Again,I realize CLI is necessary for stuff, but I still don't see the point in using it for mundane things like file management (moving stuff from point A to point B) or even creating files. And while yes, in a server environment I get that every last bit matters.....but with USB 3.0 and other things, the OS can be run entirely off of HDD space.

 

Another point, monitoring system activity. I've yet to see anything "live" in linux (example, cpu usage) that didn't move so fast I can't actually read it before its moved, whereas GUI can provide graphical representations that are move more efficient to read (because I don't have to scroll back up the CLI history to read them).

 

Again, no experience here other than consumer grade equipment, although I can tell you that my current rig is more powerful than the rig they are running our VM on. More RAM, more CPU power (double the speed, although I do have half the cores). I'm just not getting the whole idea that GUI takes up a lot of system resources, especially when the OS is free (more than likely if its linux, support might not be, although that's why they hire people to work on it). If you're spending ridiculous levels of money on building a server, or server system, what's another......$50 for a gpu? (because server cpu's don't have an iGPU to my knowledge).

 

Again. I've never worked in the industry, so I guess the main point of this discussion is for me to get an idea of what I'm in for. I'm doing my best to learn CLI, and it is fun when you finally get something to work (when you've spent the majority of your life using GUI), but it's just so freaking much. I can't see how anyone can remember it all without at least 5 years of experience actually doing it.

Ketchup is better than mustard.

GUI is better than Command Line Interface.

Dubs are better than subs

Link to comment
Share on other sites

Link to post
Share on other sites

And wow, a whole whopping 700 megabytes of drive space. Not really that much space in today's world.

 

You're thinking in consumer terms. Space is at a premium in enterprise environments. The less overhead you have as far as RAM, CPU, and Storage is concerned the more VMs you can cram on a host for example... In the case of renting a VPS the difference between 40GB of disk and and 80 GB of disk or 2GB of RAM and 4GB of RAM can be >$20/month.

 

 

Again,I realize CLI is necessary for stuff, but I still don't see the point in using it for mundane things like file management (moving stuff from point A to point  B) or even creating files. And while yes, in a server environment I get that every last bit matters.....but with USB 3.0 and other things, the OS can be run entirely off of HDD space.

 

Well... As an example let's say I want to make a folder  "example.com" in "/var/www" with 3 sub-folders "public_html," "logs," and "backups." From the CLI:

$ sudo mkdir -p /var/www/example.com/{public_html,logs,backups}$ sudo chown www-data:www-data /var/www/example.com/public_html

or I can open a file browser, browse to /var/www, right-click -> new folder -> "example.com", browse in to "example.com", right-click -> new folder -> "public_html", right-click -> new folder -> "logs", right-click -> new folder -> "backups", right-click "public_html" -> properties -> change the owner -> apply.

 

2 commands vs all that? Yeah, the GUI work isn't complex but would still take longer.

 

The CLI also gives you quick and easy ways to move all files of one type from place to place without sorting explorer window by file type, finding the set you want, and then selecting and dragging you can do for example:

$ mv *.css css/

Install a web server?

$ apt-get install apache2or $ yum install httpd

You think of the GUI being easier or faster but you're not actually familiar with the CLI... In a lot of cases the CLI is as fast if not faster especially with tab complete... "cp fu<tab> fu<tab>.bu" and you have "cp full_template.php full_template.php.bu" and you've made a copy of full_template.php.

 

Another point, monitoring system activity. I've yet to see anything "live" in linux (example, cpu usage) that didn't move so fast I can't actually read it before its moved, whereas GUI can provide graphical representations that are move more efficient to read (because I don't have to scroll back up the CLI history to read them).

 

 

top and/or htop... Looks and works basically just like the task manager on Windows.

 

C3pFxEN.png

 

For things like logs or performance monitoring over time you usually use 3rd party tools that give you a web interface such as Graphite, Cacti, Logstash, etc.

 

 Again, no experience here other than consumer grade equipment, although I can tell you that my current rig is more powerful than the rig they are running our VM on. More RAM, more CPU power (double the speed, although I do have half the cores). I'm just not getting the whole idea that GUI takes up a lot of system resources, especially when the OS is free (more than likely if its linux, support might not be, although that's why they hire people to work on it). If you're spending ridiculous levels of money on building a server, or server system, what's another......$50 for a gpu? (because server cpu's don't have an iGPU to my knowledge).   

 

 

Instead of going over differences in consumer vs. enterprise hardware and configuration... Let me give you a practical example: I used to run a 1024 user TeamSpeak3 server. On Friday's and Saturdays we saw peak usage of 970 connected users with an average 350-400 connected users at all times throughout the week (world wide coverage: NA, Euro, SEA.) Our server was running TeamSpeak, MySQL, some performance graphing utilities, and a backup script and nothing else... We ran it on a machine with 2GB of RAM and 2 cores... Very lean. Now lets say a GUI doesn't use too much RAM on it's own but what if 3 admins are logged in at the same time each with an active GUI session? That over head on a server running so lean already is not only unacceptable it's unnecessary. 

 

Again. I've never worked in the industry, so I guess the main point of this discussion is for me to get an idea of what I'm in for. I'm doing my best to learn CLI, and it is fun when you finally get something to work (when you've spent the majority of your life using GUI), but it's just so freaking much. I can't see how anyone can remember it all without at least 5 years of experience actually doing it.

 

 

You're not going to master the CLI in a classroom. As I said before you need to put it to use on something practical. Set up a Linode or DigitalOcean Droplet and get a Wordpress site running entirely using the CLI... then move on and do something else... Build up actual experience doing real world tasks where you can see the results in some tangible way. 

 

I had to heavily redact these to remove server names and such but this is where I live:

 

wqupoSw.png

 

Oh, and don't get me wrong... I am all for tools such as PhpMyAdmin and Webmin that add a web based graphical management option to stuff on Linux but overall CLI is the way to go and sometimes stuff like mysql -u root -p mydatabase < mydatabase.sql is just faster and easier than logging in to PhpMyAdmin :)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×