my blog my blog

Tag: Fedora15命令速查手册
Fedora15命令速查手册

今天在笨兔兔那里看到这个手册,觉得不错,就转过来了,希望对上手Fedora15的朋友有所帮助。

Privileges
sudo command – run command as root
sudo -s – open a root shell
sudo -s -u user – open a shell as user
sudo -k – forget sudo passwords
gksudo command – visual sudo dialog (GNOME)
kdesudo command – visual sudo dialog (KDE)
sudo visudo – edit /etc/sudoers
sudo nautilus – root file manager (GNOME)
sudo konqueror – root file manager (KDE)
passwd – change your password
Application Names
nautilus – file manager (GNOME)
dolphin – file manager (KDE)
kate – text editor (KDE)
gedit – text editor (GNOME)
System Services

sudo service service status – check if
service is running
sudo service service start – start service
sudo service service stop – stop service
sudo service service restart – restart ser-
vice
runlevel – get current runlevel
sudo chkconfig –level 35 service on/off –
set service to run/not run in runlevels 3,5
uname -r – get kernel version
uname -a – get all kernel information
Setup YUM and SUDO
Setting up SUDO: su -c ‘echo "$USER
ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers’
Setting up YUM: sudo rpm -ivh
http://download1.rpmfusion.org/free/fedora/rpmfus
ion-free-release-stable.noarch.rpm \
http://download1.rpmfusion.org/nonfree/fedora/rpm
fusion-nonfree-release-stable.noarch.rpm && sudo
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-
rpmfusion-* && sudo rpm –import /etc/pki/rpm-
gpg/*
Firewall
sudo service iptables on – start firewall
sudo service iptables off – stop firewall
sudo iptables -L – show current config
sudo iptables -a INPUT -j ACCEPT – allow all
connections
sudo iptables -a INPUT -j REJECT – deny all
connections
sudo iptables -a INPUT –dport port -j
ACCEPT – allow connection to port
sudo iptables -a INPUT –dport port -j
REJECT – deny connection to port
sudo iptables -F – Reset firewall config

Network
ifconfig – show network information
iwconfig – show wireless information
sudo iwlist scan – scan for wireless network
sudo service network restart – reset network
for manual configuration
(file)/etc/sysconfig/network-scripts/ifcfg-
interface – edit your gateway here
sudo service NetworkManager restart – reset
network to use NetworkManager
sudo chkconfig –level 35 network on \ sudo
chkconfig –level 35 NetworkManager off –
in case you have network problems with the
NetworkManager applet.
ifup interface – bring interface online
ifdown interface – disable interface
Display
Ctrl+Alt+Bksp – restart X display if frozen
(file)/etc/X11/xorg.conf – display config
Xorg -configure – create new config file
Ctrl+Alt+FN – switch to ttyN
Ctrl+Alt+F1 – switch back to X display
Package Management
sudo yum update – same as update
sudo yum check-update – check for availabi-
lity of updates for installed packages
sudo yum install pkg – install pkg
sudo yum remove pkg – remove pkg
sudo yum clean – clean the cache
(file) /etc/yum.conf – configuration for the
repos. Set keepcache=1 in this file for
retaining all packages downloaded by yum
Fixing the YUM/RPM Database:
sudo yum clean all
sudo yum clean metadata
sudo yum clean dbcache
sudo rpm -vv –initdb
sudo rm -f /var/lib/rpm/__db*
sudo rpmdb -vv –rebuilddb > /dev/null
Setup MP3 and Video
Audio(MP3): sudo yum install rhythmbox
gstreamer-plugins-ugly gstreamer-plugins-bad
gstreamer-ffmpeg
Video: sudo yum install xine xine-lib-extras
xine-lib-extras-freeworld
Flash Plugin
Flash Support: sudo rpm -ivh
http://fpdownload.macromedia.com/pub/flashplayer/
current/flash-plugin-10.3.181.14-release.i386.rpm
&& su -c ‘yum install flash-plugin alsa-plugins-
pulseaudio libcurl’

PDF版本文档下载:点此下载Fedora15命令速查手册

引用自:http://www.bentutu.com/2011/06/fedora-15-reference-cheat-sheet/