EgyptFOSS
حمل تطبيقاتنا للموبايل
حمل تطبيقاتنا للموبايل للمشاركة والحصول على جديد منصة مصر للبرمجيات الحرة مفتوحة المصدر.‎
Jump to: navigation, search
Revision as of 13:24, 10 July 2016 by M.nabil (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Users of Linux distributions like Ubuntu, Mint, Fedora or openSUSE can almost do anything graphically, but there also another way to do it by using the Terminal. There are thousands of commands users can run on the Terminal, each with a number of different options.

Starting a Terminal

First, users will need to know how to start the terminal to write the commands.

  • In Ubuntu and Mint distributions: Use the shortcut Key Ctrl+Alt+T
  • In Fedora distribution: Use the shortcut Key Ctrl+Alt+F2 to switch your entire screen to a terminal. You also can then switch between six different terminals, by using Alt-F2 through Alt-F6. Pressing Alt-F1 will bring you back to your graphical environment.
  • In Debian distribution:
    • Under GNOME: Applications> System Tools> Terminal. or the keyboard shortcut Alt + F2 for "Run Application" and type "gnome-terminal"
    • Under KDE: Kmenu> System> Terminal (Konsole)

Most useful file commands to use on the terminal

  • ls – directory listing
  • ls -al – formatted listing with hidden files
  • cd dir - change directory to dir
  • cd – change to home
  • pwd – show current directory
  • mkdir dir – create a directory dir
  • rm file – delete file
  • rm -r dir – delete directory dir
  • rm -f file – force remove file
  • rm -rf dir – force remove directory dir
  • cp file1 file2 – copy file1 to file2
  • cp -r dir1 dir2 – copy dir1 to dir2; create dir2 if it doesn't exist
  • mv file1 file2 – rename or move file1 to file2 if file2 is an existing directory, moves file1 into directory file2
  • ln -s file link – create symbolic link link to file
  • touch file – create or update file
  • cat > file – places standard input into file
  • more file – output the contents of file
  • head file – output the first 10 lines of file
  • tail file – output the last 10 lines of file
  • tail -f file – output the contents of file as it grows, starting with the last 10 lines