Web Develop Forum: UNIX Administration cheat sheet - Web Develop Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

UNIX Administration cheat sheet Rate Topic: -----

#1 User is offline   thinglie Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 41
  • Joined: 25-October 08
  • Gender:Male
  • Location:House

Posted 23 January 2009 - 10:10 PM

Here's a short cheat-sheet for UNIX. UNIX, that greatest of operating systems*, has reinvented itself through from a timesharing system in its earliest days to the well-known GNU/Linux and Mac OS X operating systems for personal computers. UNIX has also been used as a server operating system since its earliest days, and that use continues today with server variants such as OS X Server, (Free)BSD, and GNU/Linux distros like CentOS. Those interested in finding out more should read "The Art of UNIX Programming" by Eric S. Raymond.

cd         : Change directory.
touch      : Create a file
rm         : Delete a file
rm -r      : Delete a folder with files in
rmdir      : Delete empty folder
ls         : Lists files in directory (verbose '-la')
less       : View contents of file (if not, try 'more')
ed         : Line editor. (see also ex)
vi         : Visual editor (F'naarr! F'naarr!)
emacs      : Everything under the sun.
links      : Text web browser. (if not, try 'lynx [if not, try "elinks"]')
telinit    : Switch runlevels (safety modes) 1,2,3: cmdline; 5: gui.
ps         : Processes list.
su -       : Switch to root.
yum        : Download/install packages (RPM)
apt-get    : Download/install packages (Debian) (F'naarr! F'naarr!)
tar        : Deals with tarballs.
man        : Views manual pages on any command.
shutdown   : Shuts down the system. (try 'shutdown now')
Also cat. Read the man page.

Useful locations
----------------
/home/x/   : Home directory for user x
/usr/bin/  : Most programs go in here
/etc/motd/ : The "Message of the Day", shown upon login
/usr/share/dict/words : A long list of words. (Linux only)


* Barring Plan 9, of course.

Changelog:

v1.00 (23/01/09) : F1RST P0ST!!!
v1.01 (24/01/09) : Added useful locations section.
v1.02 (12/02/09) : ed, emacs, links, telinit.
v1.03 (13/02/09) : ls, ps, cd
<a href="http://www.gnu.org/" target="_blank"><img src="http://www.gnu.org/graphics/gnubanner-2.png" border="0" class="linked-sig-image" /></a>
<a href="http://www.fsf.org'" target="_blank">Free Software Foundation</a>
0

#2 User is offline   Sam Granger Icon

  • Administrator
  • PipPipPip
  • Group: Root Admin
  • Posts: 431
  • Joined: 22-October 08
  • Gender:Male

Posted 23 January 2009 - 10:17 PM

Thanks for the post! Will make a Server management forum later on and move this smile.gif
0

#3 User is offline   thinglie Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 41
  • Joined: 25-October 08
  • Gender:Male
  • Location:House

Posted 12 February 2009 - 07:02 PM

Updated with ed, emacs, links, and telinit.

If you feel there's anything I've missed (I'm sure there's something!) please say so. I'm working on PCRE's at the moment.
<a href="http://www.gnu.org/" target="_blank"><img src="http://www.gnu.org/graphics/gnubanner-2.png" border="0" class="linked-sig-image" /></a>
<a href="http://www.fsf.org'" target="_blank">Free Software Foundation</a>
0

#4 User is offline   Bob Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 44
  • Joined: 23-October 08
  • Gender:Male

Posted 12 February 2009 - 07:25 PM

How about:

ps aux			   :   Show running processes
ls -al				 :   List files/folders in current location
cd locationhere  :   Navigate to the specified directory (ex: cd /etc/sysconfig)

0

#5 User is offline   thinglie Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 41
  • Joined: 25-October 08
  • Gender:Male
  • Location:House

Posted 13 February 2009 - 08:01 PM

ohmy.gif How did I miss cd? .. and I'll also add the other two. Thanks!
<a href="http://www.gnu.org/" target="_blank"><img src="http://www.gnu.org/graphics/gnubanner-2.png" border="0" class="linked-sig-image" /></a>
<a href="http://www.fsf.org'" target="_blank">Free Software Foundation</a>
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users