SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-02-12 13:26:02

cc7046
Member
Registered: 2011-01-15
Posts: 14

some usefull command lines.

hi people, here are some useful command lines i have picked up over the years in the ubuntu forum, no dodgy or dangerous ones, admin feel free to have a look.

sorry for the long post, couldnt see where or how to upload an attachment.

sudo apt-get update = update all. 
sudo apt-get upgrade = program update. 
apt-cache search ????? = search for app. 
sudo apt-get install ????? = install app. 
sudo apt-get remove ????? = remove app. 
apt-get help = help menu. 
man sudo_root = root command help. 
sudo -i = root user. 
sudo apt-get autoremove = clean junk files 
sudo apt-get autoclean = as above. 
localepurge = purge residual files (root). 
sudo sh ~/desktop/????? .run = run desktop app/file. 
deborphan = delete orphaned files. 
sudo deborphan | xargs sudo apt-get -y remove --purge = as above but all. 
sudo rm -rfvI ~/.local/share/Trash/files/ = remove all files in trash. 
sudo command - run command as root 
sudo su - open a root shell 
sudo su 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 
gksudo nautilus - root file manager (GNOME) 
kdesudo konqueror - root file manager (KDE) 
passwd - change your password 

Display

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

System Services

start service - start job service (Upstart) 
stop service - stop job service (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 - restart service (SysV) 
runlevel - get current runlevel 

Package Management

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

Network

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

Special Packages

ubuntu-desktop - standard Ubuntu environment 
kubuntu-desktop - KDE desktop 
xubuntu-desktop - XFCE desktop 
ubuntu-minimal - core Ubuntu utilities 
ubuntu-standard - standard Ubuntu utilities 
ubuntu-restricted-extras - non-free, but useful 
kubuntu-restricted-extras - KDE of the above 
xubuntu-restricted-extras - XFCE of the above 
build-essential - packages used to compile programs 
linux-image-generic - latest generic kernel image 
linux-headers-generic - latest build headers

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 status and rules 
ufw allow port - allow traffic on port 
ufw deny port - block port 
ufw deny from ip - block ip adress 

Application Names

nautilus - file manager (GNOME) 
dolphin - file manager (KDE) 
konqueror - web browser/filemanager (KDE) 
kate - text editor (KDE) 
gedit - text editor (GNOME)

"I won't be wronged, I won't be insulted, and I won't be laid a hand on. I don't do these things to other people and I expect the same from them."

Offline

Help fund CrunchBang, donate to the project!

#2 2011-02-12 14:08:13

luc
#! Die Hard
From: Munich, Germany
Registered: 2010-03-21
Posts: 561

Re: some usefull command lines.

welcome cc7046,
you can upload here -> http://crunchbanglinux.org/pastebin/
and you could also use code tags. makes things a little easier.

Offline

#3 2011-02-12 14:18:17

Unia
#! Die Hard
From: The Netherlands
Registered: 2010-07-17
Posts: 3,113

Re: some usefull command lines.

Also it would've been better if you had posted this in the Tips & Tricks session. Other than that, that list should prove useful to some of the new guys smile


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
      Github || Deviantart

Offline

#4 2011-02-12 14:20:24

cc7046
Member
Registered: 2011-01-15
Posts: 14

Re: some usefull command lines.

@Unia and luc, cheers never seen that lol, will keep it in mind, cheers.


"I won't be wronged, I won't be insulted, and I won't be laid a hand on. I don't do these things to other people and I expect the same from them."

Offline

#5 2011-02-12 14:37:54

axcraig
#! Member
Registered: 2011-02-05
Posts: 95

Re: some usefull command lines.

Thanks cc7046,  this will definitely come in handy.

Offline

#6 2011-02-12 14:58:19

cc7046
Member
Registered: 2011-01-15
Posts: 14

Re: some usefull command lines.

@axcraig, no problem.


"I won't be wronged, I won't be insulted, and I won't be laid a hand on. I don't do these things to other people and I expect the same from them."

Offline

#7 2011-02-12 14:58:26

FiniteStateMachine
Part of the Machine
From: Ontario, Canada
Registered: 2009-06-29
Posts: 1,489

Re: some usefull command lines.

might want to remove the ubuntu related stuff (like x/k/ubuntu desktop packages)


just call me...
~FSM~

Offline

#8 2011-02-12 15:09:10

cc7046
Member
Registered: 2011-01-15
Posts: 14

Re: some usefull command lines.

@FiniteStateMachine, yeah was gona but unless your runing kde,gnome etc. it should be self explanatory, i hope lol, every ones got to learn, its how i learned.


"I won't be wronged, I won't be insulted, and I won't be laid a hand on. I don't do these things to other people and I expect the same from them."

Offline

#9 2011-02-12 15:13:12

FiniteStateMachine
Part of the Machine
From: Ontario, Canada
Registered: 2009-06-29
Posts: 1,489

Re: some usefull command lines.

@cc7046, I was just fearful that some newbies might think CrunchBang is still based on Ubuntu.. but I guess the big debian swirls should stop that lol


just call me...
~FSM~

Offline

#10 2011-02-12 15:16:27

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 8,905

Re: some usefull command lines.

@cc7046 - I've add code tags to your post to make it more organized. Also I noticed lots of redundant commands in the first section and the package management section. You might wanna sort that out.


Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Offline

#11 2011-02-12 15:51:35

cc7046
Member
Registered: 2011-01-15
Posts: 14

Re: some usefull command lines.

@anonymous, much appreciated for the post edit, @FiniteStateMachine, yeah you would have thought the swirl would give it away lol, but remember ubuntu's base is based on debian stable.........


"I won't be wronged, I won't be insulted, and I won't be laid a hand on. I don't do these things to other people and I expect the same from them."

Offline

#12 2011-02-12 15:53:24

Unia
#! Die Hard
From: The Netherlands
Registered: 2010-07-17
Posts: 3,113

Re: some usefull command lines.

cc7046 wrote:

@anonymous, much appreciated for the post edit, @FiniteStateMachine, yeah you would have thought the swirl would give it away lol, but remember ubuntu's base is based on debian stable.........

Testing, not stable wink


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
      Github || Deviantart

Offline

#13 2011-02-12 15:58:39

cc7046
Member
Registered: 2011-01-15
Posts: 14

Re: some usefull command lines.

@#! Die-hard, oops my mistake, cheers:D


"I won't be wronged, I won't be insulted, and I won't be laid a hand on. I don't do these things to other people and I expect the same from them."

Offline

#14 2011-02-12 16:21:28

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 8,905

Re: some usefull command lines.

Unia wrote:
cc7046 wrote:

@anonymous, much appreciated for the post edit, @FiniteStateMachine, yeah you would have thought the swirl would give it away lol, but remember ubuntu's base is based on debian stable.........

Testing, not stable wink

Only for LTS. I think the regular releases go so far as to use Unstable wink


Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Offline

#15 2011-02-12 16:27:57

cc7046
Member
Registered: 2011-01-15
Posts: 14

Re: some usefull command lines.

yeah, long term has to be stable i suppose but run of the mill realease's maybe based on unstable, ie kubuntu 10.10 can be upgraded to kde 4.6 but cannot be done on kubuntu 10.04:)

Unless you update the repo's, which is kinnda pointless..........

Last edited by cc7046 (2011-02-12 17:02:31)


"I won't be wronged, I won't be insulted, and I won't be laid a hand on. I don't do these things to other people and I expect the same from them."

Offline

#16 2013-04-28 15:03:40

jimbo1
New Member
From: London, UK
Registered: 2013-04-26
Posts: 5

Re: some usefull command lines.

Thanks, very helpful for newbies like myself :-)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo