Vous êtes sur la page 1sur 7

Back to the Unofficial Fedora FAQ

Summary
This page goes over some of the basics of using Linux, and a few basics of using Fedora in particular !t"s helpful to know these things before reading the Unofficial FAQ

Contents
Some Linux Basics
# , 0 1 2 . ) $hat is a terminal% &ow to ! 'open a terminal%' (Updated ) *a+ ,--./ $hat is root% &ow do ! 'become root%' ! installed a program, how do ! start it% $hat is a runlevel% &ow do ! start in text-only mode (no graphical environment/% &ow do ! run something when the computer starts% &ow do ! reset m+ root password%

Some Fedora Basics


# , $hat is a 'service%' &ow do ! manage services in Fedora% $hat is rescue mode and how do ! boot into it%

The FAQ
Some Linux Basics
# Q3 $hat is a terminal% &ow to ! 'open a terminal%' (Updated ) *a+ ,--./ A3 A 'terminal' is a wa+ of t+ping commands to the computer That ma+ sound ver+ strange, but it"s actuall+ reall+, reall+ nice and eas+ once +ou get used to it 4ou can use Fedora as a totall+ graphical s+stem, or +ou can use it totall+ with the terminal ! like to do both5 ! use whichever one is easier for the task !"m doing 4ou can either open a terminal inside of +our graphical environment, or +ou can switch +our whole screen to a terminal To open a terminal in a graphical environment3

# ,

