Tagged: cheatsheet, command-line, debian, terminal, ubuntu
This topic was published by Saptarshi Nag and viewed 2339 times since "". The last page revision was "".
Viewing 1 post (of 1 total)
- AuthorPosts
PRIVILEGES
sudo command
– run command as rootsudo -s
– open a root shellsudo -s -u user
– open a shell as usersudo -k
– forget sudo passwordsgksudo command
– visual sudo dialog (GNOME)kdesudo command
– visual sudo dialog (KDE)sudo visudo
– edit /etc/sudoersgksudo nautilus
– root file manager (GNOME)kdesudo konqueror
– root file manager (KDE)passwd
– change your password
DISPLAY
sudo /etc/init.d/gdm restart
– restart X and return to login (GNOME)sudo /etc/init.d/kdm restart
– restart X and return to login (KDE)(file) /etc/X11/xorg.conf
– display configurationsudo dexconf
– reset xorg.conf configurationCtrl+Alt+Bksp
– restart X display if frozenCtrl+Alt+FN
– switch to tty NCtrl+Alt+F7
– switch back to X display
SYSTEM SERVICES
start service
– start job service (Upstart)stop servic
e – 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 updatesapt-get upgrade
– upgrade all packagesapt-get dist-upgrade
– upgrade with package replacements; upgrade Ubuntu versionapt-get install pkg
– install pkgapt-get purge pkg
– uninstall pkgapt-get autoremove
– remove obsolete packagesapt-get -f install
– try to fix broken packagesdpkg --configure -a
– try to fix broken packagesdpkg -i pkg.deb
– install file pkg.deb(file) /etc/apt/sources.list
– APT repository list
NETWORK
ifconfig
– show network informationiwconfig
– show wireless informationsudo iwlist scan
– scan for wireless networkssudo /etc/init.d/networking restart
– reset network for manual configurations(file) /etc/network/interfaces
– manual configurationifup interface
– bring interface onlineifdown interface
– disable interface
SPECIAL PACKAGES
ubuntu-desktop
– standard Ubuntu environmentkubuntu-desktop
– KDE desktopxubuntu-desktop
– XFCE desktopubuntu-minimal
– core Ubuntu utilitiesubuntu-standard
– standard Ubuntu utilitiesubuntu-restricted-extras
– non-free, but usefulkubuntu-restricted-extras
– KDE of the abovexubuntu-restricted-extras
– XFCE of the abovebuild-essential
– packages used to compile programslinux-image-generic
– latest generic kernel imagelinux-headers-generic
– latest build headers
FIREWALL
ufw enable
– turn on the firewallufw disable
– turn off the firewallufw default allow
– allow all connections by defaultufw default deny
– drop all connections by defaultufw status
– current status and rulesufw allow port
– allow traffic on portufw deny port
– block portufw deny from ip
– block IP address
APPLICATION NAMES
nautilus
– file manager (GNOME)dolphin
– file manager (KDE)konqueror
– web browser (KDE)kate
– text editor (KDE)gedit
– text editor (GNOME)
SYSTEM
- Recovery - Type the phrase "REISUB" while holding down Alt and SysRq (PrintScrn) with about 1 second between each letter. Your system will reboot.
lsb_release -a
– get Ubuntu versionuname -r
– get kernel versionuname -a
– get all kernel information
Check out DCJTech's official Facebook page - https://dcjtech.info/members/saptarshi/
- AuthorPosts
Viewing 1 post (of 1 total)