Site Tools


linux:scripts:basics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
linux:scripts:basics [2014/06/11 12:39] lunetikklinux:scripts:basics [2014/10/01 13:21] lunetikk
Line 1: Line 1:
 +
 +===== Linux Commands =====
 +
 +^  Command  ^  Function  ^
 +|  cd /blabla/  |  cd (change directory), changes the current directory to blabla  |\\
 +|  pwd  |  shows current directory  |\\
 +|  ls  |  shows all files and folders in the current directory in one line -> confusing)  |\\
 +|  ll  |  = ls –al ->  shows all files and folders + owner + size, 1 item each line  |\\
 +|  alias  |  shows alias like „..“ for „cd ..“  |\\
 +|  cat [textfile]  |  displays the full file  |\\
 +|  tail [-f -n 20]  |  displays the last 20 lines of the file – extension „–f“ refreshes the file, extension „–n 20“ displays the last 20 lines  |\\
 +|  head  |  same a tail but it displays the first lines  |\\
 +|  touch [file]  |  create a file / refresh the timestamp  |\\
 +|  chmod 777 [file]  |  change rights of a file  |\\
 +|  chown user:group [directory] –R  |  change owner and group, -R changes the complete directory including files and subdirectorys  |\\
 +|  useradd –m  |  add a user  |\\
 +|  groupadd  |  add a group  |\\
 +|  cp source target [-r -a]  | copy data, -r copy directory, -a keep the rights  |\\
 +|  mv source target  |  move file or directory  |\\
 +|  rm –r  |  removes a directory with all data in it / rmdir only removes empty directorys  |\\
 +|  cut –d : -f 1,3  |  : is the delimiter and 1 and 3 are the columns  |\\
 +|  echo " " > test.sh  |  deletes the entries of a textfile  |\\
 +|  which sutp  |  shows path of sutp  |\\
 +|  echo $?  |  0 = success of the last command  |\\
 +|  env  |  run a program in a modified environment    |\\
 +|  uptime  |  shows how long your machine is running  |\\
 +|  mkdir –p /abc/abc  |  create a directory including a subdirectory  |\\
 +|  rpm –ivh  |  install a rpm file (install verbose hash)  |\\
 +|  mount /dev/[cdrom, sr, hdc or tabtab]  |  mount VMWaretools  |\\
 +
 +
 +===== Debian Commands =====
 +
 +^  Command  ^  Function 
 +|  apt-cache search [Package]  |  search for [Package] (example nano)  |\\
 +|  apt-get install [Package]  |  installs [Package]  |\\
 +|  apt-get update  |  update sources.list  |\\
 +|  apt-get upgrade  |  update all installed packages  |\\
 +|  apt-get remove [Package]  |  remove [Package]  |\\
 +|  apt-get purge [Package]  |  remove [Package] and its configs  |\\
 +|  dkpg --install [Package.deb]  |  installs offline packages  |\\
 +|  aptitude install [Package]  |  installs [Package] alt. apt-get  |\\
 +|  service [Service] start/stop  |  start/stop a service (rc for Suse)  |\\
 +
 +
 +\\
 +== EasterEggs ==
 +
 +^  Command  ^  Function 
 +|  apt-get moo  |  Try it out ;)  |\\
 +|  aptitude moo  |  Try it out and add aptitude -v[vvvvv] moo ;)  |\\
 +
 +
 +
 ====== Script ====== ====== Script ======
  
linux/scripts/basics.txt · Last modified: 2021/01/07 14:55 by lunetikk