6pen up +our menu This is either the 'red hat' in the tra+ (at the top or bottom of the screen/, or a little 'foot,' or possibl+ a little penguin Under System Tools, click on Terminal

To switch +our entire screen to a terminal, press Ctrl-Alt-F1 4ou can then switch between six different terminals, b+ using Alt-F1 through Alt-F6 7ressing Alt-F7 will bring +ou back to +our graphical environment , Q3 $hat is root% &ow do ! 'become root%' A3 'root' is the name of the user who can control ever+thing on the entire computer $e call this the 'super user ' To become root, first +ou must open a terminal Then, +ou t+pe3 su 8 9ote that the '8' is ver+ important 88 it sets things so that +ou have eas+ access to all the commands on the computer Then, +ou have to t+pe in +our root password 4ou set this when +ou installed Fedora !f +ou"re using the 'open a terminal' method where +ou make the whole screen into a terminal, then +ou :ust need to put 'root' as +our 'Login3' name, and then enter the correct password 0 Q3 ! installed a program, how do ! start it% A3 First, look around in the ';ed &at' menu in the toolbar *ost new programs installed will add themselves to the menu automaticall+ !f +ou can"t find it in the menu, +ou can use the Terminal, in the menu under '<+stem Tools ' *ost programs are executed b+ their name For example, to launch the web browser, mo=illa, +ou can simpl+ open a terminal and t+pe3 mo=illa !f it isn"t in the menu and the program name isn"t obvious, tr+ this to list the programs in a package3 rpm 8>l packagename ? grep bin 1 Q3 $hat is a runlevel%

A3 A runlevel is a number which indicates what 'mode' +ou want to computer to boot into For example, runlevel 2 is graphical mode, where runlevel 0 is text8onl+ mode ;unlevel # is 'single8user' mode, used for troubleshooting problems There are three wa+s to change +our runlevel3 o While the Computer is unning3 # 6pen a Terminal , Become root3 su 8 0 T+pe3 init number where number is the runlevel that +ou want to change to o o 4ou will then be switched into the new runlevel While !ou Are Booting the Computer3 # $hen +ou first start +our computer, the @;UB screen (where +ou choose +our 6perating <+stem/ appears <elect the Fedora that +ou want to boot into, but press the a ke+ instead of pressing Enter , 4ou will see a line somewhat like the following3 kernel Avmlinu=8, . B8# ..) ro rootCLABDLCA acpiCon rhgb >uiet Add the number of +our runlevel to the end of that line, and then press Enter For example, to boot into text8onl+ mode, the line would look like3 kernel Avmlinu=8, . B8# ..) ro rootCLABDLCA acpiCon rhgb >uiet 0 o o 4ou will then boot into the new runlevel this time onl+ "ermanently Set a #e$ault unlevel3 # 6pen a Terminal , Become root3 su 8 0 6pen the file /etc/inittab in +our favorite text editor3 gedit AetcAinittab 1 Find the line3

id3number3initdefault3 where number is +our current default runlevel (probabl+ 2/ 2 Ehange the number in the middle of the line to the new runlevel that +ou want +our computer to start in b+ default For example, if +ou want to start in text8onl+ mode b+ default, change it to3 id303initdefault3 o 4ou will then boot into that runlevel ever+ time +ou start the computer

(Thanks to !l:a Fogan for the inspiration to write this >uestion, and some original text / 2.

Q3 &ow do ! start in text8onl+ mode (no graphical environment/% A3 Text8onl+ mode is runlevel 0 !f +ou want to start in text8onl+ mode, see the instructions in the runlevel >uestion above, and change +our runlevel to runlevel 0

3.

Q3 &ow do ! run something when the computer starts% A3 4ou have two choices, either +ou can run something before an+bod+ logs in, or +ou can run something immediatel+ after +ou log in To run a command right a$ter you %oot& %e$ore any%ody logs in, add the command to the file /etc/rc.local3 # , 6pen a Terminal Become root3 su 8 0 6pen the file in +our favorite text editor3 gedit AetcArc local 1 Add the command that +ou want to run to the end of the file, on its own line

!f +ou want to start a program right a$ter you log in3 2 . ) Log in $ait for ever+thing to start, then start only the program that +ou want to start automaticall+ from now on Log out, and put a check in the '<ave <ettings' box

From now on, when +ou log in, that program will be automaticall+ started !f +ou want to stop that program $rom starting automatically, :ust3 G Log in B Quit the program that +ou want to no longer automaticall+ start #- Log out, and put a check in the '<ave <ettings' box The '<ave <ettings' check box :ust causes +our s+stem to alwa+s look, b+ default, exactly like it does right before you log out
(Thanks to !l:a Fogan for the >uestion suggestion and original text /

Q3 &ow do ! reset m+ root password% A3 !f +ou"ve forgotten +our root password, and +ou want to change it, don"t worr+H !t"s possible 4ou need to boot into what"s called 'single8user mode ' 4ou must be in front of the computer to do this 88 +ou can not do it remotel+3 ## Using the instructions in the runlevel >uestion (under the '$hile 4ou Are Booting the Eomputer' section/, boot into runlevel # #, <et the new root password with b+ t+ping3 passwd And then enter +our new root password when asked #0 ;eboot +our machine, and +ou will now be able to log in as root with the new password that +ou entered
(Thanks to *ark <enn for suggesting that ! write this >uestion and giving me some original text /

Some Fedora Basics


# Q3 $hat is a 'service%' &ow do ! manage services in Fedora% A3 A 'service' is a program that starts automaticall+ when +ou start +our computer, and runs in the background For example, the 'network' service sets up +our connection to the !nternet and keeps it running correctl+ There are two wa+s to manage services in Fedora, one using the graphical tools, and one using onl+ the command line !f +ou"re not in a graphical environment, use the command line method Using the graphical tool which can be found in the menu, under System Settings - > Server Settings - > Services3

o o o o o

Chec' i$ a service is running3 <elect +our service in the list, the status is shown in the status section Starting a service3 <elect +our service in the list and press Start Stopping a service3 <elect +our service in the list and press Sto (ave a service start automatically at %oot3 <elect +our service in the list, check the checkbox next to it Stop a service $rom starting automatically at %oot3 <elect +our service in the list, uncheck the checkbox next to it

Using the command line (replace servicename with the name of the service +ou want/3 4ou must be root for this to work
o

Chec' i$ a service is running3 service servicename status

Starting a service3 service servicename start

Stopping a service3 service servicename stop

(ave a service start automatically at %oot3 # 6pen the nts+sv program3 nts+sv Find +our service in the list and press space to enable it <ervices marked with a ) will start automaticall+ at boot Stop a service $rom starting automatically at %oot3 # 6pen the nts+sv program3 nts+sv , Find +our service in the list and press space to disable it <ervices marked with a ) will start automaticall+ at boot ,

(Thanks to <indre for the original text of this >uestionH/

Q3 $hat is rescue mode and how do ! boot into it%

A3 ;escue mode provides the abilit+ to boot a small Fedora environment entirel+ from a EI8;6* or U<B drive instead of the s+stem"s hard drive As the name implies, rescue mode is provided to rescue +ou from something !n rescue8mode +ou can mount and edit +our files, such as configuration files and b+ doing so solve +our problems To boot into rescue mode, +ou must be able to boot the s+stem using one of the following methods3 B+ booting the s+stem from an installation boot EI8;6*, or a boot image on a U<B disk 2. B+ booting the s+stem from the Fedora EI8;6* J#
1.

6nce +ou have booted using one of the described methods, enter the following command at the installation boot prompt3 linux rescue This FAQ is maintained by Max Kanat-Alexander. That's max at! fedorafa" #dot# org or $avatraxiom$ in %fedora on Free&ode '(). *indre $foolish$ +edersen ,-.rdal is the Assistant /ditor 0foolish #at# fedorafa" dot! org1. 2ou can help us 3eep this FAQ up to date4 'f you discover an issue 5e don't cover6 find any errors in the ans5ers already here or have a suggestion of some 3ind6 please contact us and 5e'll get on it.

Vous aimerez peut-être aussi