Untitled


SUBMITTED BY: Guest

DATE: Dec. 7, 2013, 7:05 p.m.

FORMAT: Text only

SIZE: 5.3 kB

HITS: 2878

  1. Terminal is a terminal emulator included in Apple’s Mac OS X operating system. Terminal is designed for you to typing in specific commands that you would not be able to do otherwise. This is great for customizing your Mac and unveiling hidden features.It originated in Mac OS X’s predecessors, NEXTSTEP and OPENSTEP, and allows the user to interact with the computer through a command line interface. You Terminal OS X can find the Terminal in the Utilities folder within the Applications folder. Open the Terminal program, which you’ll find in the Applications_Utilities folder. Once launched, Terminal opens a single window displaying a greeting and a second line of text that comprises the prompt. With that window active, anything you type will enter just before the rectangular cursor that follows the prompt. After you type a command, simply press Return or Enter to run it. Here we listed some vey basic commands you must know. These commands are very useful for your daily Mac Adventure.
  2. _____________________________________________________________________________________
  3. Login as Root
  4. “ sudo –s ”
  5. After typing that, it will prompt you for your user password, assuming you’re on an administrator account. Once you are accepted, you can do the rest of these commands.
  6. OR:
  7. “ su “, which asks for the root password. If you don’t have the root user enabled, follow the directions below. NOTE: Enabling the root user can be dangerous.
  8. Again, after typing that, it will ask for the root password.
  9. Change root password
  10. If you don’t like your root password, use:
  11. “ sudo passwd root “
  12. Then type in your old root password, then give it a new password. If you had no root password before, it will simply ask you to enter a new password.
  13. Change directories
  14. To move around in the various directories, use cd. Example:
  15. “ cd /applications “
  16. That will move you into the applications folder.
  17. Typing cd with no argument will return you to the directory you were in before.
  18. To change to a directory with spaces in the name, surround the directory name in quotes Example:
  19. “ cd /Applications/”XChat Aqua”
  20. That will move you into a folder called XChat Aqua in the applications folder.
  21. Move to other volumes/disks/partitions
  22. To move to different volumes/disks/partitions, use cd again Example:
  23. “ cd /volumes/Mac “
  24. That will move you into the root (/) directory of the volume named Mac.
  25. You can also change to a volume with spaces, much like the last hint Example:
  26. “cd /volumes/”Mac OS X”
  27. Remove a file from your Mac
  28. This will remove a file from the same directory you are in:
  29. rm <filename>
  30. Example: “ rm something.txt “
  31. You can specify a path to a file to delete, if it is in a different folder.
  32. rm /path/to/something Example:
  33. “ rm /Applications/Candybar.app “
  34. This will remove the application Candybar from your applications folder:
  35. This will remove a directory/folder on your Mac:
  36. rm -d <folder>
  37. Example: ” rm -d delete_me “
  38. (Say you had a folder called delete_me in /, your start disk’s main folder)
  39. Note: You can specify a path for this too, like the previous rm commands.
  40. Copy a file
  41. To copy a file, use:
  42. cp <filename> <name_of_copy>
  43. Example: “ cp something.txt somethingelse.txt “
  44. This will make a duplicate of something.txt and name it somethingelse.txt
  45. Move a file
  46. To move a file, use:
  47. mv <filename> <destination>
  48. Example: “ mv something.txt /Applications “
  49. This will move something.txt to the Applications folder.
  50. Find a file
  51. To find a file, use:
  52. locate <filename>
  53. Example: “ locate Callisto.kext “
  54. This will look for anything related to Callisto.kext on your system.
  55. Find a binary file
  56. To find a binary file, like rm, use:
  57. whereis <binary file>
  58. Example: “ whereis rm “
  59. This will look for the rm command.
  60. Create a folder
  61. If you want to make a folder:
  62. mkdir <name_of_folder>
  63. Example: “ mkdir directory “
  64. Will make a folder called directory in the current folder you are in.
  65. Move a folder
  66. If you want to move a folder:
  67. mv folder_name path Example:
  68. “ mv folder /applications “
  69. Will move a folder called “folder” to applications.
  70. NOTE: You can also specify a path if you want to put the folder somewhere specific. Example:
  71. mkdir /Applications/directory
  72. Repair Permissions of a folder
  73. If you’ve been naughty and messed with the System/Library/Extensions folder at all, you can repair the owner and permissions of the folder by doing:
  74. chmod -R 755 <path>
  75. chown root:wheel <path>
  76. Example
  77. “ chmod -R 755 /System/Library/Extensions “
  78. ” chown -R root:wheel /System/Library/Extensions “
  79. Repair permissions in Terminal without DiskUtility
  80. To repair permissions on your whole system without the need of disk utility, do:
  81. “ diskutil repairPermissions / “
  82. List Files in a directory
  83. If you want to view files in a folder, do:
  84. “ ls “

comments powered by Disqus