terminals and commands

Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
what do the commands based on?
i mean how to write a command does it require a programming language or such as thing?
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Can you be more specific? There are compiled programs, shell scripts, functions, aliases, python scripts, ruby scripts and on and on...
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Commands by themselves aren't programming languages - you just write something as an instruction which tells the shell what to do. You can however combine them with a basic language to write scripts (a collection of commands).
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
Can you be more specific? There are compiled programs, shell scripts, functions, aliases, python scripts, ruby scripts and on and on...

sir. i don't know those things xD i just asked how to use it.
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
Commands by themselves aren't programming languages - you just write something as an instruction which tells the shell what to do. You can however combine them with a basic language to write scripts (a collection of commands).

look at this URL Top 25 OS X Terminal commands | News | TechRadar

there are different thing in the single line so it's not a single command
on the otherwise there are small commands like those in this link Using the OS X Terminal Application so what is the difference.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
there are different thing in the single line so it's not a single command
They are all single commands - you can have more than one part to a single command.
on the otherwise there are small commands like those in this link Using the OS X Terminal Application so what is the difference.
The collection of commands at the bottom are shell scripts. You can group commands together and execute them all at once. When you put the commands into a single file, you get a script.
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
well,what does "sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Your Message"" mean? i know it's job i mean what does each command mean?
 
Joined
May 19, 2009
Messages
8,428
Reaction score
295
Points
83
Location
Waiting for a mate . . .
Your Mac's Specs
21" iMac 2.9Ghz 16GB RAM - 10.11.3, iPhone6s & iPad Air 2 - iOS 9.2.1, ATV 4Th Gen tvOS, ATV3
well,what does "sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Your Message"" mean? i know it's job i mean what does each command mean?

This one I believe means when you put that command into the Terminal App and where is says "Your Message" in quotes you write Text being your Message without the quotes and when you login to your Mac, you get a message, the one you put into the command..

BE WARNED THOUGH. If you don't know the command line (Terminal) DONT play with it because the wrong sudo rm rf command could do untold damage to your Mac OS System.
Bad stuff can happen !!!!
If your asking what this and that means, I wouldn't touch Terminal if I was you. You have been WARNED
 
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
Let me give some good advice.

If you don't know Terminal keep well clear. Very powerful magic there.
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
well,what does "sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Your Message"" mean? i know it's job i mean what does each command mean?

sudo - means do it as root, the REALLY dangerous part!!
defaults write - you're changing a system variable here
/Library/Preferences/com.apple.loginwindow - path to what you're changing
LoginwindowText - specific variable being changed
"Your Message" - this is the part where you insert your change

As others have said, much juju here. Can be very dangerous to play in Terminal if you don't know what you're doing.
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
sudo - means do it as root, the REALLY dangerous part!!
defaults write - you're changing a system variable here
/Library/Preferences/com.apple.loginwindow - path to what you're changing
LoginwindowText - specific variable being changed
"Your Message" - this is the part where you insert your change

As others have said, much juju here. Can be very dangerous to play in Terminal if you don't know what you're doing.

well,i think you confused me :D okay thanks a lot. where can i learn about trminals and those things in your opinion?
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,596
Reaction score
1,072
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
Let me give some good advice.

If you don't know Terminal keep well clear. Very powerful magic there.

And yet, certain members of the forum wonder why Terminal gives me the hives.:Mischievous:
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
And yet, certain members of the forum wonder why Terminal gives me the hives.:Mischievous:
It's glorious - learn to embrace its power.

Yodda_Hunter, I'd suggest setting up a virtual machine with Linux or BSD in it to play around with the command line. That way, you can fool around all day and not worry about breaking anything on your primary system.
 

bobtomay

,
Retired Staff
Joined
Dec 22, 2006
Messages
26,561
Reaction score
677
Points
113
Location
Texas, where else?
Your Mac's Specs
15" MBP '06 2.33 C2D 4GB 10.7; 13" MBA '14 1.8 i7 8GB 10.11; 21" iMac '13 2.9 i5 8GB 10.11; 6S
Let me give some good advice.

If you don't know Terminal keep well clear. Very powerful magic there.

And yet, certain members of the forum wonder why Terminal gives me the hives.:Mischievous:

And why I liked Win 98 when it hit - I finally didn't have to create and keep a separate floppy boot disk for every single game I bought - could leave the command line behind for the glorious gui. :)
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,596
Reaction score
1,072
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
And why I liked Win 98 when it hit - I finally didn't have to create and keep a separate floppy boot disk for every single game I bought - could leave the command line behind for the glorious gui. :)

The presence of a GUI had a lot to do with why the Apple IIGS was the first computer I purchased. I'm too bad a typist to spend too much time jerking with the CLI.
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
okay but i've got no device to back up on yet.
 
Joined
May 19, 2009
Messages
8,428
Reaction score
295
Points
83
Location
Waiting for a mate . . .
Your Mac's Specs
21" iMac 2.9Ghz 16GB RAM - 10.11.3, iPhone6s & iPad Air 2 - iOS 9.2.1, ATV 4Th Gen tvOS, ATV3
okay but i've got no device to back up on yet.

Don't play with the Terminal.app just yet then, because as had been said over and over, it can be a dangerous thing if you don't know what your doing, and it only takes a space here or there where it should/shouldn't be and you up the creek without a paddle…...
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
okay but i've got no device to back up on yet.

Yodda_Hunter, I'd suggest setting up a virtual machine with Linux or BSD in it to play around with the command line. That way, you can fool around all day and not worry about breaking anything on your primary system.
I've already suggested a solution. ;)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top