linux poison RSS
linux poison Email

Useful Commands in Ubuntu

A comprehensive list of commands needed when using Ubuntu:

Command privileges.

    sudo command - run command as root
    sudo su – root shell open
    sudo su user – open shell as a user
    sudo -k – forget your password sudo
    gksudo command – sudo visual dialog (GNOME)
    kdesudo command – sudo visual dialog (KDE)
    sudo visudo – edit / etc / sudoers
    gksudo nautilus – root file manager (GNOME)
    kdesudo konqueror – root file manager (KDE)
    passwd – change your password

Command Network


    ifconfig – displays information network
    iwconfig – displays information from wireless
    sudo iwlist scan – scan wireless networks
    sudo /etc/init.d/networking restart – reset the network
    (file) /etc/network/interfaces – manual configuration
    ifup interface – bring online interface
    ifdown interface – disable interface

Commands Display

    sudo /etc/init.d/gdm restart – reset X (Gnome)
    sudo /etc/init.d/kdm restart – reset X (KDE)
    (file) /etc/X11/xorg.conf – show Configuration
    sudo dpkg-reconfigure - reconfigure xserver-xorg-phigh - reset configuration X
    Ctrl+Alt+Bksp – X display reset if frozen
    Ctrl+Alt+FN – switch to tty N
    Ctrl+Alt+F7 – switch back to X display

Commands Service System.

    start service – service to start work (Upstart)
    stop service – service to stop working (Upstart)
    status service – check if service is running (Upstart)
    /etc/init.d/service start – start service (SysV)
    /etc/init.d/service stop – stop service (SysV)
    /etc/init.d/service status – check service (SysV)
    /etc/init.d/service restart – reset service (SysV)
    runlevel – get current runlevel

Commands for Firewall.

    ufw enable – turn on the firewall
    ufw disable – turn off the firewall
    ufw default allow – allow all connections by default
    ufw default deny – drop all connections by default
    ufw status – current rules and
    ufw allow port – to allow traffic on port
    ufw deny port – port block
    ufw deny from ip – ip block

Command System.


    lsb_release -a – get the version of Ubuntu
    uname -r – get kernel version
    uname -a – get all the information kernel

Commands for Package Manager.


    apt-get update – refresh updates available
    apt-get upgrade – update all packages
    apt-get dist-upgrade – version update
    apt-get install pkg – installing pkg
    apt-get remove pkg – uninstall pkg
    apt-get autoremove – removing packages obsotletos
    apt-get -f install – try to fix packages
    dpkg –configure -a – try to fix a broken package
    dpkg -i pkg.deb – install file pkg.deb
    (file) /etc/apt/sources.list – list of repositories APT

Special Packages For commands.

    ubuntu-desktop – Setting the standard Ubuntu
    kubuntu-desktop – KDE Desktop
    xubuntu-desktop – desktop XFCE
    ubuntu-minimal – core earnings Ubuntu
    ubuntu-standard – the standard utilities Ubuntu
    ubuntu-restricted-extras – not free, but useful
    kubuntu-restricted-extras – ditto KDE
    xubuntu-restricted-extras – ditto XFCE
    build-essential – packages used to compile
    linux-image-generic – latest generic kernel image
    linux-headers-generic – latest headlines

Applications commands.

    nautilus – File Manager (GNOME)
    dolphin – File Manager (KDE)
    konqueror – Web browser (KDE)
    kate – text editor (KDE)
    gedit – text editor (GNOME)


16 comments:

Anonymous said...

thanx this really helped

Praveen said...

Ubuntu is cool ;) Very nice collection of Terminal commands :)

Anonymous said...

Thanks.

There are useful commands that can be run from Alt+F2 in http://ubuntuforums.org/showthread.php?t=1656060

The ones not present above:

eog : Eye of GNOME (image viewer)

file-roller : File Roller (archive manager)

gcalctool : gcalctool (calculator)

gconf-editor : Configuration Editor (user preferences and system configuration data editor for the GNOME Desktop and many applications)

gnome-control-center : GNOME Control Center (control panel)

gnome-search-tool : Search for Files (file searcher)

gnome-session-save –logout-dialog : “Log Out of the Session” dialog (to finish or close the session; or to switch or change the user)

gnome-session-save –shutdown-dialog : “Shut Down the Computer” dialog (to turn the computer off, reboot it, suspend it or hibernate it)

gnome-terminal : GNOME Terminal (terminal emulator)

gucharmap or gnome-character-map : GNOME Character Map

setxkbmap xx : change the keyboard layout (xx can be it or gb or es or fr …)

totem : Totem (movie player; also plays audios)

xcalc : xcalc (calculator)

xset dpms force off : turns the screen off (useful for laptops)

xterm : xterm (terminal emulator)

Anonymous said...

2 more:
onboard : onscreen keyboard
onboard-settings : configure Onboard

GNU/Linux said...

Nice article. Thanks. It's hard to remember all of it. So I will save it into my Linux documents.

Mahesh said...

Is there any command to get only user application not the background processes?

Anonymous said...

The command gnome-calculator opens also gcalctool

Anonymous said...

gnome-calculator opens also gcalctool

Some more commands:

ooffice or openoffice.org : OpenOffice.org
ooffice -draw or openoffice.org -draw : OpenOffice.org Draw
ooffice -calc or openoffice.org -calc : OpenOffice.org Calc
ooffice -impress or openoffice.org -impress : OpenOffice.org Impress
ooffice -writer or openoffice.org -writer : OpenOffice.org Writer
ooffice -math or openoffice.org -math : OpenOffice.org Math

Anonymous said...

Another one:
simple-scan : Simple Scan

The GNOME Character Map can also be opened just with this short command: charmap

Pranav said...

thanks, very helpful commands

Anonymous said...

I cannot start telnet service. Please, help
I use chkconfig telnet on
but it still off..

Hardik Raval said...

fantastic it's very helpful

Anonymous said...

Pleas tell me the command for shutdown and restart the ubntu O.S in command line

DevOps said...

shutdown -- sudo halt
restart -- sudo restart

Anonymous said...

Also:

Shutdown:
sudo poweroff
or
sudo shutdown -h now

Restart:
sudo reboot
or
shutdown -r now

Anonymous said...

Another one:
alacarte : Main Menu (select which applications we want to appear in the main menu)
This one doesn’t work in Ubuntu 12.04 Precise Pangolin. Anyone knows any alternative command for this in this 12 version?

Another 2, related to the keyboard:
gnome-keyboard-properties : Keyboard Preferences
gnome-keybinding-properties : Keyboard Shortcuts
These 2 ones don’t work in Ubuntu 12.04 Precise Pangolin. In this version, from the control panel you have a Keyboard option where you can both change keyboard settings (layouts, …) and keybindings (shortcuts). Anyone knows which terminal command can open this Keyboard dialog directly in the 12 version?

Another command:
gnome-system-monitor : System Monitor (System -info about the system: installed version of Ubuntu, hardware, …-, Processes -we can view and end them from here-, Resources -monitor of CPU, memory, …- and File Systems)

Thanks

Post a Comment

Related Posts with Thumbnails